],
)
+def remove_osd_tmpfs(ctx, log):
+ """
+ unmount tmpfs mounts
+ """
+ from .orchestra import run
+ ctx.cluster.run(
+ args=[
+ 'grep', '/mnt', '/etc/mtab', run.Raw('|'),
+ 'awk', '{print $2}', run.Raw('|'),
+ 'xargs', '-r',
+ 'sudo', 'umount', run.Raw(';'),
+ 'true'
+ ],
+ )
+
def reboot(ctx, remotes, log):
import time
nodes = {}
log.info('Unmount any osd data directories...')
remove_osd_mounts(ctx, log)
+ log.info('Unmount any osd tmpfs dirs...')
+ remove_osd_tmpfs(ctx, log)
+
log.info('Dealing with any kernel mounts...')
kernel_mounts = find_kernel_mounts(ctx, log)
#remove_kernel_mounts(ctx, kernel_mounts, log)
teuthology.roles_of_type(roles_for_host, 'osd'), devs
)
log.info('journal map: %s', roles_to_journals)
+
+ if config.get('tmpfs_journal'):
+ log.info('tmpfs journal enabled')
+ roles_to_journals = {}
+ remote.run( args=[ 'sudo', 'mount', '-t', 'tmpfs', 'tmpfs', '/mnt' ] )
+ for osd in teuthology.roles_of_type(roles_for_host, 'osd'):
+ tmpfs = '/mnt/osd.%s' % osd
+ roles_to_journals[osd] = tmpfs
+ remote.run( args=[ 'truncate', '-s', '1500M', tmpfs ] )
+ log.info('journal map: %s', roles_to_journals)
+
remote_to_roles_to_devs[remote] = roles_to_devs
remote_to_roles_to_journals[remote] = roles_to_journals
conf[section] = {}
conf[section][key] = value
+ if config.get('tmpfs_journal'):
+ conf['journal dio'] = False
+
ctx.ceph = argparse.Namespace()
ctx.ceph.conf = conf
]
)
+ for remote, roles_for_host in osds.remotes.iteritems():
+ remote.run(
+ args=[ 'sudo', 'umount', '-f', '/mnt' ],
+ check_status=False,
+ )
+
if ctx.archive is not None:
# archive mon data, too
log.info('Archiving mon data...')
mkfs_options=config.get('mkfs_options', None),
mount_options=config.get('mount_options',None),
block_journal=config.get('block_journal', None),
+ tmpfs_journal=config.get('tmpfs_journal', None),
log_whitelist=config.get('log-whitelist', []),
)),
lambda: run_daemon(ctx=ctx, config=config, type_='mon'),