[bitbake-devel,1/2] cooker: clear extra config settings and remote datastores on client disconnect

Submitted by Paul Eggleton on Sept. 4, 2017, 9:03 a.m. | Patch ID: 143633

Details

Message ID 0a90099ead0da210757f2a585f626a0a144c6fe1.1504515728.git.paul.eggleton@linux.intel.com
State Master Next
Commit 1cf06ee71c35d7f7df0263208b996088eebbd72e
Headers show

Commit Message

Paul Eggleton Sept. 4, 2017, 9:03 a.m.
When the UI disconnects, we can throw away any server-side remote
datastores we created in response to calls from the UI, and we *must*
drop everything in extraconfigdata or it will taint any future
operations.

Dropping extraconfigdata upon disconnect fixes taskhash mismatch errors
when running devtool.DevtoolTests.test_devtool_update_recipe_local_files
within oe-selftest with BB_SERVER_TIMEOUT=100 in OpenEmbedded.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 lib/bb/command.py | 3 +++
 lib/bb/cooker.py  | 2 ++
 2 files changed, 5 insertions(+)

Patch hide | download patch | download mbox

diff --git a/lib/bb/command.py b/lib/bb/command.py
index 0d0354c..67cc5ce 100644
--- a/lib/bb/command.py
+++ b/lib/bb/command.py
@@ -145,6 +145,9 @@  class Command:
         self.currentAsyncCommand = None
         self.cooker.finishcommand()
 
+    def reset(self):
+        self.remotedatastores = bb.remotedata.RemoteDatastores(cooker)
+
 def split_mc_pn(pn):
     if pn.startswith("multiconfig:"):
         _, mc, pn = pn.split(":", 2)
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index f5ae831..10cb8be 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -1616,6 +1616,8 @@  class BBCooker:
     def clientComplete(self):
         """Called when the client is done using the server"""
         self.finishcommand()
+        self.extraconfigdata = {}
+        self.command.reset()
         self.databuilder.reset()
         self.data = self.databuilder.data
 

Comments

Paul Eggleton Sept. 4, 2017, 9:42 p.m.
On Monday, 4 September 2017 9:03:11 PM NZST Paul Eggleton wrote:
> +    def reset(self):
> +        self.remotedatastores = bb.remotedata.RemoteDatastores(cooker)
> +

Oops, that should have been self.cooker - I only noticed when I happened to 
look at bitbake-cookerdaemon.log. I've re-pushed the branch with that fixed.

Cheers,
Paul