From: Greg Farnum Date: Thu, 10 Aug 2017 17:28:09 +0000 (-0700) Subject: qa: test that "fs new" correctly set the application_metadata X-Git-Tag: v13.0.0~136^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F16954%2Fhead;p=ceph.git qa: test that "fs new" correctly set the application_metadata Signed-off-by: Greg Farnum --- diff --git a/qa/tasks/cephfs/filesystem.py b/qa/tasks/cephfs/filesystem.py index 0d3fc547b7e2b..dad3bd87b2654 100644 --- a/qa/tasks/cephfs/filesystem.py +++ b/qa/tasks/cephfs/filesystem.py @@ -453,6 +453,8 @@ class Filesystem(MDSCluster): data_pool_name, pgs_per_fs_pool.__str__()) self.mon_manager.raw_cluster_cmd('fs', 'new', self.name, self.metadata_pool_name, data_pool_name) + self.check_pool_application(self.metadata_pool_name) + self.check_pool_application(data_pool_name) # Turn off spurious standby count warnings from modifying max_mds in tests. try: self.mon_manager.raw_cluster_cmd('fs', 'set', self.name, 'standby_count_wanted', '0') @@ -465,6 +467,17 @@ class Filesystem(MDSCluster): self.getinfo(refresh = True) + + def check_pool_application(self, pool_name): + osd_map = self.mon_manager.get_osd_dump_json() + for pool in osd_map['pools']: + if pool['pool_name'] == pool_name: + if "application_metadata" in pool: + if not "cephfs" in pool['application_metadata']: + raise RuntimeError("Pool %p does not name cephfs as application!".\ + format(pool_name)) + + def __del__(self): if getattr(self._ctx, "filesystem", None) == self: delattr(self._ctx, "filesystem")