Skip to content

Commit 3f2b33d

Browse files
committed
apply: stop flushing addresses when NM is used
With the introduction of keep-configuration it shouldn't be necessary anymore.
1 parent f0f5d69 commit 3f2b33d

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

netplan_cli/cli/commands/apply.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,7 @@ def command_apply(self, run_generate=True, sync=False, exit_on_error=True, state
290290
# 2nd: start all other services
291291
utils.systemctl('start', netplan_wpa + netplan_ovs, sync=True)
292292
if restart_nm:
293-
# Flush all IP addresses of NM managed interfaces, to avoid NM creating
294-
# new, non netplan-* connection profiles, using the existing IPs.
295293
nm_interfaces = utils.nm_interfaces(restart_nm_glob, devices)
296-
for iface in nm_interfaces:
297-
utils.ip_addr_flush(iface)
298294
# clear NM state, especially the [device].managed=true config, as that might have been
299295
# re-set via an udev rule setting "NM_UNMANAGED=1"
300296
shutil.rmtree('/run/NetworkManager/devices', ignore_errors=True)

0 commit comments

Comments
 (0)