]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: test that "fs new" correctly set the application_metadata 16954/head
authorGreg Farnum <gfarnum@redhat.com>
Thu, 10 Aug 2017 17:28:09 +0000 (10:28 -0700)
committerGreg Farnum <gfarnum@redhat.com>
Thu, 10 Aug 2017 18:09:38 +0000 (11:09 -0700)
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
qa/tasks/cephfs/filesystem.py

index 0d3fc547b7e2b6f0b9e3f3bffca50f0300d63b85..dad3bd87b2654979a2b22a6664e39401c7fc16e2 100644 (file)
@@ -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")