| Summary: | Useradd command fails after 10 retries | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] BitBake | Reporter: | Yi Zhao <yi.zhao> |
| Component: | bitbake | Assignee: | Scott Garman <scott.a.garman> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | High | CC: | jessica.zhang, jiajun.xu, liang.li2, poky.bs.watcher, poky.watcher, scott.a.garman, sgw, zhenfeng.zhao |
| Version: | unspecified | ||
| Target Milestone: | 1.2 M4 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | (1.2) 2012-04-10: 0% implemented, running debuging tests | ||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | --- | |
|
Description
Yi Zhao
2012-04-01 02:24:59 UTC
This failure is apparently a nondeterministic error that is appearing randomly. The useradd class now uses code which checks that the user account or group account was created in the passwd and group files, respectively. If the account was not created (which is verified via a grep command), the script sleeps for 1 second and tries again, up to 10 times. This is intended to avoid lockfile races, as useradd and groupadd lock the passwd and group files when creating accounts. I'll take this bug, I have the most familiarity with the code. The root cause of this bug is that, despite efforts to ensure base-passwd and (if needed) shadow packages get installed first, they are actually not. I've found that the do_rootfs logs for the final image when this bug occur show the useradd retry failure up until the point that the shadow package is installed. After that fact, any package installations that need to call useradd will succeed. Further research is ongoing to discover why shadow is not being installed by RPM earlier in the rootfs generation process. Richard fixed this in oe-core and poky master as of: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=0923ee40ae59133c91a95e0727eb1ab95aca13b8 Verified with 1.2 rc3. Tree/branch: poky/1.2_M4 Commit: fae1c7a5fdcea199338b5f91efaafd7c72aec5dd |