config/sysinv/sysinv/sysinv/sysinv/conductor
Steven Webster 92f00f80fa Fix usage of address_get_by_name
Recent commit https://opendev.org/starlingx/config/commit/634d4916
introducing changes for dual-stack networking made a change
to the DB api's address_get_by_name to return a list of IPv4 and
IPv6 addresses rather than a singular address.  As such, the list
can be empty if there are no addresses associated with a
particular name, rather than throwing an AddressNotFoundByName
exception.

Currently, the interface_network code depends on the
AddressNotFoundByName exception to determine whether a new
address needs to be allocated for a dynamic network.

This can cause an issue for worker, storage nodes when one of
their interfaces is associated with certain networks (such as
the storage network).

The symptom of this may be an interface which is 'DOWN' after
unlock, as it's interface configuration file is marked for a
'static' address, with no address present (because it wasn't
allocated).

This commit fixes the issue by simply checking that the list
returned by address_get_by_name is empty.

Test Plan:

- Fresh install of a Standard system.
- Ensure named addresses are present in the DB for all
  nodes (mgmt, cluster-host, oam for controllers)
- Create a new address pool and storage network and
  assign it to a worker node interface.
- Unlock the worker node and ensure the address is
  present on the interface and it is in 'UP' state.

Story: 2011027
Task: 49627

Change-Id: I9763f7c71797d9b321e7bf9e1b6db759378af632
Signed-off-by: Steven Webster <steven.webster@windriver.com>
2024-04-05 10:56:47 -04:00
..
__init__.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
ceph.py Fix no-member errors in legacy sysinv ceph code 2023-03-15 13:14:32 +00:00
docker_registry.py Reduce pagination limit for registry requests 2023-07-24 18:44:30 +00:00
keystone_listener.py New RESTful API and DB schema for network to address-pools. 2024-03-06 07:34:14 -03:00
kube_app.py Merge "Fix delete process to apps that have charts disabled" 2024-03-07 13:43:22 +00:00
manager.py Fix usage of address_get_by_name 2024-04-05 10:56:47 -04:00
openstack.py Retry get openstack users when unauthorized 2023-08-28 13:12:00 -04:00
rpcapi.py Fix LDAP issue for DC subcloud 2024-03-13 14:27:13 -04:00
rpcapiproxy.py Add ZeroMQ RPC backend 2022-11-24 13:28:01 -03:00
rpcapizmq.py Add ZeroMQ RPC backend 2022-11-24 13:28:01 -03:00