]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: _apply_service: fix _create_iscsi invocation
authorSebastian Wagner <sebastian.wagner@suse.com>
Tue, 21 Apr 2020 11:02:57 +0000 (13:02 +0200)
committerMichael Fritch <mfritch@suse.com>
Mon, 4 May 2020 18:23:07 +0000 (12:23 -0600)
Fixes: https://tracker.ceph.com/issues/45249
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
src/pybind/mgr/cephadm/module.py

index c23aa2703c4f102fce67187f5c5043e07a93cee1..a34e81cb9af52baad504a0c9773b6546552eef66 100644 (file)
@@ -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