From 6131e66bee15f3d64e9b45bd118fcd9e595bcf06 Mon Sep 17 00:00:00 2001 From: Alejandro Santoyo Date: Tue, 25 Nov 2025 11:20:14 +0100 Subject: [PATCH] Fix cephx key rotation race condition with Nova When new nova-compute units are added to Ceph-backed clouds, cephx keys are temporarily reverted back to the wrong (old) key value. This happens due to a race condition between the client hooks of nova-compute and ceph-mon. Details can be found in LP#2125295. This patch ensures that nova-compute sends the application name value early on to ensure the race condition does not occur. Closes-Bug: #2125295 Change-Id: Ibdd5ccdd6d26b5d72dd80ed54bd90b38d5c99ceb Signed-off-by: Alejandro Santoyo --- hooks/nova_compute_hooks.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hooks/nova_compute_hooks.py b/hooks/nova_compute_hooks.py index 4bb78058..5acb23ef 100755 --- a/hooks/nova_compute_hooks.py +++ b/hooks/nova_compute_hooks.py @@ -479,6 +479,9 @@ def ironic_api_changed(): @hooks.hook('ceph-relation-joined') @restart_on_change(restart_map()) def ceph_joined(): + # install old credentials first for backwards compatibility + send_application_name() + pkgs = filter_installed_packages(['ceph-common']) if pkgs: status_set('maintenance', 'Installing ceph-common package') @@ -486,8 +489,6 @@ def ceph_joined(): # Bug 1427660 if not is_unit_paused_set() and config('virt-type') in LIBVIRT_TYPES: service_restart(libvirt_daemon()) - # install old credentials first for backwards compatibility - send_application_name() def get_ceph_request():