mirror of
https://github.com/ceph/ceph
synced 2025-01-20 10:01:45 +00:00
Merge pull request #36797 from mgfritch/cephadm-infer-image-no-tag
cephadm: infer latest image with a valid tag Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com> Reviewed-by: Varsha Rao <varao@redhat.com>
This commit is contained in:
commit
63c7e27072
@ -1226,12 +1226,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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user