<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/prserv/serv.py, branch uninative-2.1</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=uninative-2.1</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=uninative-2.1'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2017-08-31T22:30:03+00:00</updated>
<entry>
<title>bitbake: prserv/serv: Gracefully handle the PR server exiting quickly</title>
<updated>2017-08-31T22:30:03+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2017-08-31T16:23:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e2ca45646eed986b9b0a965110b7771cfbc26710'/>
<id>urn:sha1:e2ca45646eed986b9b0a965110b7771cfbc26710</id>
<content type='text'>
If the server exits quickly its PID may no longer exist. Handle
this gracefully.

(Bitbake rev: c1b00a9265fa4146b8db8b7d03a51bf2bfcf9f51)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv/serv: Rename self.quit -&gt; self.quitflag</title>
<updated>2017-08-31T22:30:03+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2017-08-31T16:21:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=6e1ab28e94bf71ffd6a7fe5ba9346c22716dbfa9'/>
<id>urn:sha1:6e1ab28e94bf71ffd6a7fe5ba9346c22716dbfa9</id>
<content type='text'>
self has a quit function and a variable. Separate this to two different
things as the current setup is prone to breakage.

(Bitbake rev: ba7e3c73d8f4d2bd1d7434b97c326e7ab935231a)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv/serv: Send sentinel to stop handler thread</title>
<updated>2017-08-31T22:30:03+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2017-08-31T16:20:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=93a54f3432752646d53439210de6769368fb466e'/>
<id>urn:sha1:93a54f3432752646d53439210de6769368fb466e</id>
<content type='text'>
Shutdown from SIGTERM currently has to wait for the handler thread to timeout.
Add a sentinel value which triggers it to loop and allows for a quick exit.

(Bitbake rev: a7591ef34ce70ff1d7aa9362d7473e6f16fbd10f)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv/serv: Shut down any existing server before restarting</title>
<updated>2017-08-31T22:30:03+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2017-08-31T16:22:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=fc2f9c8a6370c4fa97bf74f7fa37704d717afa03'/>
<id>urn:sha1:fc2f9c8a6370c4fa97bf74f7fa37704d717afa03</id>
<content type='text'>
This allows for cleaner code in cooker as any existing server is dealt
with before a new one is started.

(Bitbake rev: b8616931bc0e523a3a3bb23b4f623f8b6e71d690)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv/cooker: Drop unused param</title>
<updated>2017-08-31T22:30:03+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2017-08-31T09:28:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=313bf30db7bda51a061bae9c8d9c489e4a7c0167'/>
<id>urn:sha1:313bf30db7bda51a061bae9c8d9c489e4a7c0167</id>
<content type='text'>
Drop pointless unused function parameter.

(Bitbake rev: 8104b33656de0b619943bd7a9884eb650ccafbf4)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv/serv: Improve process exit handling</title>
<updated>2017-07-24T15:57:14+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2017-07-24T12:39:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=57196bc6e4a07f855b3073b6120211ddda179077'/>
<id>urn:sha1:57196bc6e4a07f855b3073b6120211ddda179077</id>
<content type='text'>
The server shutdown is currenlty laggy and race prone. This patch:

* adds a waitpid so that no zombie server is left around if its not
  running in daemon mode.
* adds a quit "sentinal" using a pipe so that we're not sitting in
  a socket poll() until timeout in order just to quit.
* use a select() call to poll the socket and the pipe for a quit signal.

The net result of this change is that the prserv exits with the cooker server
and it does so immediately and doesn't wait for the select/poll calls to
timeout. This makes bitbake a lot more responsive for startup/shutdown and
doesn't cause UI timeout errors as often when prserv is used.

(Bitbake rev: 0b5a837477d18442caf97dd0fa14a806c54f5842)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: server: Rework the server API so process and xmlrpc servers coexist</title>
<updated>2017-07-21T07:41:11+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2017-07-18T21:28:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4602408c69132315c3784718fe4ce155b12464cf'/>
<id>urn:sha1:4602408c69132315c3784718fe4ce155b12464cf</id>
<content type='text'>
This changes the way bitbake server works quite radically. Now, the
server is always a process based server with the option of starting
an XMLRPC listener on a specific inferface/port.

Behind the scenes this is done with a "bitbake.sock" file alongside
the bitbake.lock file. If we can obtain the lock, we know we need
to start a server. The server always listens on the socket and UIs
can then connect to this. UIs connect by sending a set of three file
descriptors over the domain socket, one for sending commands, one for
receiving command results and the other for receiving events.

These changes meant we can throw away all the horrid server abstraction
code, the plugable transport option to bitbake and the code becomes
much more readable and debuggable. It also likely removes a ton of
ways you could hang the UI/cooker in weird ways due to all the race
conditions that existed with previous processes.

Changes:

 * The foreground option for bitbake-server was dropped. Just tail
   the log if you really want this, the codepaths were complicated enough
   without adding one for this.
 * BBSERVER="autodetect" was dropped. The server will autostart and
   autoconnect in process mode. You have to specify an xmlrpc server
   address since that can't be autodetected. I can't see a use case
   for autodetect now.
 * The transport/servetype option to bitbake was dropped.
 * A BB_SERVER_TIMEOUT variable is added which allows the server
   to stay resident for a period of time after the last client
   disconnects before unloading. This is used if the -T/--idle-timeout
   option is not passed to bitbake.

This change is invasive and may well introduce new issues however I
believe the codebase is in a much better position for further
development and debugging.

(Bitbake rev: 72a3dbe13a23588e24c0baca6d58c35cdeba3f63)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv/persist_data/utils: Drop obsolete python2 imports</title>
<updated>2017-01-09T13:39:13+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2017-01-06T12:35:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=6f6f51783af0e45ebda4442e33c9de1a3932263c'/>
<id>urn:sha1:6f6f51783af0e45ebda4442e33c9de1a3932263c</id>
<content type='text'>
These imports were from python 2.6 and earlier, 2.4 in some cases.
Drop them since we're all python3 now.

(Bitbake rev: 7ef12684e8647b006bf46cae695069d4bfece1cf)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv/serv: Tweak stdout manipulation to be stream safe</title>
<updated>2017-01-05T13:54:07+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2017-01-04T23:23:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=9f6a1043f68580ed9604e750fd0f993f933bb66e'/>
<id>urn:sha1:9f6a1043f68580ed9604e750fd0f993f933bb66e</id>
<content type='text'>
We've been seeing oe-selftest failures under puzzling circumstances. It
turns out if you run oe-selftest on a machine with xmlrunner installed
and have the recent tinfoil2 changes, the launching of PR server crashes
leading to selftest hanging if using an autoloaded PR server.

The reason is that xmlrunner uses an io.StringIO object as stdout/stderr
instead of the usual io.TextIOWrapper and StringIO lacks a fileno() method.

We have to deal with both cases and in the python way, we try and then seek
forgivness if we see an AttributeError or UnSupportedOperation exception.
Unfortunately we have to deal with both cases as we may be performing a
traditiional double fork() from the commandline, or a larger python program.

[YOCTO #10866]

(Bitbake rev: 26243f04e3af652291d13e85c084057104fe155b)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bitbake: remove True option to getVar calls</title>
<updated>2016-11-30T15:48:09+00:00</updated>
<author>
<name>Joshua Lock</name>
<email>joshua.g.lock@intel.com</email>
</author>
<published>2016-11-25T15:28:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=1fce7ecbbb004a5ad82da3eef79cfd52b276708d'/>
<id>urn:sha1:1fce7ecbbb004a5ad82da3eef79cfd52b276708d</id>
<content type='text'>
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.

Search made with the following regex: getVar ?\(( ?[^,()]*), True\)

(Bitbake rev: 3b45c479de8640f92dd1d9f147b02e1eecfaadc8)

Signed-off-by: Joshua Lock &lt;joshua.g.lock@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
