| Summary: | Remote PR server not writing PR values to database | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] BitBake | Reporter: | Paul Eggleton <bluelightning> |
| Component: | bitbake | Assignee: | Leonardo Sandoval Gonzalez <leonardo.sandoval.gonzalez> |
| Status: | VERIFIED FIXED | QA Contact: | Daniel Istrate <daniel.alexandrux.istrate> |
| Severity: | normal | ||
| Priority: | High | CC: | alejandro.hernandez, alexandru.c.georgescu, leonardo.sandoval.gonzalez, poky.bs.watcher, poky.watcher |
| Version: | 1.8 | ||
| Target Milestone: | 2.0 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | Unknown (Hard to categorize) |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
Patch sent to the ML. The problem was the Journal Mode. WAL just work when DB is on the host machine. So changing it to DELETE. Second patch (V2) sent to the list. Journal remain the same (WAL); the problem was that the connection to the DB was closed when starting the daemon, so PR updates were not done. Now connection is closed outside the __del__ class function. COMMIT: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=134b267ebbcbf7a7bc43915e204da776530911d4 Verified on master: 370a2916c4559c17952392b872322e8e490b124c At step 8: - No QA error is shown - PKGR is incremented to r0.2 - PR server is storing the PR value in the database properly: sqlite> select * from PRMAIN_nohist; testrecipe-1.0-r0|i586|57f4cebfd8e2d1b77800ec343dde7ad6|0 testrecipe-1.0-r0|i586|6eb24890afedb6a38fc50c3135b784b8|1 testrecipe-1.0-r0|i586|077c8033ee3961a2fa56b66e48af648b|2 |
Using poky from master (393bd7496d71eb101f21234c1233a2d18fd2c73e), try the following: 1) Set up a PR server on one machine, assuming 192.168.1.10 is its IP address: bitbake-prserv --host 192.168.1.10 --port 8585 --start 2) On another machine, set up to run a build using this by adding the following to local.conf, also enabling buildhistory: PRSERV_HOST = "192.168.1.10:8585" INHERIT += "buildhistory" BUILDHISTORY_COMMIT = "1" 3) Build some trivial recipe; in my case I wrote this to test it: LICENSE = "CLOSED" INHIBIT_DEFAULT_DEPS = "1" SUMMARY = "summary" ALLOW_EMPTY_${PN} = "1" 4) Build the recipe, then look in buildhistory and you'll note that PKGR is being set to "r0.0" as expected. 5) Edit the recipe and change the SUMMARY value to something different, then build the recipe again and note that in buildhistory the PKGR value has incremented to "r0.1" as expected. (All is well up to this point). 6) Go back to the PR server machine and use "sqlite3 prserv.sqlite3" to examine the database. Note that it contains only a PRMAIN_nohist table which is empty. 7) Stop the PR server with and start it again: bitbake-prserv --host 192.168.1.10 --port 8585 --stop bitbake-prserv --host 192.168.1.10 --port 8585 --start 8) Edit the recipe and change the SUMMARY value to something different again, then build the recipe. You will get a QA error noting that the package version has gone backwards from "1.0-r0.1" to "1.0-r0.0". It would appear that the PR server isn't storing the PR value in the database properly under this scenario. Perhaps the transaction we're beginning isn't being committed properly? I'm using sqlite 3.8.2 on an Ubuntu 14.04.3 LTS machine in the above test if it makes a difference; Jan-Simon Moeller reports similar behaviour on an openSUSE 13.2 machine. Nothing by way of an error or warning shows up in prserv.log, just the normal starting/stopping messages. I also tried passing --loglevel=DEBUG when starting the PR server but that doesn't seem to make it log any more information.