image=args.image,
entrypoint='/usr/bin/grep',
args=['ceph', '/etc/passwd'],
- ).run().decode('utf-8')
+ ).run()
(uid, gid) = out.split(':')[2:4]
return (int(uid), int(gid))
def run(self):
logging.debug(self.run_cmd())
- return subprocess.check_output(self.run_cmd())
+ return subprocess.check_output(self.run_cmd()).decode('utf-8')
##################################
image=args.image,
entrypoint='/usr/bin/ceph-authtool',
args=['--gen-print-key'],
- ).run().decode('utf-8').strip()
+ ).run().strip()
admin_key = CephContainer(
image=args.image,
entrypoint='/usr/bin/ceph-authtool',
args=['--gen-print-key'],
- ).run().decode('utf-8').strip()
+ ).run().strip()
mgr_key = CephContainer(
image=args.image,
entrypoint='/usr/bin/ceph-authtool',
args=['--gen-print-key'],
- ).run().decode('utf-8').strip()
+ ).run().strip()
keyring = ('[mon.]\n'
'\tkey = %s\n'
volume_mounts={
mon_dir: '/var/lib/ceph/mon/ceph-%s:z' % (mon_id),
},
- ).run().decode('utf-8')
+ ).run()
j = json.loads(out)
if j.get('mgrmap', {}).get('available', False):
break