mirror of
https://github.com/ceph/ceph
synced 2025-02-21 18:17:42 +00:00
mgr/ssh: run c-v with podman when getting inventory
Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
24049fcda4
commit
123eb32576
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user