From: Sage Weil Date: Tue, 1 Oct 2019 15:30:42 +0000 (-0500) Subject: mgr/ssh: run c-v with podman when getting inventory X-Git-Tag: v15.1.0~1313^2~42 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=123eb325767690e21b64d3e2527105f932ee62c2;p=ceph.git mgr/ssh: run c-v with podman when getting inventory Signed-off-by: Sage Weil --- diff --git a/src/pybind/mgr/ssh/module.py b/src/pybind/mgr/ssh/module.py index 8daa28da4c4da..87e740a741d59 100644 --- a/src/pybind/mgr/ssh/module.py +++ b/src/pybind/mgr/ssh/module.py @@ -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: