]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/volumes: Bump up AuthMetadataManager's version 39906/head
authorKotresh HR <khiremat@redhat.com>
Fri, 19 Feb 2021 11:27:23 +0000 (16:57 +0530)
committerKotresh HR <khiremat@redhat.com>
Mon, 8 Mar 2021 08:32:21 +0000 (14:02 +0530)
With ceph_volume_client and mgr-volumes co-existing
for sometime, the version of both needs to be same.
The ceph_volume_client version <=5 can't decode
'subvolumes' key in auth-metadata file. Hence to
handle version in-compatibility, the version of
ceph_volume_client is bumped up to 6 and the same
needs to be done in mgr-volume's AuthMetadataManager

Fixes: https://tracker.ceph.com/issues/49374
Signed-off-by: Kotresh HR <khiremat@redhat.com>
(cherry picked from commit 818c7781ff0467c6521bf2b3002b094fb8a71257)

qa/tasks/cephfs/test_volumes.py
src/pybind/mgr/volumes/fs/operations/versions/auth_metadata.py

index 503d8c79f7a71b3dafed5d25d89e7aff56f531cf..735a59c0bb5d6b6231c1f0e565c36554f87433df 100644 (file)
@@ -1331,7 +1331,7 @@ class TestVolumes(CephFSTestCase):
         # for different subvolumes, versioning details, etc.
         expected_auth_metadata = {
             "version": 5,
-            "compat_version": 1,
+            "compat_version": 6,
             "dirty": False,
             "tenant_id": "tenant1",
             "subvolumes": {
@@ -1728,7 +1728,7 @@ class TestVolumes(CephFSTestCase):
 
         expected_auth_metadata = {
             "version": 5,
-            "compat_version": 1,
+            "compat_version": 6,
             "dirty": False,
             "tenant_id": "tenant1",
             "subvolumes": {
@@ -1805,7 +1805,7 @@ class TestVolumes(CephFSTestCase):
 
         expected_auth_metadata = {
             "version": 5,
-            "compat_version": 1,
+            "compat_version": 6,
             "dirty": False,
             "tenant_id": "tenant1",
             "subvolumes": {
index ea4b032adbe0ef964cb8093afac63d54abeab845..259dcd0e0c3140a912dc17a87c4cb0d6c574be84 100644 (file)
@@ -18,7 +18,7 @@ class AuthMetadataError(Exception):
 class AuthMetadataManager(object):
 
     # Current version
-    version = 5
+    version = 6
 
     # Filename extensions for meta files.
     META_FILE_EXT = ".meta"
@@ -141,7 +141,7 @@ class AuthMetadataManager(object):
         decode the metadata, and 'version', the AuthMetadataManager version
         that encoded the metadata.
         """
-        data['compat_version'] = 1
+        data['compat_version'] = 6
         data['version'] = self.version
         return self._metadata_set(self._auth_metadata_path(auth_id), data)