Merge "NetApp: don't check kerberos config on mgmt LIF."

This commit is contained in:
Zuul 2024-08-28 17:59:42 +00:00 committed by Gerrit Code Review
commit 2d987cf585
3 changed files with 16 additions and 7 deletions

View File

@ -2046,16 +2046,16 @@ class NetAppCmodeClient(client_base.NetAppBaseClient):
'8.3 or later.')
raise exception.NetAppException(msg)
lifs = self.list_network_interfaces()
if not lifs:
lifs_info = self.get_network_interfaces(protocols=['NFS', 'CIFS'])
if len(lifs_info) == 0:
LOG.debug("There are no LIFs configured for this Vserver. "
"Kerberos is disabled.")
return False
# NOTE(dviroel): All LIFs must have kerberos enabled
for lif in lifs:
for lif in lifs_info:
api_args = {
'interface-name': lif,
'interface-name': lif.get('interface-name'),
'desired-attributes': {
'kerberos-config-info': {
'is-kerberos-enabled': None,

View File

@ -2971,8 +2971,8 @@ class NetAppClientCmodeTestCase(test.TestCase):
self.mock_object(self.client, 'send_request',
mock.Mock(return_value=api_response))
self.mock_object(self.client,
'list_network_interfaces',
mock.Mock(return_value=['lif1']))
'get_network_interfaces',
mock.Mock(return_value=[{'interface-name': 'lif1'}]))
result = self.client.is_kerberos_enabled()
@ -2988,7 +2988,7 @@ class NetAppClientCmodeTestCase(test.TestCase):
self.assertTrue(result)
self.client.send_request.assert_called_once_with(
'kerberos-config-get', kerberos_config_get_args)
self.client.list_network_interfaces.assert_called_once()
self.client.get_network_interfaces.assert_called_once()
def test_get_kerberos_service_principal_name(self):

View File

@ -0,0 +1,9 @@
---
fixes:
- |
NetApp driver `bug #2073766
<https://bugs.launchpad.net/manila/+bug/2073766>`_:
Kerberos can only be configured for the SVM data network interface.
Therefore, this fix excludes the vserver management network interface
for certain SVM accounts when checking the SVM Kerberos configuration
for network interfaces.