##################################
+def command_ceph_volume():
+ log_dir = get_log_dir(args.log_dir, args.fsid)
+ makedirs(log_dir)
+ c = CephContainer(
+ image=args.image,
+ entrypoint='/usr/sbin/ceph-volume',
+ args=args.command,
+ podman_args=['--privileged'],
+ volume_mounts=get_container_mounts(args.fsid, 'osd', None),
+ )
+ subprocess.call(c.run_cmd())
+
+##################################
+
def command_unit():
(daemon_type, daemon_id) = args.name.split('.')
unit_name = get_unit_name(args.fsid, daemon_type, daemon_id)
'command', nargs='+',
help='command')
+parser_ceph_volume = subparsers.add_parser(
+ 'ceph-volume', help='run ceph-volume inside a container')
+parser_ceph_volume.set_defaults(func=command_ceph_volume)
+parser_ceph_volume.add_argument(
+ '--fsid',
+ required=True,
+ help='cluster FSID')
+parser_ceph_volume.add_argument(
+ 'command', nargs='+',
+ help='command')
+
parser_unit = subparsers.add_parser(
'unit', help='operate on the daemon\'s systemd unit')
parser_unit.set_defaults(func=command_unit)