Repository navigation
Revert "[multiple] Use Python 3.12 and ansible-core 2.16.19 in CI" - #4302
Conversation
This reverts commit f9a3410. Signed-off-by: Michael Burke <michburk@redhat.com>
PR Summary by QodoRevert Python 3.12 and ansible-core 2.16 CI migration
AI Description
Diagram
High-Level Assessment
Files changed (21)
|
Code Review by Qodo
1. CentOS controller bootstrap loses Ansible
|
| ansible-inventory | ||
| -i {{ cifmw_libvirt_manager_tmp_inv_file }} | ||
| -y --list > {{ cifmw_libvirt_manager_dst_inv_file }} | ||
| ignore_errors: true # noqa: ignore-errors |
There was a problem hiding this comment.
1. Failed conversion can erase the inventory 🐞 Bug ≡ Correctness
generate_networking_data.yml now ignores a failed ansible-inventory conversion, while the following task still removes the source INI inventory. If conversion fails, the role continues with a missing or incomplete YAML inventory and no source file to retry from.
Agent Prompt
## Issue description
A failed inventory conversion is ignored, but the source inventory is still deleted.
## Fix Focus Areas
- roles/libvirt_manager/tasks/generate_networking_data.yml[142-153]
## Recommended Fix
Let conversion failures stop the task, or gate source deletion on a successful conversion and retain the failure for diagnosis.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| - oauthlib | ||
| executable: /usr/bin/pip3 | ||
| extra_args: "--user --constraint {{ _controller_ansible_dependencies.requirements | quote }}" | ||
| failed_when: false |
There was a problem hiding this comment.
3. Controller dependency failures are hidden 🐞 Bug ☼ Reliability
configure_bm_ocp_controller.yml sets failed_when: false on the task that installs the controller's Ansible and Kubernetes requirements. If pip cannot install those requirements, bare-metal controller setup continues until a later task needs a missing dependency, obscuring the installation failure.
Agent Prompt
## Issue description
The bare-metal controller suppresses pip installation failures despite relying on the installed requirements.
## Fix Focus Areas
- roles/reproducer/tasks/configure_bm_ocp_controller.yml[127-147]
## Recommended Fix
Remove the unconditional `failed_when: false`, or handle only a specifically expected failure while reporting other installation errors.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| - name: Install Ansible tools for local controller operations | ||
| ansible.builtin.pip: | ||
| name: "ansible-core=={{ ansible_version.full }}" | ||
| executable: /usr/bin/pip3.12 | ||
| extra_args: --user |
There was a problem hiding this comment.
2. Centos controller bootstrap loses ansible 🐞 Bug ≡ Correctness
ci_setup no longer installs Ansible through pip, and its generic package list does not include the RPM added only for Red Hat. On a supported CentOS controller, bootstrap can reach the bare ansible-playbook invocation without an executable supplied by that setup path; removing the user-local PATH entry also prevents that invocation from finding a pip-installed copy.
Agent Prompt
## Issue description
The generic controller package path no longer provisions a discoverable Ansible executable.
## Fix Focus Areas
- roles/ci_setup/tasks/packages.yml[66-70]
- roles/ci_setup/vars/main.yml[21-27]
- roles/reproducer/tasks/main.yml[425-435]
## Recommended Fix
Install Ansible on generic controller hosts as well as Red Hat hosts, and ensure bootstrap commands can resolve its executable.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| - bash-completion | ||
| - make | ||
| - tmux | ||
| - python3-cryptography |
There was a problem hiding this comment.
4. Centos secret generation can lack python 🐞 Bug ≡ Correctness
ci_setup removes python3-cryptography from its generic package list, while kustomize_deploy explicitly runs system python3 to generate a Barbican Fernet key. On a CentOS host without that module already installed, deployments that need a generated key fail at the import rather than producing the secret.
Agent Prompt
## Issue description
Generic CI setup no longer guarantees the system-Python module used for Fernet key generation.
## Fix Focus Areas
- roles/ci_setup/vars/main.yml[21-27]
- roles/kustomize_deploy/tasks/inject_osp_secret_keys.yml[122-133]
## Recommended Fix
Keep `python3-cryptography` in the generic package list, or install it explicitly before the system-Python key-generation task.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| - python3-pip | ||
| - python3.12 | ||
| - python3.12-pip | ||
| - sshpass |
There was a problem hiding this comment.
5. Centos idrac cleanup can skip a reset 🐞 Bug ≡ Correctness
ci_setup removes sshpass from its generic package list, but bm_eject_vmedia.yml uses that executable to check whether an iDRAC remote file share needs resetting. On a CentOS bare-metal reproducer without a separately installed sshpass, the status command's failure is suppressed and its empty output prevents the reset branch from running.
Agent Prompt
## Issue description
Generic CI setup drops the executable required to inspect and clear lingering iDRAC remote file shares.
## Fix Focus Areas
- roles/ci_setup/vars/main.yml[21-27]
- roles/bm_sno/tasks/bm_eject_vmedia.yml[29-56]
## Recommended Fix
Restore `sshpass` for generic hosts that run bare-metal SNO, and do not treat a missing status command as evidence that no reset is needed.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| if [[ "$n" -ge "$ANSIBLE_GALAXY_RETIRES" ]]; then | ||
| echo "ERROR: collection installation failed after ${ANSIBLE_GALAXY_RETIRES} attempts" >&2 | ||
| exit 1 |
There was a problem hiding this comment.
6. Test runs can use a stale collection 🐞 Bug ≡ Correctness
run_ansible_test no longer exits when all ansible-galaxy collection install attempts fail. If an older collection already exists at the expected path, the script can append sanity exceptions there and run tests against that old installation instead of the current checkout.
Agent Prompt
## Issue description
The test runner continues after every collection-install attempt fails and may test an existing stale collection.
## Fix Focus Areas
- scripts/run_ansible_test[42-60]
## Recommended Fix
Restore an explicit nonzero exit after exhausted retries, before reading collection files or launching tests.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Valkyrie00 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
afe31d0
into
openstack-k8s-operators:main
This reverts commit f9a3410.