]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: infer latest image with a valid tag 36797/head
authorMichael Fritch <mfritch@suse.com>
Tue, 25 Aug 2020 13:55:08 +0000 (07:55 -0600)
committerMichael Fritch <mfritch@suse.com>
Tue, 25 Aug 2020 14:29:23 +0000 (08:29 -0600)
Fixes: https://tracker.ceph.com/issues/47134
Signed-off-by: Michael Fritch <mfritch@suse.com>
src/cephadm/cephadm

index 07e3e9df73bd4a59475c00a53031329a9db72a43..729da37446a6aa96526932aeb475811d601d1f60 100755 (executable)
@@ -1225,12 +1225,12 @@ def get_last_local_ceph_image():
         [container_path, 'images',
          '--filter', 'label=ceph=True',
          '--format', '{{.Repository}} {{.Tag}}'])
-    out_lines = out.splitlines()
-    if len(out_lines) > 0:
-        repository, tag = out_lines[0].split()
-        r = '{}:{}'.format(repository, tag)
-        logger.info('Using recent ceph image %s' % r)
-        return r
+    for line in out.splitlines():
+        if len(line.split()) == 2:
+            repository, tag = line.split()
+            r = '{}:{}'.format(repository, tag)
+            logger.info('Using recent ceph image %s' % r)
+            return r
     return None