<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/prserv, branch jethro-14.0.1</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=jethro-14.0.1</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=jethro-14.0.1'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2015-09-28T11:00:33+00:00</updated>
<entry>
<title>bitbake: prserv/serv.py: Better messaging when starting/stopping the server with port=0</title>
<updated>2015-09-28T11:00:33+00:00</updated>
<author>
<name>Leonardo Sandoval</name>
<email>leonardo.sandoval.gonzalez@linux.intel.com</email>
</author>
<published>2015-09-10T11:59:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=f78f90240a3041be426c6ba9085849352164ee8b'/>
<id>urn:sha1:f78f90240a3041be426c6ba9085849352164ee8b</id>
<content type='text'>
When starting the server using port=0, the server actually starts with a
different port, so print a message with this new value. When stopping the
server with port=0, advise the user which ports the server is listening to,
so next time it tries to close it, user can pick up the correct one.

[YOCTO #8560]

(Bitbake rev: 851e53a216682fc9133f51c05a24527cfc677741)

Signed-off-by: Leonardo Sandoval &lt;leonardo.sandoval.gonzalez@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv/serv: Close the DB connection out of class destructor</title>
<updated>2015-09-28T11:00:32+00:00</updated>
<author>
<name>Leonardo Sandoval</name>
<email>leonardo.sandoval.gonzalez@linux.intel.com</email>
</author>
<published>2015-09-23T13:39:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=134b267ebbcbf7a7bc43915e204da776530911d4'/>
<id>urn:sha1:134b267ebbcbf7a7bc43915e204da776530911d4</id>
<content type='text'>
When launching the PR server daemon, the PRData __del__ function was being
called (no reason found yet) where the DB connection closed, thus following
PR updates were not getting into the DB. This patch closes the connection
explicitly, not relaying on the __del__ function execution.
Closing the connection in turn causes all WAL file transactions to be moved
into the database (checkpoint), thus effectively updating the database.

[YOCTO #8215]

(Bitbake rev: c1b4754f69003df1a83fafc1c80a9ef74400b6dd)

Signed-off-by: Leonardo Sandoval &lt;leonardo.sandoval.gonzalez@linux.intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv/serv: Start/Stop daemon using ip instead of host</title>
<updated>2015-09-24T16:55:05+00:00</updated>
<author>
<name>Leonardo Sandoval</name>
<email>leonardo.sandoval.gonzalez@linux.intel.com</email>
</author>
<published>2015-09-15T14:59:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=5a51fb28dbdfcae8ceb503a5290532dd38aeb09f'/>
<id>urn:sha1:5a51fb28dbdfcae8ceb503a5290532dd38aeb09f</id>
<content type='text'>
In cases where hostname is given instead of an IP (i.e. localhost
instead of 127.0.0.1) when stopping the server with bitbake-prserv --stop,
the server shows a misleading message indicating that the daemon was not
found, where it is actually stopped. This patch converts host to IP values
before starting/stopping the daemon, so it will always work on IP, not on
hostnames, avoiding problems like the latter.

[YOCTO #8258]

(Bitbake rev: bd6398e967c234e89d773f509512ebf460fa76ff)

Signed-off-by: Leonardo Sandoval &lt;leonardo.sandoval.gonzalez@linux.intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv: SIGTERM and deamonization fixes</title>
<updated>2015-09-09T13:27:56+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2015-09-08T22:32:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=85256c8fa986f2a3258e75a22bb8d0656ffa41bf'/>
<id>urn:sha1:85256c8fa986f2a3258e75a22bb8d0656ffa41bf</id>
<content type='text'>
Worryingly, if you SIGKILL the bitbake cooker, an autostarted PR server
will remain behind. It turns out there are a few things we should do:

* The PR service doesn't need to daemonize when started from cooker,
  it just complicated the process lifecycle. Add a fork() method
  to handle this and use the non-daemon mode for the singleton.

* Reset the sigterm and sigint handlers. Bitbake cooker installs its
  own which we inherit meaning PR server was ignoring SIGTERM. Installing
  our own handlers which include a sync makes most sense here. Since
  we're in the code, make it sync the database on SIGINT.

* Use the new bb.utils.signal_on_parent_exit() call so that we get a
  SIGTERM when the parent (usually cooker) exits and we can shutdown
  too. Alternatives would be having an open pipe or polling
  os.getppid() for changes but this seems more effective.

(Bitbake rev: 05d31fa1f56bd3d3d363a16a421d9ba7541d4293)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv/db: Document history modes</title>
<updated>2015-07-12T21:50:40+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2015-07-10T13:13:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=625a6bf6e813c7b753a9379151c95a4bbc6865c3'/>
<id>urn:sha1:625a6bf6e813c7b753a9379151c95a4bbc6865c3</id>
<content type='text'>
I keep having to dig into the archives to remember this information.
Add it as a comment to the file instead.

(Bitbake rev: 21dce82056887d8d28edde61b1b82f78bdf7613c)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv: serv.py: remove unused and duplicate imports</title>
<updated>2015-05-08T16:46:36+00:00</updated>
<author>
<name>Maxin B. John</name>
<email>maxin.john@enea.com</email>
</author>
<published>2015-05-04T11:35:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=29c7111362add0b4c457d11eecdb9c1928806e51'/>
<id>urn:sha1:29c7111362add0b4c457d11eecdb9c1928806e51</id>
<content type='text'>
Remove unused xmlrpclib, atexit and duplicated threading module imports

(Bitbake rev: 3e12f4e8e3ec66d1df772a64be04b90ec72462ae)

Signed-off-by: Maxin B. John &lt;maxin.john@enea.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv/serv: Improve exit handling</title>
<updated>2015-01-23T11:31:58+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2015-01-21T13:53:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=8da8a0e55e7191b81e6e0fd1d2d4f0937ba7b0ac'/>
<id>urn:sha1:8da8a0e55e7191b81e6e0fd1d2d4f0937ba7b0ac</id>
<content type='text'>
Currently, I'm not sure how the prserver managed to shut down cleanly. These
issues may explain some of the hangs people have reported.

This change:

* Ensures the connection acceptance thread monitors self.quit
* We wait for the thread to exit before exitting
* We sync the database when the thread exits
* We do what the comment mentions, timeout after 30s and sync the database
  if needed. Previously, there was no timeout (the 0.5 applies to sockets,
  not the Queue object)

(Bitbake rev: 0926492295d485813d8a4f6b77c7b152e4c5b4c4)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv: Use WAL mode</title>
<updated>2014-11-06T16:45:23+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2014-11-05T16:58:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=7105d44d87783e4d54859d212cd6746cda49ab1d'/>
<id>urn:sha1:7105d44d87783e4d54859d212cd6746cda49ab1d</id>
<content type='text'>
Ideally, we want the PR service to have minimal influence from
queued disk IO. sqlite tends to be paranoid about data loss and
locks/fsync calls. There is a "WAL mode" which changes the journalling
mechanism and would appear much better suited to our use case.

This patch therefore switches the database to use WAL mode. With this
change, write overhead appears significantly reduced.

(Bitbake rev: 0cdd48261daeb17efc528b5de0ac81c8836e8565)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv/serv: Ensure sync happens in the correct thread</title>
<updated>2014-11-04T15:00:19+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2014-11-04T14:02:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=2380ebecd192136e15bbba2d1bdc24271567d23f'/>
<id>urn:sha1:2380ebecd192136e15bbba2d1bdc24271567d23f</id>
<content type='text'>
The sync/commit calls are happening in the submission thread which can
race against the handler. The handler may start new transactions which
then causes the submission thread to error with "cannot start a
transaction within a transaction".

The fix is to move the calls to the correct thread.

(Bitbake rev: 92e128a0e331e563cfe48827e95939041c16c88e)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv: don't wait until exit to sync</title>
<updated>2014-10-28T15:00:39+00:00</updated>
<author>
<name>Ben Shelton</name>
<email>ben.shelton@ni.com</email>
</author>
<published>2014-10-27T17:27:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=cf82c6756bad8f7a5edc92ce513e02816b88efb3'/>
<id>urn:sha1:cf82c6756bad8f7a5edc92ce513e02816b88efb3</id>
<content type='text'>
In the commit 'prserv: Ensure data is committed', the PR server moved to
only committing transactions to the database when the PR server is
stopped.  This improves performance, but it means that if the machine
running the PR server loses power unexpectedly or if the PR server
process gets SIGKILL, the uncommitted package revision data is lost.

To fix this issue, sync the database periodically, once per 30 seconds
by default, if it has been marked as dirty.  To be safe, continue to
sync the database at exit regardless of its status.

(Bitbake rev: 424df64f2e9679043f0ce2b4f7dfc59c3d404304)

Signed-off-by: Ben Shelton &lt;ben.shelton@ni.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
