Bump version of MichaelRigart.interfaces

The newer version sets the connection.autoconnect-slaves=1 config
option[1]. This will ensure that slave interfaces will also reconnect
after bouncing the parent.

[1] https://github.com/michaelrigart/ansible-role-interfaces/releases/tag/v1.15.1

Closes-Bug: #2072340
Change-Id: I2d7a8f1368d4f0e02d199029c15c453a56582b41
This commit is contained in:
Will Szumski 2024-11-11 12:20:53 +00:00 committed by Pierre Riteau
parent febe06c06a
commit 447635ac54
5 changed files with 58 additions and 2 deletions

View File

@ -286,7 +286,7 @@ function environment_setup {
function run_kayobe {
# Run a kayobe command, including extra arguments provided via
# $KAYOBE_EXTRA_ARGS.
kayobe ${KAYOBE_EXTRA_ARGS} $*
kayobe ${KAYOBE_EXTRA_ARGS} "${@}"
}
function control_host_bootstrap {
@ -611,6 +611,25 @@ function overcloud_test_init {
fi
}
function overcloud_test_bounce_interface {
shift
LIMIT=$1
INTERFACE=$2
environment_setup
# Change current configuration so that a subsequent host configure will bounce the interfaces:
if is_dnf; then
# Rocky
run_kayobe overcloud host command run -b --command "rm -f /etc/NetworkManager/system-connections/$INTERFACE.nmconnection" --limit "$LIMIT"
else
# Ubuntu
run_kayobe overcloud host command run -b --command "rm -f /etc/systemd/network/50-kayobe-$INTERFACE.network" --limit "$LIMIT"
fi
# Trigger bounce
run_kayobe overcloud host configure -t network
}
function overcloud_test {
set -eu

View File

@ -0,0 +1,21 @@
#!/bin/bash
set -eu
set -o pipefail
# Bounces a given interface on hosts matching the supplied limit.
# Positional arguments:
# arg0: Ansible limit
# arg1: Interface to bounce
PARENT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "${PARENT}/functions"
function main {
config_init
overcloud_test_bounce_interface controllers "${@}"
}
main "${@:1}"

View File

@ -10,6 +10,11 @@
testinfra_venv: ~/testinfra-venv
test_path: "{{ kayobe_src_dir }}/playbooks/kayobe-overcloud-host-configure-base/tests/"
tasks:
- name: Prevent NetworkManager from managing default interface
command: 'nmcli dev set {{ ansible_facts.default_ipv4.interface }} managed no'
become: true
when: ansible_facts.os_family == 'RedHat'
- name: Ensure overcloud is deployed
shell:
cmd: "{{ kayobe_src_dir }}/dev/overcloud-deploy.sh &> {{ logs_dir }}/ansible/overcloud-deploy"
@ -29,3 +34,8 @@
command: "{{ testinfra_venv }}/bin/py.test {{ test_path }} --html={{ logs_dir }}/test-results.html --self-contained-html"
environment:
SITE_MIRROR_FQDN: "{{ zuul_site_mirror_fqdn }}"
- name: Test bouncing interfaces
shell:
cmd: "{{ kayobe_src_dir }}/dev/overcloud-test-bounce-interface.sh controllers br1 &> {{ logs_dir }}/ansible/overcloud-test-bounce-interface"
executable: /bin/bash

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Fixes an issue where slave interfaces would not be brought back up when
bouncing the master interface.
`LP#2072340 <https://bugs.launchpad.net/kayobe/+bug/2072340>`_.

View File

@ -27,7 +27,7 @@ roles:
# There are no versioned releases of this role.
version: acd08fd126d0e442ab8b3bc518e37761390d8c2f
- src: MichaelRigart.interfaces
version: v1.14.4
version: v1.15.1
- src: mrlesmithjr.chrony
version: v0.1.4
- src: mrlesmithjr.manage_lvm