Skip to content

Conversation

@mnietoji
Copy link
Contributor

@mnietoji mnietoji commented Oct 22, 2025

Add FDP update automation for EDPM deployments

Implement comprehensive FDP update workflow including:
- New playbook fdp_update.yml orchestrating the update process
- Role fdp_edpm_update_host_packages: Updates packages on EDPM hosts
- Role fdp_update_container_images: Rebuilds container images with updated packages
  * Includes Molecule tests for validation
  * Jinja2 templates for Dockerfile and repo configuration
- Role fdp_update_edpm_containers: Updates running EDPM containers

This automation streamlines the process of updating Fast Data Path
components across OpenStack EDPM (External Data Plane Management)
deployments by coordinating host package updates, container image
rebuilds, and container deployment updates.

Assisted-By: Claude <[email protected]>

@mnietoji mnietoji requested a review from a team as a code owner October 22, 2025 13:43
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 22, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

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

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

@mnietoji mnietoji marked this pull request as draft October 22, 2025 13:44
@mnietoji mnietoji force-pushed the update_containers_package branch 6 times, most recently from 19e68bb to 55d1b16 Compare October 23, 2025 10:41
@softwarefactory-project-zuul
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/7c305864d102485fbe9dafd0ff85da35

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 47m 25s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 13m 57s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 34m 12s
cifmw-pod-zuul-files FAILURE in 4m 11s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 39s
cifmw-pod-pre-commit FAILURE in 7m 48s
✔️ build-push-container-cifmw-client SUCCESS in 17m 24s

@mnietoji mnietoji force-pushed the update_containers_package branch from 55d1b16 to cfe3b16 Compare October 23, 2025 12:45
@softwarefactory-project-zuul
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/30c74ff1ec854ebd94ca1da1b1070b64

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 41m 57s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 15m 26s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 27m 08s
cifmw-pod-zuul-files FAILURE in 4m 12s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 37s
cifmw-pod-pre-commit FAILURE in 7m 52s
✔️ build-push-container-cifmw-client SUCCESS in 16m 05s

@mnietoji mnietoji force-pushed the update_containers_package branch 10 times, most recently from 6a356e7 to d6d0563 Compare October 24, 2025 13:43
@softwarefactory-project-zuul
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/15ccfc3015ed498c8bec52bc522be2c3

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 59m 47s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 16m 09s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 41m 06s
cifmw-pod-zuul-files FAILURE in 4m 28s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 7m 46s
cifmw-pod-pre-commit FAILURE in 6m 21s
✔️ build-push-container-cifmw-client SUCCESS in 16m 13s

@mnietoji mnietoji force-pushed the update_containers_package branch 6 times, most recently from e0f9071 to f46652f Compare October 24, 2025 15:09
changed_when: _fdp_update_nat_rule.rc == 0

- name: Persist firewall rules
ansible.builtin.shell: # noqa: command-instead-of-shell
Copy link
Contributor

Choose a reason for hiding this comment

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

changed_when: false

- name: Authenticate podman with TLS verification
ansible.builtin.shell: |
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@mnietoji mnietoji force-pushed the update_containers_package branch from 78e14cb to 063c2a8 Compare November 7, 2025 10:34
@mnietoji mnietoji force-pushed the update_containers_package branch 5 times, most recently from f290329 to 0ac0413 Compare November 7, 2025 12:14
cifmw_fdp_update_container_images_repo_name: "custom-repo"
cifmw_fdp_update_container_images_repo_baseurl: "" # REQUIRED - must be set by user
cifmw_fdp_update_container_images_repo_enabled: 1
cifmw_fdp_update_container_images_repo_gpgcheck: 0
Copy link
Contributor

Choose a reason for hiding this comment

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

just a nit: do we really want to have so much parameters available?

# DNF update arguments
cifmw_fdp_update_container_images_update_dnf_args: "--disablerepo='*' --enablerepo={{ cifmw_fdp_update_container_images_repo_name }}"

# Internal variables (do not override)
Copy link
Contributor

Choose a reason for hiding this comment

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

if later you set fact with empty vars, why in defaults you put same? Please remove, otherwise we will be confused why e.g. this var is available where set_fact is setting it.


- name: Extract registry host from route
ansible.builtin.set_fact:
_cifmw_fdp_update_container_images_route:
Copy link
Contributor

Choose a reason for hiding this comment

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

why you do dict here with {'stdout': {{ cifmw_fdp_update_container_images_route_info.resources[0].spec.host if _cifmw_fdp_update_container_images_route_info.resources | length > 0 else '' }}"} ? No need to make dict.

_cifmw_fdp_update_container_images_route:
stdout: "{{ _cifmw_fdp_update_container_images_route_info.resources[0].spec.host if _cifmw_fdp_update_container_images_route_info.resources | length > 0 else '' }}"

- name: Set registry URL
Copy link
Contributor

Choose a reason for hiding this comment

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

do we really want to make var reassign here?

- name: Verify registry URL
ansible.builtin.fail:
msg: "Failed to determine registry URL. Set cifmw_fdp_update_container_images_image_registry manually."
when: cifmw_fdp_update_container_images_image_registry is not defined or cifmw_fdp_update_container_images_image_registry | length == 0
Copy link
Contributor

Choose a reason for hiding this comment

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

so if you verify here length because other condition fail, why not move the condition here instead of verify length?

ansible.builtin.debug:
msg:
- "=========================================="
- "✓ Container image update complete"
Copy link
Contributor

Choose a reason for hiding this comment

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

please remove the non-ascii chars

# under the License.

- name: Create repository file
ansible.builtin.template:
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: consider to use module, just a hint, not something important.


- name: Display progress
ansible.builtin.debug:
msg: "✓ Updated {{ image_entry.key }} ({{ _cifmw_fdp_update_container_images_processed_images }}/{{ _cifmw_fdp_update_container_images_image_entries | length }})"
Copy link
Contributor

Choose a reason for hiding this comment

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

same with non ascii chars

@@ -0,0 +1,3 @@
FROM {{ base_image }}
COPY ./{{ cifmw_fdp_update_container_images_repo_name }}.repo /etc/yum.repos.d/
RUN dnf update -y {{ cifmw_fdp_update_container_images_update_dnf_args }} {{ cifmw_fdp_update_container_images_target_package }}*
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: dnf clean all can save few MB

4. Pushing updated images to OpenShift internal registry
5. Patching OpenStackVersion CR to use the new images

## Privilege escalation
Copy link
Contributor

Choose a reason for hiding this comment

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

you can remove the chapter

Implement comprehensive FDP update workflow including:
- New playbook fdp_update.yml orchestrating the update process
- Role fdp_edpm_update_host_packages: Updates packages on EDPM hosts
- Role fdp_update_container_images: Rebuilds container images with updated packages
  * Includes Molecule tests for validation
  * Jinja2 templates for Dockerfile and repo configuration
- Role fdp_update_edpm_containers: Updates running EDPM containers

This automation streamlines the process of updating Fast Data Path
components across OpenStack EDPM (External Data Plane Management)
deployments by coordinating host package updates, container image
rebuilds, and container deployment updates.

Assisted-By: Claude <[email protected]>
Signed-off-by: Miguel Angel Nieto Jimenez <[email protected]>
@mnietoji mnietoji force-pushed the update_containers_package branch from 0ac0413 to 0796edc Compare November 7, 2025 13:39
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 7, 2025

@mnietoji: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/images 0796edc link true /test images

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@softwarefactory-project-zuul
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/a7d3f702a34f4e228d124d8d2e863162

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 35m 50s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 17m 01s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 21m 58s
✔️ cifmw-pod-zuul-files SUCCESS in 4m 16s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 20s
cifmw-pod-pre-commit FAILURE in 7m 50s
✔️ build-push-container-cifmw-client SUCCESS in 18m 58s
✔️ cifmw-molecule-fdp_update_container_images SUCCESS in 1m 47s
✔️ cifmw-molecule-fdp_update_edpm SUCCESS in 1m 44s

@mnietoji mnietoji closed this Nov 7, 2025
@mnietoji mnietoji reopened this Nov 7, 2025
@mnietoji
Copy link
Contributor Author

mnietoji commented Nov 7, 2025

Splitted in 2 PRs for the code review:
#3466
#3467

Closing this one

@mnietoji mnietoji closed this Nov 7, 2025
@danpawlik
Copy link
Contributor

so now I need to check 3466 and compare with my comments that I left here. Might take 2x more time to review it.

@evallesp
Copy link
Contributor

so now I need to check 3466 and compare with my comments that I left here. Might take 2x more time to review it.

I'm reviewing it, I'm moving you'r reviews there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants