From 359970f1ef180755f4b10fedc4402f523bc5a539 Mon Sep 17 00:00:00 2001 From: Carmen Rata Date: Thu, 10 Nov 2022 03:11:55 +0000 Subject: [PATCH] Fix sssd IPv6 address detection in DC system IPv6 address family configuration used by sssd to perform DNS lookups, does not work for DC system nodes. This commit is fixing how the IPv6 address family is detected. Tests performed: PASS: The default remote ldap domain configuration gets populated in sssd.conf. PASS: sssd ldap domain service parameters are added and applied at runtime in "/etc/sssd/sssd.conf". PASS: sssd service is successfully started. PASS: Verify DNS lookup works successfully for hosts with IPv6 as well as IPv4 in AIO-SX and DC system configurations. Story: 2009834 Task: 46775 Signed-off-by: Carmen Rata Change-Id: I1c2af38e4372dbcc83e0f1519a8533e0c9cffccb --- sysinv/sysinv/sysinv/sysinv/puppet/sssd.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/sysinv/sysinv/sysinv/sysinv/puppet/sssd.py b/sysinv/sysinv/sysinv/sysinv/puppet/sssd.py index ac0fc989dd..e096e1f184 100644 --- a/sysinv/sysinv/sysinv/sysinv/puppet/sssd.py +++ b/sysinv/sysinv/sysinv/sysinv/puppet/sssd.py @@ -8,8 +8,6 @@ from oslo_log import log as logging from sysinv.puppet import base from sysinv.common import constants -import netaddr - LOG = logging.getLogger(__name__) @@ -154,19 +152,12 @@ class SssdPuppet(base.BasePuppet): return None def _get_network_type(self): - if self._distributed_cloud_role() == \ - constants.DISTRIBUTED_CLOUD_ROLE_SYSTEMCONTROLLER: - return self.dbapi.network_get_by_type( - constants.NETWORK_TYPE_SYSTEM_CONTROLLER) - else: - return self.dbapi.network_get_by_type(constants.NETWORK_TYPE_MGMT) + return self.dbapi.network_get_by_type(constants.NETWORK_TYPE_MGMT) def _is_host_address_ipv6(self): addr_pool = self.dbapi.address_pool_get(self._get_network_type().pool_uuid) - floating_addr = addr_pool.floating_address - addr = netaddr.IPAddress(floating_addr) - if addr.version == constants.IPV6_FAMILY: + if addr_pool.family == constants.IPV6_FAMILY: return True else: return False