dmcrypt_dir,
storetype,
block_wal,
- block_db):
+ block_db,
+ **kw):
"""
Run on osd node, creates an OSD from a data disk.
"""
args.append('--journal')
args.append(journal)
- remoto.process.run(
- conn,
- args
- )
+ if kw.get('debug'):
+ remoto.process.run(
+ conn,
+ args,
+ env={'CEPH_VOLUME_DEBUG': '1'}
+ )
+
+ else:
+ remoto.process.run(
+ conn,
+ args
+ )
def create(args, cfg, create=False):
storetype=storetype,
block_wal=args.block_wal,
block_db=args.block_db,
+ debug=args.debug,
)
# give the OSD a few seconds to start
distro.conn.remote_module.zeroing(disk)
ceph_volume_executable = system.executable_path(distro.conn, 'ceph-volume')
- remoto.process.run(
- distro.conn,
- [
- ceph_volume_executable,
- 'lvm',
- 'zap',
- disk,
- ],
- )
+ if args.debug:
+ remoto.process.run(
+ distro.conn,
+ [
+ ceph_volume_executable,
+ 'lvm',
+ 'zap',
+ disk,
+ ],
+ env={'CEPH_VOLUME_DEBUG': '1'}
+ )
+ else:
+ remoto.process.run(
+ distro.conn,
+ [
+ ceph_volume_executable,
+ 'lvm',
+ 'zap',
+ disk,
+ ],
+ )
distro.conn.exit()
LOG.debug('Listing disks on {hostname}...'.format(hostname=hostname))
ceph_volume_executable = system.executable_path(distro.conn, 'ceph-volume')
- remoto.process.run(
- distro.conn,
- [
- ceph_volume_executable,
- 'lvm',
- 'list',
- ],
- )
+ if args.debug:
+ remoto.process.run(
+ distro.conn,
+ [
+ ceph_volume_executable,
+ 'lvm',
+ 'list',
+ ],
+ env={'CEPH_VOLUME_DEBUG': '1'}
+
+ )
+ else:
+ remoto.process.run(
+ distro.conn,
+ [
+ ceph_volume_executable,
+ 'lvm',
+ 'list',
+ ],
+ )
distro.conn.exit()