From: Sebastian Wagner Date: Tue, 21 Apr 2020 11:02:57 +0000 (+0200) Subject: mgr/cephadm: _apply_service: fix _create_iscsi invocation X-Git-Tag: v17.0.0~2454^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=53da12e7eb5e58eaa7bb205f565cec6e8caa4f27;p=ceph.git mgr/cephadm: _apply_service: fix _create_iscsi invocation Fixes: https://tracker.ceph.com/issues/45249 Signed-off-by: Sebastian Wagner --- diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index c23aa2703c4f1..a34e81cb9af52 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -2068,7 +2068,7 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule): try: tree = json.loads(out) except json.decoder.JSONDecodeError: - self.log.error(f"Could not decode json -> {out}") + self.log.exception(f"Could not decode json -> {out}") return osd_host_map nodes = tree.get('nodes', {}) @@ -2479,10 +2479,10 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule): daemon_type, daemon_id, host)) if daemon_type == 'mon': create_func(daemon_id, host, network) # type: ignore - elif daemon_type == 'nfs': + elif daemon_type in ['nfs', 'iscsi']: create_func(daemon_id, host, spec) # type: ignore else: - create_func(daemon_id, host) # type: ignore + create_func(daemon_id, host) # type: ignore # add to daemon list so next name(s) will also be unique sd = orchestrator.DaemonDescription( @@ -2514,7 +2514,7 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule): if self._apply_service(spec): r = True except Exception as e: - self.log.warning('Failed to apply %s spec %s: %s' % ( + self.log.exception('Failed to apply %s spec %s: %s' % ( spec.service_name(), spec, e)) return r @@ -2625,9 +2625,7 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule): daemon_type, daemon_id, host)) if daemon_type == 'mon': args.append((daemon_id, host, network)) # type: ignore - elif daemon_type == 'nfs': - args.append((daemon_id, host, spec)) # type: ignore - elif daemon_type == 'iscsi': + elif daemon_type in ['nfs', 'iscsi']: args.append((daemon_id, host, spec)) # type: ignore else: args.append((daemon_id, host)) # type: ignore