From b9737b82cc511e7c55b219146aaf57b84794995f 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 503d8c79f7a..735a59c0bb5 100644 --- a/qa/tasks/cephfs/test_volumes.py +++ b/qa/tasks/cephfs/test_volumes.py @@ -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": { 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 ea4b032adbe..259dcd0e0c3 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.47.3