| Summary: | Toaster builds fail at the rootfs stage | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] Toaster | Reporter: | Belen Barros Pena <belen.barros.pena> |
| Component: | toaster | Assignee: | Ed Bartosh <eduard.bartosh> |
| Status: | VERIFIED FIXED | QA Contact: | Alexandru Roman <alexandru.costinx.roman> |
| Severity: | normal | ||
| Priority: | High | CC: | alexandru.costinx.roman, belen.barros.pena, brian.avery, jessica.zhang, richard.purdie, stanciux.mihail |
| Version: | 2.0 | ||
| Target Milestone: | 2.1 M2 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Belen Barros Pena
2016-01-12 14:51:42 UTC
The problem is that toaster sets IMAGEFS_TYPES into the server/cooker with setVariable, however when workers are spawned as new processes, they don't get this updated variable and see the original value. This means that there is inconsistency between the cooker/server and the workers and the workers then complain that the task doesn't exist. The change that triggers this is that the tasks are created by anonymous python code which processes IMAGE_FSTYPES now. If the value isn't in IMAGE_FSTYPES, the task doesn't exist. Just to illustrate/confirm the problem and how it can be worked around, this patch does 'resolve' the issue:
diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker
index 3df783b..8340d42 100755
--- a/bitbake/bin/bitbake-worker
+++ b/bitbake/bin/bitbake-worker
@@ -202,6 +202,7 @@ def fork_off_task(worker, cfg, data, workerdata, fn, task, taskname, appends, ta
data.setVar("BUILDNAME", workerdata["buildname"])
data.setVar("DATE", workerdata["date"])
data.setVar("TIME", workerdata["time"])
+ data.setVar("IMAGE_FSTYPES", workerdata["imagefstypes"])
bb.parse.siggen.set_taskdata(workerdata["sigdata"])
ret = 0
try:
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index f78a3b1..a647e7e 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -910,6 +910,7 @@ class RunQueue:
"buildname" : self.cfgData.getVar("BUILDNAME", True),
"date" : self.cfgData.getVar("DATE", True),
"time" : self.cfgData.getVar("TIME", True),
+ "imagefstypes" : self.cfgData.getVar("IMAGE_FSTYPES", True),
}
worker.stdin.write("<cookerconfig>" + pickle.dumps(self.cooker.configuration) + "</cookerconfig>")
Sadly there is a more fundamental issue in toaster that really needs to get fixed there though and bitbake shouldn't have to special case IMAGE_FSTYPES.
Does it mean that Toaster should set variables two ways - by using setVariable call(for cooker) and by writing them into configuration file(for worker)? (In reply to comment #3) > Does it mean that Toaster should set variables two ways - by using > setVariable call(for cooker) and by writing them into configuration file(for > worker)? If you set the variables into the configuration files, wouldn't bitbake pick those up in both cooker and worker? I prefer the configuration files. That way, I can rerun a toaster build from the command line if I'd like to. That ability is part of the reason I wanted the command line and toaster ui approach to coexist :) Started to work on this. Belen, can you try if code in the ed/toaster/builds-fail-at-the-rootfs-stage-8910 fixes this? (In reply to comment #7) > Belen, can you try if code in the > ed/toaster/builds-fail-at-the-rootfs-stage-8910 fixes this? A build of core-image-minimal completed without problems with this branch. So it seems to be working for me. Thanks! Belén Sent patch for review to toaster ml: https://lists.yoctoproject.org/pipermail/toaster/2016-January/003701.html The fix got merged into bitbake master: http://cgit.openembedded.org/bitbake/commit/?id=3c2c269dbbbd9a56bd1d0cb4de676baaf3b7ce88 Verified on master: 3d2c0f5902cacf9d8544bf263b51ef0dd1a7218c |