]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/ssh: run c-v with podman when getting inventory
authorSage Weil <sage@redhat.com>
Tue, 1 Oct 2019 15:30:42 +0000 (10:30 -0500)
committerSage Weil <sage@redhat.com>
Sat, 5 Oct 2019 01:33:35 +0000 (20:33 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/ssh/module.py

index 8daa28da4c4da982aefd106f09d4ab15427f98bc..87e740a741d597975ae399aed378133256266e9c 100644 (file)
@@ -439,15 +439,24 @@ class SSHOrchestrator(MgrModule, orchestrator.Orchestrator):
         conn = self._get_connection(host)
 
         try:
-            ceph_volume_executable = self._executable_path(conn, 'ceph-volume')
+            ceph_volume_executable = self._executable_path(conn, 'podman')
             command = [
                 ceph_volume_executable,
+                'run',
+                '-it',
+                '--net=host',
+                '--privileged',
+                '--entrypoint',
+                '/usr/sbin/ceph-volume',
+                'ceph/daemon-base',
                 "inventory",
                 "--format=json"
             ]
 
             out, err, code = remoto.process.check(conn, command)
-            host_devices = json.loads(out[0])
+            # stdout and stderr get combined; assume last line is the real
+            # output and everything preceding it is an error.
+            host_devices = json.loads(out[-1])
             return host_devices
 
         except Exception as ex: