Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • very-demiurge-very-mindful/kayobe
1 result
Show changes
Commits on Source (12)
Showing
with 124 additions and 15 deletions
......@@ -2,3 +2,4 @@
host=review.opendev.org
port=29418
project=openstack/kayobe.git
defaultbranch=stable/2024.2
......@@ -50,6 +50,7 @@ ipa_build_dib_env_default:
DIB_RELEASE: "{{ '9-stream' if os_distribution == 'rocky' else os_release }}"
DIB_REPOLOCATION_ironic_python_agent: "{{ ipa_build_source_url }}"
DIB_REPOREF_ironic_python_agent: "{{ ipa_build_source_version }}"
DIB_REPOREF_requirements: "{{ ipa_build_source_version }}"
# Dictionary of additional environment variables to provide to Diskimage
# Builder (DIB) during IPA image build.
......
......@@ -37,7 +37,7 @@
- name: confirm_deprovision
prompt: |
The following hosts will be deprovisioned:
{{ play_hosts | join(', ') }}
{{ play_hosts | intersect(groups['overcloud'] | default([])) | join(', ') }}
If you want to proceed type: yes
default: "no"
private: false
......
......@@ -21,3 +21,23 @@ image_download_dest:
# Host from which to fetch the image.
# Only used when image_download_path is set.
image_download_host: "{{ inventory_hostname }}"
# Username for Digest, Basic or WSSE authentication. Default is unset, in which
# case the parameter is omitted.
image_download_url_username:
# Password for Digest, Basic or WSSE authentication. Default is unset, in which
# case the parameter is omitted.
image_download_url_password:
# Force sending the Basic authentication header upon initial request. Useful if
# the remote endpoint does not respond with HTTP 401 to the initial
# unauthenticated request. Must be a boolean. Default is unset, in which case
# the parameter is omitted.
image_download_force_basic_auth:
# List of header names that will not be sent on subsequent redirected requests.
# Set to ['Authorization'] if being redirected from an authenticated endpoint
# to an unauthenticated endpoint. Default is unset, in which case the parameter
# is omitted.
image_download_unredirected_headers:
......@@ -15,6 +15,10 @@
uri:
url: "{{ image_download_checksum_url }}"
return_content: true
url_username: "{{ image_download_url_username or omit }}"
url_password: "{{ image_download_url_password or omit }}"
force_basic_auth: "{{ image_download_force_basic_auth or omit }}"
unredirected_headers: "{{ image_download_unredirected_headers or omit }}"
register: expected_checksum
until: expected_checksum is successful
retries: 3
......@@ -35,6 +39,10 @@
# Always download the image if we have no checksum to compare with.
force: "{{ expected_checksum is skipped }}"
backup: true
url_username: "{{ image_download_url_username or omit }}"
url_password: "{{ image_download_url_password or omit }}"
force_basic_auth: "{{ image_download_force_basic_auth or omit }}"
unredirected_headers: "{{ image_download_unredirected_headers or omit }}"
register: result
until: result is successful
retries: 3
......
......@@ -274,7 +274,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 {
......@@ -593,6 +593,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
......
#!/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}"
......@@ -62,15 +62,14 @@ image build``.
``ipa_build_dib_elements_extra``.
``ipa_build_dib_env_default``
Dictionary of default environment variables to provide to Diskimage Builder
(DIB) during IPA image build. Default is
``{"DIB_RELEASE": "9-stream", "DIB_REPOLOCATION_ironic_python_agent": "{{
ipa_build_source_url }}", "DIB_REPOREF_ironic_python_agent": "{{
ipa_build_source_version }}", "DIB_REPOREF_requirements": "{{
openstack_branch }}"}`` if ``os_distribution`` is ``"rocky"`` else
``{"DIB_RELEASE": "jammy", "DIB_REPOLOCATION_ironic_python_agent": "{{
ipa_build_source_url }}", "DIB_REPOREF_ironic_python_agent": "{{
ipa_build_source_version }}", "DIB_REPOREF_requirements": "{{
openstack_branch }}"}``.
(DIB) during IPA image build. Default is ``{"DIB_RELEASE": "9-stream",
"DIB_REPOLOCATION_ironic_python_agent": "{{ ipa_build_source_url }}",
"DIB_REPOREF_ironic_python_agent": "{{ ipa_build_source_version }}",
"DIB_REPOREF_requirements": "{{ ipa_build_source_version }}"}`` if
``os_distribution`` is ``"rocky"`` else ``{"DIB_RELEASE": "{{ os_release
}}", "DIB_REPOLOCATION_ironic_python_agent": "{{ ipa_build_source_url }}",
"DIB_REPOREF_ironic_python_agent": "{{ ipa_build_source_version }}",
"DIB_REPOREF_requirements": "{{ ipa_build_source_version }}"}``.
``ipa_build_dib_env_extra``
Dictionary of additional environment variables to provide to Diskimage
Builder (DIB) during IPA image build. Default is empty.
......
......@@ -3,7 +3,7 @@
# process, which may cause wedges in the gate later.
ansible-lint>=3.0.0,<6.0.0,!=4.3.0 # MIT
ansible-compat # MIT
ansible-compat<25.0.0 # MIT
docker # Apache-2.0
molecule # MIT
molecule-plugins[docker] # MIT
......
......@@ -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
......@@ -158,13 +158,13 @@ def test_docker_storage_driver_is_overlay2(host):
@pytest.mark.parametrize('user', ['kolla', 'stack'])
def test_docker_image_download(host, user):
with host.sudo(user):
host.check_output("docker pull alpine")
host.check_output("docker pull quay.io/podman/hello")
@pytest.mark.parametrize('user', ['kolla', 'stack'])
def test_docker_container_run(host, user):
with host.sudo(user):
host.check_output("docker run --rm alpine /bin/true")
host.check_output("docker run --rm quay.io/podman/hello")
def test_timezone(host):
......
---
fixes:
- |
Fixes a bug where non-overcloud hosts would show up in the confirmation
prompt for ``kayobe overcloud deprovision``
`LP#2091703 <https://bugs.launchpad.net/kayobe/+bug/2091621>`__
---
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>`_.
---
features:
- |
Adds variables to configure authentication parameters in the
``image-download`` role, which is used to download IPA images. The new
variables are ``image_download_url_username``,
``image_download_url_password``, ``image_download_force_basic_auth`` and
``image_download_unredirected_headers``. See documentation of the `get_url
<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/get_url_module.html>`__
and `uri
<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/uri_module.html>`__
Ansible modules for more details on how to use these variables.
---
fixes:
- |
Pin requirements for IPA image build to ensure that the ``ironic-lib``
version matches ``ironic-python-agent``.
`LP#2089263 <https://bugs.launchpad.net/kayobe/+bug/2089263>`__
......@@ -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
......