Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemd: make enablement of n-m-wait-online.service follow n-m.service #76

Closed
wants to merge 1 commit into from

Conversation

sourcejedi
Copy link
Contributor

This is the approach used by systemd-networkd. So I believe it is safe, but I haven't tested this. You might consider this as a bug report, and if you are unable to accept it without me testing it, I can open an issue for it in the correct place.

I don't understand the logic that caused systemd-networkd to make the change -
systemd/systemd@9e49656

Instead, I am suggesting it for consistency, and because it seems to me this is the exact correct behaviour.

Because if you enable NetworkManager, and rely on it to configure your network devices, then network mounts will not start correctly at boot time unless you also enable NetworkManager-wait-online.service.

Enabling NetworkManager-wait-online.service does not cause unnecessary serialization of the boot process; it is only pulled in if something else (like a network mount) pulls in network-online.target.

I am suggesting this in response to reading this user support request: https://unix.stackexchange.com/questions/429604/fstab-not-automatically-mounting-smb-storage

This is the approach used by systemd-networkd.  So I believe it is safe, but I haven't tested this.  You might consider this as a bug report, and if you are unable to accept it without me testing it, I can open an issue for it in the correct place.

I don't understand the logic that caused systemd-networkd to make the change -
systemd/systemd@9e49656

Instead, I am suggesting it for consistency, and because it seems to me this is the exact correct behaviour.

Because if you enable NetworkManager, and rely on it to configure your network devices, then network mounts will not start correctly at boot time unless you also enable NetworkManager-wait-online.service.

Enabling NetworkManager-wait-online.service does not cause unnecessary serialization of the boot process; it is only pulled in if something else (like a network mount) pulls in network-online.target.

I am suggesting this in response to reading this user support request: https://unix.stackexchange.com/questions/429604/fstab-not-automatically-mounting-smb-storage
@vhumpa
Copy link
Collaborator

vhumpa commented Mar 11, 2018

NM CI: Please confirm test execution over this PR. Comment .ok\W+to\W+test. to confirm and/or .add\W+to\W+whitelist. to add the PR author in whitelist for future.

@thom311
Copy link
Member

thom311 commented Mar 12, 2018

Originally, NM installed a symlink /usr/lib/systemd/system/network-online.target.wants/NetworkManager-wait-online.service. This had the downside, that network-online.target would always pull in NM-w-o.service. It was impossible to actually disable it, the user could only mask NM-w-o.service, which lead to a warning at boot. This was fixed by d61eaf2 where we required that NM-w-o.service was instead enabled via presets. This also required workaround 513d0c2 during package update (rh1455704).

I think above change was an improvement. We did the change in response to the bug report by @keszybz. Time-wise, the networkd change systemd/systemd@9e49656 pre-dates our adjustment, so I don't understand why rh1455704 cam up with the current form for NetworkManager, although at that time networkd already did something different at that time with rh1433459. Anybody know? The patch seems reasonable to me.

@keszybz
Copy link

keszybz commented Mar 12, 2018

I don't understand why rh1455704 cam up with the current form for NetworkManager

I'm not quite sure either. Let's just say that the understanding how this should be done evolved over time.

Patch looks good to me. We should also drop this line:
/usr/lib/systemd/system-preset/90-default.preset:disable systemd-networkd-wait-online.service

But only after this patch has been merged and released.

@bengal
Copy link
Contributor

bengal commented Mar 14, 2018

The patch looks good to me.

@thom311
Copy link
Member

thom311 commented Mar 14, 2018

merged as 167e42a.

Minor note: @sourcejedi it is better phrase the commit message describing what the commit does; instead of phrasing it like asking for discussion. The discussion bits better fit to the pull request here. I reworded your commit message a bit for that.

Thanks!

@thom311 thom311 closed this Mar 14, 2018
@sourcejedi sourcejedi deleted the patch-2 branch March 14, 2018 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants