From 34a28c8a52812af2d09e259e0d89bcd92c678ced Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Fri, 19 Feb 2021 16:42:33 +0530 Subject: [PATCH] pybind/ceph_volume_client: Bump up the version and compat_version to 6 With 'volumes' key updated to 'subvolumes', the version of ceph_volume_client <= 5 can't decode auth-metadata file. Hence bumping up ceph_volume_client version and compat_version to 6. Fixes: https://tracker.ceph.com/issues/49294 Signed-off-by: Kotresh HR (cherry picked from commit ce55a0bcdc5db139fc8f39665c372f1b7cc274a7) --- qa/tasks/cephfs/test_volume_client.py | 10 +++++----- src/pybind/ceph_volume_client.py | 5 +++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/qa/tasks/cephfs/test_volume_client.py b/qa/tasks/cephfs/test_volume_client.py index 1aa545f1176c0..7f66218c5932e 100644 --- a/qa/tasks/cephfs/test_volume_client.py +++ b/qa/tasks/cephfs/test_volume_client.py @@ -765,10 +765,10 @@ vc.disconnect() # for different volumes, versioning details, etc. expected_auth_metadata = { "version": 2, - "compat_version": 1, + "compat_version": 6, "dirty": False, "tenant_id": "tenant1", - "volumes": { + "subvolumes": { "groupid/volumeid": { "dirty": False, "access_level": "rw" @@ -1179,7 +1179,7 @@ vc.disconnect() # for different volumes, versioning details, etc. expected_auth_metadata = { "version": 2, - "compat_version": 1, + "compat_version": 6, "dirty": False, "tenant_id": "tenant", "subvolumes": { @@ -1329,7 +1329,7 @@ vc.disconnect() # for different volumes, versioning details, etc. expected_auth_metadata = { "version": 2, - "compat_version": 1, + "compat_version": 6, "dirty": False, "tenant_id": "tenant1", "subvolumes": { @@ -1498,7 +1498,7 @@ vc.disconnect() # for different volumes, versioning details, etc. expected_auth_metadata = { "version": 2, - "compat_version": 1, + "compat_version": 6, "dirty": False, "tenant_id": "tenant1", "subvolumes": { diff --git a/src/pybind/ceph_volume_client.py b/src/pybind/ceph_volume_client.py index ae3185b1d1794..8fcb0cf8fa33a 100644 --- a/src/pybind/ceph_volume_client.py +++ b/src/pybind/ceph_volume_client.py @@ -216,6 +216,7 @@ CEPHFSVOLUMECLIENT_VERSION_HISTORY = """ * 3 - Allow volumes to be created without RADOS namespace isolation * 4 - Added get_object_and_version, put_object_versioned method to CephFSVolumeClient * 5 - Disallow authorize API for users not created by CephFSVolumeClient + * 6 - The 'volumes' key in auth-metadata-file is changed to 'subvolumes'. """ @@ -239,7 +240,7 @@ class CephFSVolumeClient(object): """ # Current version - version = 5 + version = 6 # Where shall we create our volumes? POOL_PREFIX = "fsvolume_" @@ -921,7 +922,7 @@ class CephFSVolumeClient(object): decode the metadata, and 'version', the CephFSVolumeClient 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