Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

slyon
Copy link
Collaborator

@slyon slyon commented Dec 2, 2024

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

  • Runs make check successfully.
  • Retains code coverage (make check-coverage).
  • New/changed keys in YAML format are documented.
  • (Optional) Adds example YAML for new feature.
  • (Optional) Closes an open bug in Launchpad. LP#2090848

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
@slyon slyon requested a review from daniloegea December 2, 2024 15:53
@daniloegea
Copy link
Collaborator

@slyon slyon changed the title Do not execute generator during daemon-reload Do not execute generator during daemon-reload (LP: #2090848) Dec 2, 2024
@@ -409,6 +410,7 @@ def test_systemd_generator_escaping(self):

# after removing the stamp it generates again, and not trip over the
Copy link
Collaborator

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

@slyon
Copy link
Collaborator Author

slyon commented Dec 3, 2024

As the lxd-network-manager CI shows, the NetworkManager-Netplan integration seem to rely on the re-generation of Netplan config during daemon-reload, which probably needs to be fixed first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants