import json
import logging
import time
+from tasks.ceph import write_conf
from teuthology import misc
from teuthology.nuke import clear_firewall
return list(result)
+ def set_ceph_conf(self, subsys, key, value):
+ # Set config so that journal will be created in older format
+ if 'mds' not in self._ctx.ceph.conf:
+ self._ctx.ceph.conf['mds'] = {}
+ self._ctx.ceph.conf['mds'][key] = value
+ write_conf(self._ctx) # XXX because we don't have the ceph task's config object, if they
+ # used a different config path this won't work.
+
def are_daemons_healthy(self):
"""
Return true if all daemons are in one of active, standby, standby-replay
import logging
from teuthology import misc
-from tasks.ceph import write_conf
from cephfs.filesystem import Filesystem
log = logging.getLogger(__name__)
old_journal_version = JOURNAL_FORMAT_LEGACY
new_journal_version = JOURNAL_FORMAT_RESILIENT
- # Set config so that journal will be created in older format
- if 'mds' not in ctx.ceph.conf:
- ctx.ceph.conf['mds'] = {}
- ctx.ceph.conf['mds']['mds journal format'] = old_journal_version
- write_conf(ctx) # XXX because we don't have the ceph task's config object, if they
- # used a different config path this won't work.
+ fs.set_ceph_conf('mds', 'mds journal format', old_journal_version)
# Create a filesystem using the older journal format.
for mount in ctx.mounts.values():
mount.check_files() # sanity, this should always pass
# Modify the ceph.conf to ask the MDS to use the new journal format.
- ctx.ceph.conf['mds']['mds journal format'] = new_journal_version
- write_conf(ctx)
+ fs.set_ceph_conf('mds', 'mds journal format', new_journal_version)
# Restart the MDS.
fs.mds_fail_restart()