config/sysinv/sysinv/sysinv/sysinv/common
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
app_metadata.py Add CONF option to set default auto_update value 2024-03-07 15:44:01 -03:00
barbican_config.py Move bootstrap endpoint reconfig from puppet to sysinv 2024-02-27 13:56:31 -03:00
ceph.py Additional mechanism for unsafe force 2023-10-27 17:12:04 -03:00
config.py Deprecate sysinv.openstack.common.db in favor of oslo_db 2020-02-07 11:55:49 -06:00
configp.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
constants.py Report port and device inventory after the worker manifest 2024-03-26 10:37:56 -04:00
context.py Replace openstack/context library by oslo_context 2023-02-24 16:17:30 -03:00
dc_api.py Update license file with a detailed open source license 2022-06-02 12:08:16 -04:00
device.py Added the support of ACC200 device 2022-11-17 15:32:52 +00:00
disk_utils.py Replace parted and sgdisk with sfdisk in sysinv 2022-12-05 21:37:41 +00:00
etcd.py Backup control-plane during k8s network upgrade 2023-05-05 23:00:44 +00:00
exception.py New RESTful API and DB schema for network to address-pools. 2024-03-06 07:34:14 -03:00
extension_manager.py Deprecate sysinv.openstack.common.log 2019-11-05 15:29:20 -06:00
fernet.py Unsupported 'message' Exception attribute in PY3 2021-06-23 12:47:23 -04:00
fm.py Only use required fault management endpoint 2022-12-09 18:52:56 +00:00
fpga_constants.py Merge sysinv_fpga_agent with sysinv_agent 2022-10-03 14:12:28 -04:00
health.py Fix failed pods not being detected by rootca health check 2024-03-14 08:58:42 -03:00
image_service.py Deprecate the sysinv.openstack.common utils files 2019-12-04 10:58:39 -06:00
images.py Deprecate the sysinv.openstack.common utils files 2019-12-04 10:58:39 -06:00
inotify.py Introduce support for multiple application bundles 2024-01-15 17:49:29 -03:00
interface.py Fix mention of python-k8sapp-openstack in sysinv 2023-03-08 09:45:24 -03:00
kubernetes.py Expose Kubernetes ApiextensionsV1Api 2024-03-21 10:34:58 +00:00
openstack_config_endpoints.py Merge "Handle FM user during endpoint config" 2024-03-26 18:01:25 +00:00
paths.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
platform_firewall.py Correct typo for PTP's UDP ports in the OAM firewall 2023-10-12 10:01:24 -03:00
policy.py Deprecate old policy engine and restrict access 2022-08-10 11:18:38 -03:00
rest_api.py Initial implementation of IPsec Auth Server 2024-01-30 14:31:05 -03:00
retrying.py Re-enable important py3k checks for sysinv 2021-11-10 11:08:12 -03:00
service.py Replace openstack/context library by oslo_context 2023-02-24 16:17:30 -03:00
service_parameter.py Update dns hostname validation for host-records 2024-01-05 00:03:46 -05:00
states.py Fix word and statement errors in comments 2018-11-14 10:04:51 +08:00
storage_backend_conf.py Preserve ceph monitor order for overrides 2022-11-01 16:17:09 +02:00
utils.py Fix usage of address_get_by_name 2024-04-05 10:56:47 -04:00
wsgi_service.py Use FQDN for MGMT network 2023-10-31 20:45:40 -04:00