From 782a0825248d9b2ae0aa40c867f058ff3a00f22a Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Fri, 19 Feb 2021 16:57:23 +0530 Subject: [PATCH] mgr/volumes: Bump up AuthMetadataManager's version 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 (cherry picked from commit 818c7781ff0467c6521bf2b3002b094fb8a71257) --- qa/tasks/cephfs/test_volumes.py | 6 +++--- .../mgr/volumes/fs/operations/versions/auth_metadata.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/qa/tasks/cephfs/test_volumes.py b/qa/tasks/cephfs/test_volumes.py index 0f4f137af0e89..f679212058218 100644 --- a/qa/tasks/cephfs/test_volumes.py +++ b/qa/tasks/cephfs/test_volumes.py @@ -1350,7 +1350,7 @@ class TestSubvolumes(TestVolumesHelper): # for different subvolumes, versioning details, etc. expected_auth_metadata = { "version": 5, - "compat_version": 1, + "compat_version": 6, "dirty": False, "tenant_id": "tenant1", "subvolumes": { @@ -1747,7 +1747,7 @@ class TestSubvolumes(TestVolumesHelper): expected_auth_metadata = { "version": 5, - "compat_version": 1, + "compat_version": 6, "dirty": False, "tenant_id": "tenant1", "subvolumes": { @@ -1824,7 +1824,7 @@ class TestSubvolumes(TestVolumesHelper): expected_auth_metadata = { "version": 5, - "compat_version": 1, + "compat_version": 6, "dirty": False, "tenant_id": "tenant1", "subvolumes": { diff --git a/src/pybind/mgr/volumes/fs/operations/versions/auth_metadata.py b/src/pybind/mgr/volumes/fs/operations/versions/auth_metadata.py index ea4b032adbe0e..259dcd0e0c314 100644 --- a/src/pybind/mgr/volumes/fs/operations/versions/auth_metadata.py +++ b/src/pybind/mgr/volumes/fs/operations/versions/auth_metadata.py @@ -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) -- 2.39.5