-
Notifications
You must be signed in to change notification settings - Fork 208
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
Do not execute generator during daemon-reload (LP: #2090848) #529
base: main
Are you sure you want to change the base?
Conversation
As intended when originally implemented the netplan generator.stamp is supposed to avoid re-generating all of the Netplan configuration during 'systemd daemon-reload'. The stamp has originally been placed in /run/systemd/generator/, which is nowadays cleaned during 'daemon-reload', leading to Netplan regenerating its configuration during each such call. Let's move the stamp file into /run/netplan/generator.stamp instead to avoid that. Triggering the Netplan generator only at reboot, or when called explicitly. Original intend: d2a45b3
@@ -409,6 +410,7 @@ def test_systemd_generator_escaping(self): | |||
|
|||
# after removing the stamp it generates again, and not trip over the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh the test above was passing because we don't call it through a daemon-reload
As the lxd-network-manager CI shows, the NetworkManager-Netplan integration seem to rely on the re-generation of Netplan config during |
oohh right, that's true. Because it calls "generate" and NM capabilities are limited, it can't do things such as changing files owners... it only works because it does a daemon-reload... oofff |
Adding |
Description
As intended when originally implemented the netplan generator.stamp is supposed to avoid re-generating all of the Netplan configuration during 'systemd daemon-reload'.
The stamp has originally been placed in /run/systemd/generator/, which is nowadays cleaned during 'daemon-reload', leading to Netplan regenerating its configuration during each such call.
Let's move the stamp file into /run/netplan/generator.stamp instead to avoid that. Triggering the Netplan generator only at reboot, or when called explicitly.
Original intend: d2a45b3
Checklist
make check
successfully.make check-coverage
).