| Summary: | Toaster container solution should be extended to run on windows (and mac) | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] Toaster | Reporter: | brian avery <brian.avery> |
| Component: | toaster | Assignee: | Randy Witt <randy.e.witt> |
| Status: | RESOLVED FIXED | QA Contact: | Libertad <libertad.gonzalez.de.la.cruz> |
| Severity: | normal | ||
| Priority: | Medium+ | CC: | belen.barros.pena, jessica.zhang, joshuagloe, randy.e.witt, stanciux.mihail, stephano |
| Version: | 2.2 | ||
| Target Milestone: | 2.2 M4 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Yes (doc changes required) | |
|
Description
brian avery
2016-06-16 21:56:10 UTC
The usersetup has issues if the container has stopped and you need to restart it. This happens when you need to restart docker after a reboot, for instance.
The docker log:
subprocess.CalledProcessError: Command '['sudo', 'restrict_useradd.sh', '1000', 'toasteruser']' returned non-zero exit status 9
useradd: user 'toasteruser' already exists
Traceback (most recent call last):
File "/usr/bin/usersetup.py", line 51, in <module>
subprocess.check_call(cmd.split(), stdout=sys.stdout, stderr=sys.stderr)
File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', 'restrict_useradd.sh', '1000', 'toasteruser']' returned non-zero exit status 9
you can solve this with a linked persistent data container and a docker compose file. I've successfully run a complete toaster build on the Mac with this approach. Ah-ha, a persistent data container. I'd not heard of it but was surprised that there didn't seem to be something like it. FYI, for whomever is implementing the solution, docs are: https://docs.docker.com/engine/tutorials/dockervolumes/ Do we want to keep each of TMPDIR, SSTATE_DIR and DL_DIR persistent? I think it might make sense to have more than one persistent data store, one for the shareable artefacts (DL_DIR and SSTATE_DIR) and one for the temporary files and build output (TMP_DIR). If we choose not to persist TMPDIR it may make sense to keep DEPLOY_DIR on a persistent data container. (In reply to comment #3) > Ah-ha, a persistent data container. I'd not heard of it but was surprised > that there didn't seem to be something like it. > > FYI, for whomever is implementing the solution, docs are: > > https://docs.docker.com/engine/tutorials/dockervolumes/ > > Do we want to keep each of TMPDIR, SSTATE_DIR and DL_DIR persistent? I think > it might make sense to have more than one persistent data store, one for the > shareable artefacts (DL_DIR and SSTATE_DIR) and one for the temporary files > and build output (TMP_DIR). > > If we choose not to persist TMPDIR it may make sense to keep DEPLOY_DIR on a > persistent data container. Initially the idea is that *everything* is going to be in the same persistent data container. This is so that it can follow the same model of the current container https://github.com/crops/toaster-container. The idea is to start with the simplicity of everything being in the same data container, and we can extend it later if necessary. With the instructions at https://github.com/crops/docker-win-mac-docs/wiki this can be considered finished. |