Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#56952 - [lxc] lxc-net.service reads 'After=network-online.target' instead of 'After=network.target'

Attached to Project: Community Packages
Opened by Serede (Serede) - Thursday, 04 January 2018, 18:24 GMT
Last edited by Doug Newgard (Scimmia) - Thursday, 04 January 2018, 19:45 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
The systemd unit file lxc-net.service reads 'After=network-online.target' instead of 'After=network.target' and is therefore not started in the correct order.
This leads to network problems when running a container systemd unit (lxc@.service) that uses the bridge network interface provided by lxc-net (lxcbr0 by default).

Additional info:
* package version(s)
lxc 1:2.1.1-1
networkmanager 1.10.2-1
* config and/or log files etc.
Using NetworkManager-wait-online.service.

Steps to reproduce:
1. Set up a LXC container with a veth interface bridged to lxc-net.
2. Enable lxc-net.service.
3. Enable the container systemd unit (lxc@container_name.service).
4. Reboot.
5. LXC container network will stay unreachable until lxc-net and container are both restarted.

Fix:
Setting "After=network.target" in lxc-net.service corrects the aforementioned misbehaviour.
This task depends upon

Closed by  Doug Newgard (Scimmia)
Thursday, 04 January 2018, 19:45 GMT
Reason for closing:  Upstream
Comment by Doug Newgard (Scimmia) - Thursday, 04 January 2018, 18:42 GMT
And why is network-online incorrect? It seems logically correct to me and this is the service file upstream provides.
Comment by Serede (Serede) - Thursday, 04 January 2018, 18:50 GMT
In this case all the logic in the systemd critical chain seems to work with network.target and not network-online.target. As I said, systemd-analize revealed lxc-net.service was being run before network.target until I explicitly set "After=network.target" in a unit override file.
Comment by Doug Newgard (Scimmia) - Thursday, 04 January 2018, 19:28 GMT
Then you have something wrong, since network-online.target as provided by systemd is ordered after network.target.
Comment by Serede (Serede) - Thursday, 04 January 2018, 19:38 GMT
There's nothing wrong. I just double checked and it only works with network.target explicitly. It could also be a bug related to NetworkManager in this particular scenario.
Comment by Doug Newgard (Scimmia) - Thursday, 04 January 2018, 19:45 GMT
Again, network-online.target is specifically "After=network.target". Look at the unit.

Either way, the file you're complaining about comes from upstream.

Loading...