mirror of
https://github.com/ceph/ceph
synced 2025-01-02 17:12:31 +00:00
Merge pull request #32982 from krig/cephadm-fixes
cephadm: Read ceph version from io.ceph.version label if set Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
commit
068d72230d
@ -2224,18 +2224,19 @@ def list_daemons(detail=True, legacy_dir=None):
|
||||
out, err, code = call(
|
||||
[
|
||||
container_path, 'inspect',
|
||||
'--format', '{{.Id}},{{.Config.Image}},{{%s}}' % image_field,
|
||||
'--format', '{{.Id}},{{.Config.Image}},{{%s}},{{index .Config.Labels "io.ceph.version"}}' % image_field,
|
||||
'ceph-%s-%s' % (fsid, j)
|
||||
],
|
||||
verbose_on_failure=False)
|
||||
if not code:
|
||||
(container_id, image_name, image_id) = out.strip().split(',')
|
||||
(container_id, image_name, image_id, version) = out.strip().split(',')
|
||||
image_id = normalize_container_id(image_id)
|
||||
out, err, code = call(
|
||||
[container_path, 'exec', container_id,
|
||||
'ceph', '-v'])
|
||||
if not code and out.startswith('ceph version '):
|
||||
version = out.split(' ')[2]
|
||||
if not version:
|
||||
out, err, code = call(
|
||||
[container_path, 'exec', container_id,
|
||||
'ceph', '-v'])
|
||||
if not code and out.startswith('ceph version '):
|
||||
version = out.split(' ')[2]
|
||||
i['container_id'] = container_id
|
||||
i['container_image_name'] = image_name
|
||||
i['container_image_id'] = image_id
|
||||
|
@ -1537,7 +1537,7 @@ class CephadmOrchestrator(MgrModule, orchestrator.OrchestratorClientMixin):
|
||||
found = list(zip(*args))[0] if args else []
|
||||
not_found = {osd_id for osd_id in osd_ids if 'osd.%s' % osd_id not in found}
|
||||
if not_found:
|
||||
raise OrchestratorError('Unable to find ODS: %s' % not_found)
|
||||
raise OrchestratorError('Unable to find OSD: %s' % not_found)
|
||||
return self._remove_daemon(args)
|
||||
|
||||
def _create_daemon(self, daemon_type, daemon_id, host,
|
||||
|
Loading…
Reference in New Issue
Block a user