config/sysinv/sysinv/sysinv/sysinv
Andre Kantek fcebab8ef3 Introduce Puppet variables for primary and secondary pool addresses.
Details:

This change extracts the addresses from both the primary and secondary
address pools and makes them available for use in Puppet manifests.

To accommodate the dual stack configuration, the address allocation
for non-controller nodes was updated for both management and
cluster-host networks.

Since the task for upgrade data-migration is not ready yet, a logic
was added to access directly the network's field pool_uuid and get
the addresses with it, if the network_addresspools is empty (as it
would be the case after an upgrade)

As the data migration functionality for the upgrade is still under
development, a temporary solution was implemented.  Logic was added
to directly access the network's "pool_uuid" field and retrieve
addresses through it whenever the "network_addresspools" list is
empty, which is expected to occur immediately following an upgrade.
This allows for uninterrupted network operation during the upgrade
process.

Variable Naming:

The following naming convention will be used for the variables:
$platform::network::[network_type]::[ipv4/ipv6]::params::{var_name}

Variable Usage:

Primary Pool: Existing variables will be maintained and populated with
addresses from the primary pool. This ensures compatibility with
applications that currently rely on them. They have the format
$platform::network::[network_type]::params::{var_name}

The variable platform::network::[network_type]::params::subnet_version
indicates the primary pool protocol.

Secondary Pool: New variables with the above naming convention will
be introduced, allowing applications to utilize addresses from the
secondary pool if needed.

Benefits:

Improved modularity and reusability of network configurations.
Clear separation of concerns between primary and secondary pools.
Easier implementation of applications requiring addresses from either pool.

Notes:

Replace [network_type] can be oam. mgmt, cluster_host, ...
Replace [ipv4/ipv6] with either "ipv4" or "ipv6" depending on
         the address family.
Replace [variable_name] with a descriptive name for the specific
         variable (e.g., "subnet_version", "interface_address").

Test Plan:

[PASS] unit tests implemented
[PASS] AIO-SX, Standard instalation (IPv4 and IPv6)
       - using the dependency change the secondary pool was introduced
       - system was lock/unlocked and no puppet manifests were
          detected
       - inspection of system.yaml and controller-0.yaml to verify
         variables content
       - no alarms or disabled services were found
       - in standard added hosts with dual-stack config and verified
         that addresses were allocated for mgmt and cluster-host and
         after unlock the interface id was assigned to the respective
         entries.
[PASS] For standard systems during upgrade, simulate node unlock by:
       - Clearing the "network_addresspools" table after Ansible
         execution and before DM configuration.
       - Installing remaining nodes with the table empty. This mimics
         the post-upgrade scenario.

Story: 2011027
Task: 49679

Depends-On: https://review.opendev.org/c/starlingx/config/+/908915

Change-Id: If252fa051b2ba5b5eb3033ff269683af741091d2
Signed-off-by: Andre Kantek <andrefernandozanella.kantek@windriver.com>
2024-03-12 07:25:46 -03:00
..
agent Revert "Report port and device inventory after the worker manifest" 2024-02-15 23:58:42 +00:00
api New RESTful API and DB schema for network to address-pools. 2024-03-06 07:34:14 -03:00
cert_alarm Change cert-alarm service audit behavior 2024-03-05 12:52:18 -05:00
cert_mon Merge "Disable cert-mon audit for subclouds being rehomed" 2023-11-09 21:37:53 +00:00
cmd Add log messages to IPSec Auth Server and Client 2024-02-02 14:58:03 -03:00
common New RESTful API and DB schema for network to address-pools. 2024-03-06 07:34:14 -03:00
conductor Introduce Puppet variables for primary and secondary pool addresses. 2024-03-12 07:25:46 -03:00
db Introduce Puppet variables for primary and secondary pool addresses. 2024-03-12 07:25:46 -03:00
helm New RESTful API and DB schema for network to address-pools. 2024-03-06 07:34:14 -03:00
ipsec_auth Merge "OTS Token implementation for IPsec Auth" 2024-02-23 17:36:13 +00:00
loads Update extract playbooks target directory 2023-05-02 13:50:36 +00:00
objects New RESTful API and DB schema for network to address-pools. 2024-03-06 07:34:14 -03:00
openstack Restore openstack/common/context file 2023-05-24 12:43:16 +00:00
puppet Introduce Puppet variables for primary and secondary pool addresses. 2024-03-12 07:25:46 -03:00
tests Introduce Puppet variables for primary and secondary pool addresses. 2024-03-12 07:25:46 -03:00
zmq_rpc New RESTful API and DB schema for network to address-pools. 2024-03-06 07:34:14 -03:00
__init__.py Fix tox certificate issues in python2 2021-11-18 15:14:51 -06:00
_i18n.py Eliminate sdist step from sysinv zuul 2021-04-12 09:34:17 -05:00
netconf.py Fix bad syntax in requirements.txt file 2021-09-14 09:15:56 -05:00
sanity_coverage.py Fix tox-docs failing sphinx 2022-05-31 13:56:30 +00:00
version.py Remove python2 jobs from zuul for this repo 2023-02-07 19:36:45 +00:00