Skip to content

[update] Add optional cleanup of OpenStack resources#4023

Open
mnietoji wants to merge 1 commit into
openstack-k8s-operators:mainfrom
mnietoji:update-cleanup-resources
Open

[update] Add optional cleanup of OpenStack resources#4023
mnietoji wants to merge 1 commit into
openstack-k8s-operators:mainfrom
mnietoji:update-cleanup-resources

Conversation

@mnietoji

@mnietoji mnietoji commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

The update role creates test workloads (ping test VM, ports) on OpenStack during the update procedure but never cleans them up. This leaves ports allocated on the external network, which blocks subsequent test jobs from recreating subnets.

Add a cleanup step at the end of the update role that runs the workload_launch.sh script in cleanup mode to delete the test VM and associated ports. The cleanup runs by default and can be disabled with cifmw_update_dont_cleanup for debugging.

Based on the work from #3335 by Sofer Athlan-Guyot which was closed by the stale bot before merging.

Related-Issue: #OSPRH-20307

@openshift-ci

openshift-ci Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign archana203 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@michburk michburk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two small things to consider, largely lgtm

Comment thread roles/update/defaults/main.yml Outdated
oc rsh -n {{ cifmw_update_namespace }} openstackclient openstack

## User facing
cifmw_update_dont_cleanup: false

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe a nit and if you disagree and want to keep it this way, that's fine, but I think cifmw_update_cleanup: true would be clearer than the double negative of ...dont_cleanup: false

Comment thread roles/update/tasks/cleanup.yml Outdated
Comment on lines +30 to +32
ansible.builtin.shell: >
podman cp lopenstackclient:{{ cifmw_update_artifacts_basedir_suffix }}/.
{{ cifmw_update_artifacts_basedir }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be ansible.builtin.comand

@mnietoji mnietoji force-pushed the update-cleanup-resources branch from 4bc9d77 to 0c7140f Compare July 2, 2026 14:11
The update role creates test workloads (ping test VM, ports) on
OpenStack during the update procedure but never cleans them up.
This leaves ports allocated on the external network, which blocks
subsequent test jobs from recreating subnets.

Add a cleanup step at the end of the update role that runs the
workload_launch.sh script in cleanup mode to delete the test VM
and associated ports. The cleanup runs by default and can be
disabled with cifmw_update_dont_cleanup for debugging.

Based on the work from openstack-k8s-operators#3335 by Sofer Athlan-Guyot which was
closed by the stale bot before merging.

Related-Issue: #OSPRH-20307

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Miguel Angel Nieto Jimenez <mnietoji@redhat.com>
@mnietoji mnietoji force-pushed the update-cleanup-resources branch from 0c7140f to 60b3eb0 Compare July 2, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants