config/sysinv/sysinv/sysinv/sysinv/tests/api
Steven Webster f8d30588ad Fix LDAP issue for DC subcloud
This commit fixes an LDAP authentication issue seen on worker nodes
of a subcloud after a rehoming procedure was performed.

There are two main parts:

1. Since every host of a subcloud authenticates with the system
   controller, we need to reconfigure the LDAP URI across all nodes
   of the system when the system controller network changes (upon
   rehome).  Currently, it is only being reconfigured on controller
   nodes.

2. Currently, the system uses an SNAT rule to allow worker/storage
   nodes to authenticate with the system controller when the admin
   network is in use.  This is because the admin network only exists
   between controller nodes of a distributed cloud.  The SNAT rule
   is needed to allow traffic from the (private) management network
   of the subcloud over the admin network to the system controller
   and back again.  If the admin network is _not_ being used,
   worker/storage nodes of the subcloud can authenticate with the
   system controller, but routes must be installed on the
   worker/storage nodes to facilitate this.  It becomes tricky to
   manage in certain circumstances of rehoming/network config.
   This traffic really should be treated in the same way as that
   of the admin network.

This commit addresses the above by:

1. Reconfiguring the ldap_server config across all nodes upon
   system controller network changes.

2. Generalizing the current admin network nat implementation to
   handle the management network as well.

Test Plan:

IPv4, IPv6 distributed clouds

1. Rehome a subcloud to another system controller and back again
   (mgmt network)
2. Update the subcloud to use the admin network (mgmt -> admin)
3. Rehome the subcloud to another system controller and back again
   (admin network)
4. Update the subcloud to use the mgmt network (admin -> mgmt)

After each of the numbered steps, the following were performed:

a. Ensure the system controller could become managed, online, in-sync
b. Ensure the iptables SNAT rules were installed or updated
   appropriately on the subcloud controller nodes.
c. Log into a worker node of the subcloud and ensure sudo commands
   could be issued without LDAP timeout.
d. Log into worder node with LDAP USER X via console and verify
   login succeed

In general, tcpdump was also used to ensure the SNAT translation was
actually happening.

Partial-Bug: #2056560

Change-Id: Ia675a4ff3a2cba93e4ef62b27dba91802811e097
Signed-off-by: Steven Webster <steven.webster@windriver.com>
2024-03-13 14:27:13 -04:00
..
data Add inactive param for import-load on sysinv api 2023-03-07 11:54:48 +00:00
__init__.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
base.py Deprecate old policy engine and restrict access 2022-08-10 11:18:38 -03:00
test_acl.py Adding pylint checking to the sysinv unit tests 2020-01-14 08:32:12 -06:00
test_address.py Fixed address interface foreign key inconsistency 2020-03-03 16:50:12 -05:00
test_address_pool.py Semantic check to avoid creating overlapped address pools 2023-12-27 13:25:29 -05:00
test_base.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
test_certificate.py Fix install of bundled certificates 2023-01-09 14:34:14 +00:00
test_controller_fs.py Add ZeroMQ RPC backend 2022-11-24 13:28:01 -03:00
test_device.py Allow de-provisioning of FEC device 2022-04-06 06:02:42 -04:00
test_device_image.py Add ZeroMQ RPC backend 2022-11-24 13:28:01 -03:00
test_device_label.py Allow applying device image with non-device label 2020-07-28 11:27:28 -04:00
test_dns.py Add ZeroMQ RPC backend 2022-11-24 13:28:01 -03:00
test_helm_charts.py Add ZeroMQ RPC backend 2022-11-24 13:28:01 -03:00
test_host.py Merge "Steps for kube-upgrade-storage" 2024-01-09 22:25:06 +00:00
test_host_fs.py Add ZeroMQ RPC backend 2022-11-24 13:28:01 -03:00
test_interface.py Update System Inventory semantic checks to permit pci-sriov 2023-06-13 13:20:55 -04:00
test_interface_datanetwork.py Support data network assignment on an unlocked host 2021-02-02 07:52:28 -05:00
test_interface_network.py Adding semantic check on deletion of admin-interface 2023-12-12 16:02:11 -05:00
test_kernel.py low latency updates host-kernel-modify 2023-07-11 11:01:12 -04:00
test_kube_cluster.py Config API for Kubernetes cluster access information 2021-03-01 07:29:12 -06:00
test_kube_cmd_version.py sysinv: update constant name to be more accurate 2021-10-01 09:14:05 -06:00
test_kube_host_upgrade.py Skip storage nodes when listing per-host k8s upgrade info 2021-11-18 13:42:18 -06:00
test_kube_rootca_update.py Merge "Add pod health status to kube rootca check" 2023-11-17 21:11:52 +00:00
test_kube_upgrade.py Update apps during Kubernetes upgrade 2024-02-13 15:01:54 -03:00
test_kube_version.py Allow recovery from failures during kubernetes upgrade 2019-12-11 14:30:50 -06:00
test_label.py Revert "Add functionality for intel gpu device plugin" 2023-09-22 13:32:12 +00:00
test_load.py Prevent delete imported iso if subcloud isn't upgraded 2023-10-12 01:50:49 -03:00
test_network.py Fix LDAP issue for DC subcloud 2024-03-13 14:27:13 -04:00
test_ntp.py Add ZeroMQ RPC backend 2022-11-24 13:28:01 -03:00
test_oamnetwork.py Add support for AIO-SX to DX migration on subcloud 2021-03-29 14:00:52 -04:00
test_partition.py Fix partition status stuck in creating/modifying/deleting 2023-09-12 08:49:17 -03:00
test_ptp.py [PTP dual NIC config] Patching PTP configuration 2022-02-10 11:51:08 -03:00
test_ptp_instance.py Added synce4l configuration support 2023-02-21 09:37:28 -05:00
test_ptp_instance_update.py Fix PTP parameter deletion error messages 2022-02-22 07:04:01 -05:00
test_ptp_interface.py Fix PTP parameter deletion error messages 2022-02-22 07:04:01 -05:00
test_ptp_parameter.py [PTP dual NIC config] Manage parameter life-cycle 2022-01-19 13:18:24 -03:00
test_pv.py Refactor unit test API example to use unit test mixins 2020-01-15 13:02:22 -06:00
test_root.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
test_route.py Disallow route config during upgrade states 2022-05-05 10:39:45 -04:00
test_sensorgroup.py Align API types with database types 2022-07-14 18:27:31 -03:00
test_service_parameters.py Update dns hostname validation for host-records 2024-01-05 00:03:46 -05:00
test_storage_backends.py Allow configurable ceph storage backend network 2021-05-07 14:31:39 +03:00
test_storage_tier.py Merge "Removal of K8S Ansible Pb from Conductor init" 2024-01-19 13:33:26 +00:00
test_system.py Add validation to AIO-SX to AIO-DX migration command 2023-05-22 13:39:26 -04:00
test_upgrade.py Add ZeroMQ RPC backend 2022-11-24 13:28:01 -03:00
utils.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00