***************
'upstart',
'sysvinit',
'systemd',
+ 'direct',
'auto',
]
***************
'osd.{osd_id}'.format(osd_id=osd_id),
],
)
+ elif os.path.exists(os.path.join(path, 'direct')):
+ # no idea about which init, start directly and set crush location
+ subprocess.check_call(
+ args=[
+ '/usr/bin/ceph-osd',
+ #'--cluster', args.cluster,
+ #'-c', '/etc/ceph/{cluster}.conf'.format(cluster=args.cluster),
+ '-i', '{osd_id}'.format(osd_id=osd_id),
+ ],
+ )
+
+ # assume weight 1 (wrong but easy to change)!
+ subprocess.check_call(
+ args=[
+ '/usr/bin/ceph',
+ #'--cluster', args.cluster,
+ #'-c', '/etc/ceph/{cluster}.conf'.format(cluster=args.cluster),
+ 'osd',
+ 'crush',
+ 'add',
+ 'osd.{osd_id}'.format(osd_id=osd_id),
+ '1',
+ 'root=default',
+ 'host={hostname}'.format(hostname=platform.node()),
+ ],
+ )
else:
raise Error('{cluster} osd.{osd_id} is not tagged with an init system'.format(
cluster=cluster,
***************
(distro, release, codename) = platform.dist()
if distro == 'Ubuntu':
init = 'upstart'
+ if distro == 'unknown' or distro == '':
+ LOG.debug('distro is empty, assuming init is direct')
+ init = 'direct'
else:
init = 'sysvinit'
+ if init == 'direct':
+ LOG.debug('init is direct')
LOG.debug('Marking with init system %s', init)
with file(os.path.join(path, init), 'w'):