Mask NetworkManager-wait-online.service during boot#14272
Mask NetworkManager-wait-online.service during boot#14272benhillis merged 3 commits intomicrosoft:masterfrom
Conversation
Fixes microsoft#13772. Similar to PR microsoft#13611, this masks NetworkManager-wait-online.service to prevent 60-second timeouts during boot since WSL interfaces are unmanaged by NetworkManager. Also added the service to the discouraged units list in validate-modern.py and added a unit test.
|
@microsoft-github-policy-service agree |
There was a problem hiding this comment.
Pull request overview
This PR addresses issue #13772 by masking the NetworkManager-wait-online.service during WSL boot to prevent 60-second timeouts. This follows the same pattern established in PR #13611 for systemd-networkd-wait-online.service. The service times out because WSL network interfaces are unmanaged by NetworkManager, causing the service to wait indefinitely for an event that never occurs.
Changes:
- Masks NetworkManager-wait-online.service by creating a symlink to /dev/null during systemd unit generation
- Adds unit test to verify the service is properly masked
- Adds the service to the discouraged units list in distribution validation
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/linux/init/init.cpp | Adds symlink creation to mask NetworkManager-wait-online.service, following the same pattern as systemd-networkd-wait-online.service |
| test/windows/UnitTests.cpp | Adds test to verify NetworkManager-wait-online.service is masked, mirroring the existing test for systemd-networkd-wait-online.service |
| distributions/validate-modern.py | Adds NetworkManager-wait-online.service to the DISCOURAGED_SYSTEM_UNITS list for distribution validation |
|
This looks good to me, thanks for making the change! |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
D:\a_work\1\s\test\windows\UnitTests.cpp(222,22): error C2374: '': redefinition; multiple initialization [D:\a_work\1\s\test\windows\wsltests.vcxproj] D:\a_work\1\s\test\windows\UnitTests.cpp(222,22): error C2386: '_': a symbol with this name already exists in the current scope [D:\a_work\1\s\test\windows\wsltests.vcxproj] |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Summary of the Pull Request
Fixes #13772. Similar to PR #13611, this masks NetworkManager-wait-online.service to prevent 60-second timeouts during boot since WSL interfaces are unmanaged by NetworkManager. Also added the service to the discouraged units list in validate-modern.py and added a unit test.
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed