Bug 1211677 - systemctl reload-or-restart network.service appears to do nothing with NetworkManager active
Summary: systemctl reload-or-restart network.service appears to do nothing with Networ...
Status: RESOLVED INVALID
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Network (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Jonathan Kang
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-24 09:57 UTC by Richard Palethorpe
Modified: 2024-07-01 06:09 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Palethorpe 2023-05-24 09:57:20 UTC
When Wicked is active systemctl [reload-or-]restart network.service causes the DHCP leases to be renewed. It also appears to wait for this to happen.

The result being that we can reliably modify the hostname and propagate the change up to the local DNS server using dynamic DNS over DHCP. This is used in OpenQA. For reference see this workaround PR: 

https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/17135

Presently when NetworkManager is active we use some nmcli commands directly to get the same effect (see above PR, idk if this is the best way). It's not clear what effect systemctl restart has if any.

My expectation would be that restarting network.service has approximately the same effect regardless of the underlying daemon. Intuitively restarting the network service should also completely flush all network config.
Comment 1 Richard Palethorpe 2023-05-29 08:58:32 UTC
FYI 'nmcli network off' caused an unwanted side effect in KDE: https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/17170
Comment 2 Chenzi Cao 2023-08-07 08:24:29 UTC
Hi Songchuan, would you please help to take a look at this issue? Please feel free to reassign whenever necessary, thanks.
Comment 3 Jonathan Kang 2023-09-15 05:47:32 UTC
(In reply to Richard Palethorpe from comment #0)
> My expectation would be that restarting network.service has approximately
> the same effect regardless of the underlying daemon. Intuitively restarting
> the network service should also completely flush all network config.

Stopping NetworkManager won't take down network interfaces. This is intended by NetworkManager. So simply restarting NetworkManager.serivce doesn't flush network configurations.

You can also try `nmcli connection down $conn-id ; nmcli connection up $conn-id`.
Comment 4 Jonathan Kang 2024-07-01 06:09:19 UTC
Closing this as explained in comment#3.