| Summary: | volatile-binds preventing systemd-resolved to work | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Andrea Galbusera <gizero> |
| Component: | core | Assignee: | Maxin B. John <maxin.john> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium+ | CC: | clopez, ismo.puustinen, kristian.amlie, meta.mr.watcher, meta.watcher, randy.macleod |
| Version: | unspecified | ||
| Target Milestone: | 2.4 M1 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | Please also backport to 2.3.1 | ||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Andrea Galbusera
2017-04-11 15:27:47 UTC
Maxin, can you take this one please? Similar failure in sysvinit as well (/etc/resolv.conf file exists, but it is empty) rm: cannot remove '/tmp': Read-only file system rm: cannot remove '/etc/resolv.conf': Read-only file system ln: failed to create symbolic link '/etc/resolv.conf': Read-only file system INIT: Entering runlevel: 5 We can provide a fix by creating a symlink from /run/systemd/resolve/resolv.conf to /etc/resolv.conf with "resolved" enabled in systemd. However, that breaks the images (eg: core-image-sato) where resolution is handled by connman: https://bugzilla.yoctoproject.org/show_bug.cgi?id=6700 The workaround for this bug was to disable "resolved" and "networkd" in systemd. +PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved" +PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd" For "read-only" filesystem, creating link from "/var/run/connman/resolv.conf", to "/etc/resolv.conf" fails.
# systemctl status systemd-tmpfiles-setup.service
[[0;1;31m●[[0m systemd-tmpfiles-setup.service - Create Volatile Files and Directories
Loaded: loaded (/lib/systemd/system/systemd-tmpfiles-setup.service; static; vendor preset: enabled)
Active: [[0;1;31mfailed[[0m (Result: exit-code) since Thu 2017-06-08 12:53:56 UTC; 36s ago
Docs: man:tmpfiles.d(5)
man:systemd-tmpfiles(8)
Process: 366 ExecStart=/bin/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev [[0;1;31m(code=exited, status=1/FAILURE)[[0m
Main PID: 366 (code=exited, status=1/FAILURE)
Jun 08 12:53:56 qemux86-64 systemd[1]: Starting Create Volatile Files and Directories...
Jun 08 12:53:56 qemux86-64 systemd-tmpfiles[366]: [[0;1;31msymlink(/var/run/connman/resolv.conf, /etc/resolv.conf) failed: Read-only file system[[0m
Jun 08 12:53:56 qemux86-64 systemd-tmpfiles[366]: [[0;1;39m"/var/log" already exists and is not a directory.[[0m
Jun 08 12:53:56 qemux86-64 systemd-tmpfiles[366]: [[0;1;39m"/var/tmp" already exists and is not a directory.[[0m
Jun 08 12:53:56 qemux86-64 systemd[1]: [[0;1;39msystemd-tmpfiles-setup.service: Main process exited, code=exited, status=1/FAILURE[[0m
Jun 08 12:53:56 qemux86-64 systemd[1]: [[0;1;31mFailed to start Create Volatile Files and Directories.[[0m
Jun 08 12:53:56 qemux86-64 systemd[1]: [[0;1;39msystemd-tmpfiles-setup.service: Unit entered failed state.[[0m
Jun 08 12:53:56 qemux86-64 systemd[1]: [[0;1;39msystemd-tmpfiles-setup.service: Failed with result 'exit-code'.[[0m
(In reply to comment #4) > For "read-only" filesystem, creating link from > "/var/run/connman/resolv.conf", to "/etc/resolv.conf" fails. > > > # systemctl status systemd-tmpfiles-setup.service > > [[0;1;31m●[[0m systemd-tmpfiles-setup.service - Create Volatile Files and > Directories > Loaded: loaded (/lib/systemd/system/systemd-tmpfiles-setup.service; > static; vendor preset: enabled) > Active: [[0;1;31mfailed[[0m (Result: exit-code) since Thu 2017-06-08 > 12:53:56 UTC; 36s ago > Docs: man:tmpfiles.d(5) > man:systemd-tmpfiles(8) > Process: 366 ExecStart=/bin/systemd-tmpfiles --create --remove --boot > --exclude-prefix=/dev [[0;1;31m(code=exited, status=1/FAILURE)[[0m > Main PID: 366 (code=exited, status=1/FAILURE) > > Jun 08 12:53:56 qemux86-64 systemd[1]: Starting Create Volatile Files and > Directories... > Jun 08 12:53:56 qemux86-64 systemd-tmpfiles[366]: > [[0;1;31msymlink(/var/run/connman/resolv.conf, /etc/resolv.conf) failed: > Read-only file system[[0m > Jun 08 12:53:56 qemux86-64 systemd-tmpfiles[366]: [[0;1;39m"/var/log" > already exists and is not a directory.[[0m > Jun 08 12:53:56 qemux86-64 systemd-tmpfiles[366]: [[0;1;39m"/var/tmp" > already exists and is not a directory.[[0m > Jun 08 12:53:56 qemux86-64 systemd[1]: > [[0;1;39msystemd-tmpfiles-setup.service: Main process exited, code=exited, > status=1/FAILURE[[0m > Jun 08 12:53:56 qemux86-64 systemd[1]: [[0;1;31mFailed to start Create > Volatile Files and Directories.[[0m > Jun 08 12:53:56 qemux86-64 systemd[1]: > [[0;1;39msystemd-tmpfiles-setup.service: Unit entered failed state.[[0m > Jun 08 12:53:56 qemux86-64 systemd[1]: > [[0;1;39msystemd-tmpfiles-setup.service: Failed with result 'exit-code'.[[0m placing a symlink to "/dev/null" in "/etc/tmpfiles.d/connman_resolvconf.conf" for read-only-rootfs fixes this one. Fix sent to oe-core: http://lists.openembedded.org/pipermail/openembedded-core/2017-June/137960.html I reproduced the original test case and can confirm the original issue is fixed by the above patch. Thanks! |