]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/orch: shorten container_id (hash) in cephadm, not orch ps
authorSage Weil <sage@redhat.com>
Tue, 10 Mar 2020 22:56:30 +0000 (18:56 -0400)
committerSage Weil <sage@redhat.com>
Thu, 12 Mar 2020 21:10:35 +0000 (17:10 -0400)
This lets us present a longer, human-readable id for rook.

Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/cephadm/module.py
src/pybind/mgr/orchestrator/module.py

index 5d20c393e74d003c3df2ee3c89a6d4723b4b79cd..5b73438c250bf5e7339aaf15318d0aed94688eb8 100644 (file)
@@ -1639,6 +1639,9 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule):
             sd.daemon_id = '.'.join(d['name'].split('.')[1:])
             sd.hostname = host
             sd.container_id = d.get('container_id')
+            if sd.container_id:
+                # shorten the hash
+                sd.container_id = sd.container_id[0:12]
             sd.container_image_name = d.get('container_image_name')
             sd.container_image_id = d.get('container_image_id')
             sd.version = d.get('version')
index 7dcbb2289439e6387c70a6e13f2545c6da94ca61..7c459de0cc937d7903dda013674c4e68a2d2e95f 100644 (file)
@@ -423,7 +423,7 @@ class OrchestratorCli(OrchestratorClientMixin, MgrModule):
                     ukn(s.version),
                     ukn(s.container_image_name),
                     ukn(s.container_image_id)[0:12],
-                    ukn(s.container_id)[0:12]))
+                    ukn(s.container_id)))
 
             return HandleCommandResult(stdout=table.get_string())