Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion netplan_cli/cli/commands/apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,13 @@ def command_apply(self, run_generate=True, sync=False, exit_on_error=True, state
stderr=subprocess.DEVNULL)

subprocess.check_call(['udevadm', 'control', '--reload'])
subprocess.check_call(['udevadm', 'trigger', '--action=move', '--subsystem-match=net', '--settle'])

try:
subprocess.check_call(['udevadm', 'trigger', '--action=move', '--subsystem-match=net', '--settle'])
except subprocess.CalledProcessError as e:
# udevadm trigger returns 1 if it cannot trigger devices since
# systemd v248, e.g. in containers (LP: #2095203)
logging.warning('Ignoring device trigger error: {}'.format(e))

# apply any SR-IOV related changes, if applicable
NetplanApply.process_sriov_config(config_manager, exit_on_error)
Expand Down
Loading