Work around Juju unit error after reboot by awaiting symlink recreation#1373
Open
fnordahl wants to merge 1 commit into
Open
Work around Juju unit error after reboot by awaiting symlink recreation#1373fnordahl wants to merge 1 commit into
fnordahl wants to merge 1 commit into
Conversation
After enable_hugepages_vfio_on_hvs_in_vms reboots a VM, Juju may still be recreating symlinks for unit tools when the first config-changed hook fires, causing the unit to enter an error state (LP: #2077936). Add a _wait_for_juju_symlinks_after_reboot method that monitors /var/log/juju/machine-*.log for both the Reboot and symlink recreation messages before allowing execution to continue. This is called after enable_hugepages returns from rebooting, both on the success and error-recovery paths. Assisted-by: GLM-5.1, opencode Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com>
4932ce3 to
76eee49
Compare
fnordahl
added a commit
to fnordahl/ovn-charms-v1
that referenced
this pull request
Jun 12, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to fnordahl/ovn-charms-v1
that referenced
this pull request
Jun 12, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to fnordahl/ovn-charms-v1
that referenced
this pull request
Jun 12, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to fnordahl/ovn-charms-v1
that referenced
this pull request
Jun 12, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to fnordahl/ovn-charms-v1
that referenced
this pull request
Jun 12, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to fnordahl/ovn-charms-v1
that referenced
this pull request
Jun 12, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to fnordahl/ovn-charms-v1
that referenced
this pull request
Jun 12, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to fnordahl/ovn-charms-v1
that referenced
this pull request
Jun 12, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to fnordahl/ovn-charms-v1
that referenced
this pull request
Jun 12, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to fnordahl/ovn-charms-v1
that referenced
this pull request
Jun 12, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to fnordahl/ovn-charms-v1
that referenced
this pull request
Jun 12, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to fnordahl/ovn-charms-v1
that referenced
this pull request
Jun 12, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to fnordahl/ovn-charms-v1
that referenced
this pull request
Jun 12, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to fnordahl/ovn-charms-v1
that referenced
this pull request
Jun 12, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to fnordahl/ovn-charms-v1
that referenced
this pull request
Jun 12, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to fnordahl/ovn-charms-v1
that referenced
this pull request
Jun 12, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to fnordahl/ovn-charms-v1
that referenced
this pull request
Jun 12, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to fnordahl/ovn-charms-v1
that referenced
this pull request
Jun 12, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to fnordahl/ovn-charms-v1
that referenced
this pull request
Jun 12, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to fnordahl/ovn-charms-v1
that referenced
this pull request
Jun 12, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to fnordahl/ovn-charms-v1
that referenced
this pull request
Jun 12, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to fnordahl/ovn-charms-v1
that referenced
this pull request
Jun 12, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to fnordahl/ovn-charms-v1
that referenced
this pull request
Jun 12, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to fnordahl/ovn-charms-v1
that referenced
this pull request
Jun 12, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to fnordahl/ovn-charms-v1
that referenced
this pull request
Jun 12, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to fnordahl/ovn-charms-v1
that referenced
this pull request
Jun 12, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to fnordahl/ovn-charms-v1
that referenced
this pull request
Jun 12, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to fnordahl/ovn-charms-v1
that referenced
this pull request
Jun 12, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to canonical/ovn-charms-v1
that referenced
this pull request
Jun 17, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to canonical/ovn-charms-v1
that referenced
this pull request
Jun 18, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to canonical/ovn-charms-v1
that referenced
this pull request
Jun 18, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
fnordahl
added a commit
to canonical/ovn-charms-v1
that referenced
this pull request
Jun 18, 2026
Func-test-pr: openstack-charmers/zaza-openstack-tests#1373 Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com> (cherry picked from commit 8f167a0)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After enable_hugepages_vfio_on_hvs_in_vms reboots a VM, Juju may still be recreating symlinks for unit tools when the first config-changed hook fires, causing the unit to enter an error state (LP: #2077936).
Add a _wait_for_juju_symlinks_after_reboot method that monitors /var/log/juju/machine-*.log for both the Reboot and symlink recreation messages before allowing execution to continue. This is called after enable_hugepages returns from rebooting, both on the success and error-recovery paths.
Assisted-by: GLM-5.1, opencode