]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: OSDMonitor: allow adding tiers to FS pools 3055/head
authorJohn Spray <john.spray@redhat.com>
Tue, 25 Nov 2014 16:54:42 +0000 (16:54 +0000)
committerJohn Spray <john.spray@redhat.com>
Tue, 2 Dec 2014 21:46:36 +0000 (21:46 +0000)
This was an overly-strict check.  In fact it is perfectly
fine to set an overlay on a pool that is already in use
as a filesystem data or metadata pool.

Fixes: #10135
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit 17b5fc9a40440e76dd1fa64f7fc19577ae3b58ce)

qa/workunits/cephtool/test.sh
src/mon/OSDMonitor.cc

index fc02e301e553c5f5889ac05f33b8ac2dae9a7416..8dbb585364939e82fb8a4ce859bd84bfa8f1b209 100755 (executable)
@@ -566,6 +566,21 @@ function test_mon_mds()
 
   ceph fs rm cephfs --yes-i-really-mean-it
 
+  # Create a FS and check that we can subsequently add a cache tier to it
+  ceph fs new cephfs fs_metadata fs_data
+
+  # Adding overlay to FS pool should be permitted, RADOS clients handle this.
+  ceph osd tier add fs_metadata mds-tier
+  ceph osd tier cache-mode mds-tier writeback
+  ceph osd tier set-overlay fs_metadata mds-tier
+
+  # Clean up FS
+  fail_all_mds
+  ceph fs rm cephfs --yes-i-really-mean-it
+
+  # Clean up overlay/tier relationship
+  ceph osd tier remove-overlay fs_metadata
+  ceph osd tier remove fs_metadata mds-tier
 
   ceph osd pool delete mds-tier mds-tier --yes-i-really-really-mean-it
   ceph osd pool delete mds-ec-pool mds-ec-pool --yes-i-really-really-mean-it
index 04902bbe9cc33af2b80f70fe6555c2a6dde310a4..9e341d396346d2caaf4a2a9e652c9ac72520762c 100644 (file)
@@ -5601,10 +5601,6 @@ done:
       goto reply;
     }
 
-    if (!_check_remove_tier(pool_id, p, &err, &ss)) {
-      goto reply;
-    }
-
     // go
     pg_pool_t *np = pending_inc.get_new_pool(pool_id, p);
     np->read_tier = overlaypool_id;