]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/rook: set storage_class to scratch
authorSage Weil <sage@newdream.net>
Wed, 28 Jul 2021 18:11:51 +0000 (14:11 -0400)
committerSage Weil <sage@newdream.net>
Tue, 3 Aug 2021 20:13:13 +0000 (16:13 -0400)
Signed-off-by: Sage Weil <sage@newdream.net>
qa/tasks/rook.py

index bdd9e58dcd3f6a68ff06083e635fc19265fd83ff..df1dabf7945aa8bccc52cf73e36fbfa9bedc23ee 100644 (file)
@@ -464,6 +464,21 @@ def rook_toolbox(ctx, config):
         ], check_status=False)
 
 
+@contextlib.contextmanager
+def rook_post_config(ctx, config):
+    try:
+        _shell(ctx, config, ['ceph', 'config', 'set', 'mgr', 'mgr/rook/storage_class',
+                             'scratch'])
+        yield
+
+    except Exception as e:
+        log.exception(e)
+        raise
+
+    finally:
+        pass
+
+
 @contextlib.contextmanager
 def wait_for_osds(ctx, config):
     cluster_name = config.get('cluster', 'ceph')
@@ -616,6 +631,7 @@ def task(ctx, config):
             lambda: rook_cluster(ctx, config),
             lambda: rook_toolbox(ctx, config),
             lambda: wait_for_osds(ctx, config),
+            lambda: rook_post_config(ctx, config),
             lambda: ceph_config_keyring(ctx, config),
             lambda: ceph_clients(ctx, config),
     ):