Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1343243
Summary: | lxc-net.service is not started during boot because of missing /etc/resolv.conf | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Andrej <adundovi> |
Component: | lxc | Assignee: | Thomas Moschny <thomas.moschny> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 24 | CC: | karlthered, pokorra.mailinglists, sagarun, thomas.moschny |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | lxc-2.0.6-2.fc25 lxc-2.0.6-2.fc24 lxc-2.0.6-2.fc23 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-12-13 20:27:19 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Andrej
2016-06-06 22:28:35 UTC
I would also note that the machine where I encounter this issue is a laptop which usually acquire network connection after I log in. Working workaround is to put "NetworkManager.service" as a dependency in lxc-net.service: [Unit] After=network-online.target NetworkManager.service Then it works as expected. In theory, having After=network-online.target should already be enough, to ensure (as the name says) that the network is online. But (afaict) network-online.target currently only works reliably if systemd-networkd is used. On the other hand, depending on NetworkManager as you proposed is also not an option, as not everyone is using NM. So, this is something we cannot fix in lxc. Someone has to repair the network-online.target for NM. Can you please explain more what would be expected behaviour of network-online for this case so that I can open a new bug report? So, network-online depends on, and is scheduled after NetworkManager-wait-online (reversely, by setting Before in NM-wait-online). The NM-wait-online service calls /usr/bin/nm-online -s --timeout 30, and the man page says for -s: "Wait for NetworkManager startup to complete, rather than waiting for network connectivity specifically." To me, this looks reasonable. However, there must be a reason it doesn't work for you. Is NetworkManager-wait-online enabled? Wait, I've read some of the systemd docs again. For network-online to have effect, we might need to add a Wants= dependency to lxc-net. Also, ignore my comment about NetworkManager-wait-online being enabled, that shouldn't be necessary. Could you try and see if adding Wants=network-online.target to the [Unit] section of lxc-net helps? Yep, that works. Thanks. Thus, this is my lxc-net.service: [Unit] Description=LXC network bridge setup Wants=network-online.target Before=lxc.service [Service] Type=oneshot RemainAfterExit=yes ExecStart=/usr/libexec/lxc/lxc-net start ExecStop=/usr/libexec/lxc/lxc-net stop [Install] WantedBy=multi-user.targe lxc-2.0.6-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-b4dd1db1e7 lxc-2.0.6-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-b4dd1db1e7 lxc-2.0.6-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-868350fe5a lxc-2.0.6-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-868350fe5a lxc-2.0.6-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-e5ff0ed40c lxc-2.0.6-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-e5ff0ed40c lxc-2.0.6-2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-868350fe5a lxc-2.0.6-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-e5ff0ed40c lxc-2.0.6-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-b4dd1db1e7 lxc-2.0.6-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report. lxc-2.0.6-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report. lxc-2.0.6-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report. |