]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/cephadm: fix undefined vairable 'd' in upgrade code
authorAdam King <adking@redhat.com>
Tue, 19 May 2026 16:15:02 +0000 (12:15 -0400)
committerPatrick Donnelly <pdonnell@ibm.com>
Fri, 22 May 2026 13:47:12 +0000 (09:47 -0400)
In the original upstream patch
https://github.com/ceph/ceph/commit/4a0cdc03631e2ba14f62f0e3fa17aa5fbf854622
the rotation of the keyrings existed within a loop
where 'd' was each daemon we were looking at. Changes
to support uupgrading in parallel made that loop
no longer exist, but we need to add it back for
the key rotation

Signed-off-by: Adam King <adking@redhat.com>
Change-Id: 3650e449-1c3d-4e25-af55-3dc9f2392653

src/pybind/mgr/cephadm/upgrade.py

index 01bd91e5920bec6ab592e9575844c91338fb8e09..f6b1636453b95ae3676ab7d106499dcf53a02611 100644 (file)
@@ -1575,7 +1575,8 @@ class CephadmUpgrade:
                 logger.info('Upgrade: Updating %s.%s' %
                             (d.daemon_type, d.daemon_id))
 
-            daemon_spec = CephadmDaemonDeploySpec.from_daemon_description(d)
+        for d in to_upgrade:
+            daemon_spec = CephadmDaemonDeploySpec.from_daemon_description(d[0])
 
             try:
                 if daemon_spec.daemon_type in ['mds', 'osd']:
@@ -1584,10 +1585,10 @@ class CephadmUpgrade:
             except Exception as e:
                 self._fail_upgrade('UPGRADE_KEY_ROTATION', {
                     'severity': 'warning',
-                    'summary': f'Rotation of cephx key for daemon {d.name()} on host {d.hostname} failed.',
+                    'summary': f'Rotation of cephx key for daemon {d[0].name()} on host {d[0].hostname} failed.',
                     'count': 1,
                     'detail': [
-                        f'Upgrade daemon key rotation: {d.name()}: {e}'
+                        f'Upgrade daemon key rotation: {d[0].name()}: {e}'
                     ],
                 })
                 return