]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cephadm: report image name for stopped daemons
authorSage Weil <sage@redhat.com>
Mon, 10 Feb 2020 18:02:28 +0000 (12:02 -0600)
committerSage Weil <sage@redhat.com>
Mon, 10 Feb 2020 18:04:16 +0000 (12:04 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/cephadm/cephadm

index 203cb7250a3d1fa9e82458075c141fc8d9a754a7..504630b13f62bae75cdfb21ed1e537beed980745 100755 (executable)
@@ -2292,6 +2292,13 @@ def list_daemons(detail=True, legacy_dir=None):
                             else:
                                 # FIXME: monitoring component version?
                                 pass
+                        else:
+                            vfile = os.path.join(data_dir, fsid, j, 'unit.image') # type: ignore
+                            try:
+                                with open(vfile, 'r') as f:
+                                    image_name = f.read().strip() or None
+                            except IOError:
+                                pass
                         i['container_id'] = container_id
                         i['container_image_name'] = image_name
                         i['container_image_id'] = image_id