##################################
def command_deploy():
- (daemon_type, daemon_id) = args.name.split('.')
+ (daemon_type, daemon_id) = args.name.split('.', 1)
if daemon_type not in ['mon', 'mgr', 'mds', 'osd', 'rgw']:
raise RuntimeError('daemon type %s not recognized' % daemon_type)
(config, keyring, crash_keyring) = get_config_and_both_keyrings()
##################################
def command_run():
- (daemon_type, daemon_id) = args.name.split('.')
+ (daemon_type, daemon_id) = args.name.split('.', 1)
c = get_container(args.fsid, daemon_type, daemon_id)
return subprocess.call(c.run_cmd())
make_log_dir(args.fsid)
if args.name:
if '.' in args.name:
- (daemon_type, daemon_id) = args.name.split('.')
+ (daemon_type, daemon_id) = args.name.split('.', 1)
else:
daemon_type = args.name
daemon_id = None
##################################
def command_enter():
- (daemon_type, daemon_id) = args.name.split('.')
+ (daemon_type, daemon_id) = args.name.split('.', 1)
podman_args = []
if args.command:
command = args.command
##################################
def command_unit():
- (daemon_type, daemon_id) = args.name.split('.')
+ (daemon_type, daemon_id) = args.name.split('.', 1)
unit_name = get_unit_name(args.fsid, daemon_type, daemon_id)
call_throws([
'systemctl',
name = 'crash'
unit_name = 'ceph-%s-crash.service' % fsid
(enabled, state) = check_unit(unit_name)
- else:
- bits = j.split('.')
- if len(bits) != 2:
- continue
+ elif '.' in j:
name = j
- (daemon_type, daemon_id) = bits
+ (daemon_type, daemon_id) = j.split('.', 1)
(enabled, state) = check_unit(get_unit_name(fsid,
daemon_type,
daemon_id))
+ else:
+ continue
# get container id
container_id = None
##################################
def command_adopt():
- (daemon_type, daemon_id) = args.name.split('.')
+ (daemon_type, daemon_id) = args.name.split('.', 1)
(uid, gid) = extract_uid_gid()
if args.style == 'legacy':
fsid = get_legacy_daemon_fsid(args.cluster, daemon_type, daemon_id)
##################################
def command_rm_daemon():
- (daemon_type, daemon_id) = args.name.split('.')
+ (daemon_type, daemon_id) = args.name.split('.', 1)
if daemon_type in ['mon', 'osd'] and not args.force:
raise RuntimeError('must pass --force to proceed: '
'this command may destroy precious data!')