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

[Bug]: NetworkManager-wait-online.service not enabled when NM used - means services that require working network start prematurely and fail #7896

Open
1 of 2 tasks
daniel-ayers opened this issue Feb 28, 2025 · 4 comments
Labels
Bug Something isn't working as it should Good first issue Feel free to contribute :)

Comments

@daniel-ayers
Copy link

daniel-ayers commented Feb 28, 2025

What happened?

I have observed this issue running Armbian v25.2.1 for Tinker Board running Armbian Linux 6.12.16-current-rockchip (Ubuntu noble server image).

This image uses NetworkManager for network config. When NM is used the NetworkManager-wait-online.service must be enabled so that network-online.target is not reached until NetworkManager has brought up all the interfaces. Service units that require the network to be up before starting rely on network-online.target working correctly otherwise they will likely fail on boot (which is the problem I observed).

See the systemd documentation, in particular the first two FAQs.

I encountered this problem when trying to set up a dhcp server, using the isc-dhcpd-server package. I correctly configured the dhcp server, enabled its unit and restarted it. It worked. However when I rebooted the Pi the dhcp server failed to start claiming "there was no subnet definition for end0". I figured out that this was because at the time isc-dhcp-server was starting the network had not yet come up, so dhcpd could not obtain the IP address & netmask for the interface to match with the subnet definition in the config file.

Reading the systemd documentation (linked above) I ran the suggested command to see if the wait services were enabled:

$ systemctl is-enabled NetworkManager-wait-online.service systemd-networkd-wait-online.service
disabled
disabled

This reveals that NetworkManager-wait-online.service is disabled, when it should be enabled when NM is used to configure the network.

I enabled NetworkManager-wait-online.service and then rebooted. The dhcp server started correctly.

How to reproduce?

In a running Armbian system execute the following command (from the systemd documentation) and verify that the correct wait unit (depending on how network configuration is done in the image) is enabled:

$ systemctl is-enabled NetworkManager-wait-online.service systemd-networkd-wait-online.service
enabled
disabled

Branch

main (main development branch)

On which host OS are you running the build script and observing this problem?

Other

Are you building on Windows WSL2?

  • Yes, my Ubuntu/Debian/OtherOS is running on WSL2

Relevant log URL

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@daniel-ayers daniel-ayers added the Bug Something isn't working as it should label Feb 28, 2025
Copy link
Contributor

Hey @daniel-ayers !

Looks like it's your first time interacting with Armbian here on GitHub.

Welcome and thank you for taking the time to report an issue ❤️.

Don't forget to star ⭐ the repo.

@github-actions github-actions bot added the Good first issue Feel free to contribute :) label Feb 28, 2025
Copy link
Contributor

github-actions bot commented Feb 28, 2025

Jira ticket: AR-2622

@rpardini
Copy link
Member

rpardini commented Mar 1, 2025

Hey @daniel-ayers, having fought the -wait-online stuff for years, while I see your point clearly, enabling it by default will cause hangs during boot for people without an ethernet connection. Specially on the first boot, we don't wanna hang on boot. Also there's many folks on wifi only.

I do think there's a good opportunity to (ask to?) enable it during the first-run "wizard". wdyt?

@igorpecovnik
Copy link
Member

Probably somewhere after this?
https://github.com/armbian/build/blob/main/packages/bsp/common/usr/lib/armbian/armbian-firstlogin#L793

conditions:

  • connected wired network
  • network manager stack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working as it should Good first issue Feel free to contribute :)
Development

No branches or pull requests

3 participants