Compare commits

..

10 Commits

Author SHA256 Message Date
5488424be6 make apache services truly dual socket
All checks were successful
Check Release Manifest Local Charts Versions / Check Release Manifest Local Charts Versions (pull_request) Successful in 0s
Build PR in OBS / Build PR in OBS (pull_request_target) Successful in 4m56s
Signed-off-by: Marco Chiappero <marco.chiappero@suse.com>
2025-07-24 14:35:35 +00:00
d114307f83 let ironic API use v4 and v6 sockets
Signed-off-by: Marco Chiappero <marco.chiappero@suse.com>
2025-07-24 14:35:35 +00:00
8d975bce81 simplify the definition of host_ip on ironic 2025-07-24 14:35:35 +00:00
1e5f53bbf8 Use my_ipv6 when IRONIC_IPV6 is defined
Signed-off-by: Marco Chiappero <marco.chiappero@suse.com>
2025-07-24 14:35:35 +00:00
f4430791f0 Introduce hostname
Signed-off-by: Marco Chiappero <marco.chiappero@suse.com>
2025-07-24 14:35:35 +00:00
2ad235a5c1 Revert 2742439 being now redundant
Commit 2742439 added logic to tentatively identify the interface name
in get_provisioning_interface if the PROVISIONING_IP is provided.
However the same process in then repeated in wait_for_interface_or_ip.

Signed-off-by: Marco Chiappero <marco.chiappero@suse.com>
2025-07-24 14:35:35 +00:00
5f038d48db Leverage get_interface_of_ip to find PROVISIONING_IP
Use the previously introduced get_interface_of_ip, to determine if the
PROVISIONING_IP address is actually present on a network interface.

This improves the code readability and enables additional debugging
output.

Signed-off-by: Marco Chiappero <marco.chiappero@suse.com>
2025-07-24 14:35:34 +00:00
6048370f61 Introduce IRONIC_IPV6 to bind on IPv6 sockets
The ironic scripts either use PROVISIONING_IP as an input or try to
determine an IP address to bind the sockets to. This results in
IRONIC_IP being defined once the process is complete, and it can carry
either an IPv4 or an IPv6 address.

Likely, the assumption is that on Linux, by default, IPv4-mapped IPv6
addresses can be leveraged to serve both IPv4 and IPv6 through a single
socket. However this is not a good practice and two separate sockets
should be used instead, whenever possible.

This change modifies such logic by
- introducing the variable IRONIC_IPV6 alongside the existing
- matching IRONIC_IP and attempting to populate both variables

Please note that hostname based URLs, with both A and AAAA records, are
also required for a fully working dual-stack configuration.

Signed-off-by: Marco Chiappero <marco.chiappero@suse.com>
2025-07-24 14:35:34 +00:00
dd6fcfff2f Add two new utility functions for later refactoring
The way the ironic-image processes are bound to internet sockets is mainly
by PROVISIONING_IP or PROVISIONING_INTERFACE, that is, by looking up a
specific address on an interface, or a specific interface for a workable
address.

Introduce two new utility functions in ironic-common.sh for these two
purposes:
get_interface_of_ip: returns the name of the interface where the IP address
                     provided as argument is found
get_ip_of_interface: returns the first IP associated to the interface
                     provided as argument

These two functions will be put into use in subsequent commits.

Signed-off-by: Marco Chiappero <marco.chiappero@suse.com>
2025-07-24 14:35:34 +00:00
9e0b5311a3 make tests more reliable
Signed-off-by: Marco Chiappero <marco.chiappero@suse.com>
2025-07-24 14:35:32 +00:00

View File

@@ -163,7 +163,7 @@ wait_for_interface_or_ip()
else
export IRONIC_IP="$PROVISIONING_IP"
fi
else
elif [[ -n "${PROVISIONING_INTERFACE}" ]]; then
until [[ -z "$IRONIC_IPV6" ]] && [[ -z "$IRONIC_IP" ]]; do
echo "Waiting for ${PROVISIONING_INTERFACE} interface to be configured"
@@ -218,6 +218,9 @@ wait_for_interface_or_ip()
export IRONIC_IPV6="$IPV6_RECORD"
export IRONIC_IPV4="$IPV4_RECORD"
else
echo "Cannot determine an interface or an IP for binding and creating URLs"
return 1
fi
# Define the URLs based on the what we have found,