diff --git a/manila/share/drivers/cephfs/driver.py b/manila/share/drivers/cephfs/driver.py index 620b3703e6..f538dcad54 100644 --- a/manila/share/drivers/cephfs/driver.py +++ b/manila/share/drivers/cephfs/driver.py @@ -1033,7 +1033,7 @@ class NFSProtocolHelperMixin(): "a hostname (rather than IP address) was supplied " "in 'cephfs_ganesha_server_ip' or " "in 'cephfs_ganesha_export_ips'.") - return [4, 6] + self.configured_ip_versions = {4, 6} return list(self.configured_ip_versions) diff --git a/manila/tests/share/drivers/cephfs/test_driver.py b/manila/tests/share/drivers/cephfs/test_driver.py index c53b113f25..5354fe6ef0 100644 --- a/manila/tests/share/drivers/cephfs/test_driver.py +++ b/manila/tests/share/drivers/cephfs/test_driver.py @@ -1115,6 +1115,8 @@ class NFSProtocolHelperTestCase(test.TestCase): self.assertEqual(set(configured_ip_version), set(helper.get_configured_ip_versions())) + self.assertEqual(set(configured_ip_version), + helper.configured_ip_versions) def test_get_configured_ip_versions_already_set(self): fake_conf = configuration.Configuration(None) diff --git a/releasenotes/notes/bug-1991776-cephfs-configured-ip-versions-fd87976fdb848e8c.yaml b/releasenotes/notes/bug-1991776-cephfs-configured-ip-versions-fd87976fdb848e8c.yaml new file mode 100644 index 0000000000..cd3972b8ef --- /dev/null +++ b/releasenotes/notes/bug-1991776-cephfs-configured-ip-versions-fd87976fdb848e8c.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + `Bug 1991776 `_ was fixed within the + CephFS driver. The driver no longer emits repeated warnings concerning + supported IP versions when using the NFS protocol.