Skip to content

Conversation

@mauricioharley
Copy link

Playbook Separation (based on PR #3543)

When performing Barbican adoption from OSP 17.1 to RHOSO 18, the image
creation and kustomization need to happen at different times. This PR
separates the logic into:

  • barbican-prepare-proteccio.yml: Creates custom Barbican images with
    HSM client software and sets up OpenShift secrets (certificates and login)
  • barbican-enable-proteccio.yml: Applies kustomization to configure
    the Barbican control plane to use Proteccio HSM

HSM Password Loading Fix

Added logic to load cifmw_hsm_password from the Zuul secret file at
/var/tmp/qe-secrets/proteccio_pin.yaml when the variable is not already
defined. This file is created by the qe-creds-crc.yaml pre-run playbook
in the components-integration-config repository.

This fixes the issue where the playbook would fail with:

'cifmw_hsm_password' is undefined

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 25, 2025

[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 danpawlik 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

amartyasinha
amartyasinha previously approved these changes Jan 9, 2026
michburk
michburk previously approved these changes Jan 12, 2026
@michburk michburk dismissed their stale review January 12, 2026 19:20

Changes LGTM but taking back my approval real quick to ask:
I just noticed now that this pr duplicates the changes from #3543 - is the plan to abandon that change and just go with this one? Or merge that first and rebase this one? (cc @vakwetu)
Sorry for not spotting this and asking earlier!

@mauricioharley
Copy link
Author

@michburk, the #3543 PR will be abandoned, but please don't approve/merge this PR just yet as I'm about to send a new update to it in an attempt to fix an unrelated error happening with the tests.

@evallesp
Copy link
Contributor

is this still in work in progress?

Mauricio Harley added 2 commits January 20, 2026 15:31
This commit separates the Barbican Proteccio playbook into two parts
to support adoption scenarios where image creation and kustomization
need to happen at different times:

- barbican-prepare-proteccio.yml: Creates custom Barbican images with
  HSM client and sets up OpenShift secrets
- barbican-enable-proteccio.yml: Applies kustomization to configure
  Barbican to use Proteccio HSM

Additionally, this adds support for loading the HSM password from a
Zuul secret file (/var/tmp/qe-secrets/proteccio_pin.yaml) when the
cifmw_hsm_password variable is not already defined. This file is
created by the qe-creds-crc.yaml pre-run playbook in the
components-integration-config repository.

This change is based on PR openstack-k8s-operators#3543 by Ade Lee, with the addition of
the HSM password file loading logic.

Jira: OSPRH-20112

Signed-off-by: Mauricio Harley <mharley@redhat.com>
Add early validation to fail with a descriptive error message when the
HSM password (cifmw_hsm_password) is neither defined as a variable nor
available in the Zuul secrets file.

This addresses the scenario where both conditions are unmet:
- cifmw_hsm_password is not defined in the job configuration
- The secrets file /var/tmp/qe-secrets/proteccio_pin.yaml does not exist

Previously, this would cause the playbook to continue and fail later
with an unhelpful "cifmw_hsm_password is undefined" error. Now it fails
early with a clear message explaining the two options to resolve it.

Signed-off-by: Mauricio Harley <mharley@redhat.com>
@mauricioharley
Copy link
Author

is this still in work in progress?

Hi, @evallesp. Thanks for raising this. No, it's ready for review.

@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/e9060b1562224aa69dd0adb8e65366aa

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 44m 43s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 31m 40s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 35m 15s
cifmw-crc-podified-edpm-baremetal-minor-update FAILURE in 2h 13m 28s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 9m 04s
✔️ cifmw-pod-pre-commit SUCCESS in 8m 09s

@michburk
Copy link
Contributor

recheck

Copy link
Contributor

@michburk michburk left a comment

Choose a reason for hiding this comment

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

Changes lgtm, Are there any changes pending downstream that need to be merged before/after this one? Let us know if we have to hold off on merging at all. I ask because I see the barbican-enable-proteccio.yml playbook is used in one job downstream, so if any changes need to be there we can wait for those changes to be ready.
Thanks!

@evallesp
Copy link
Contributor

Changes lgtm, Are there any changes pending downstream that need to be merged before/after this one? Let us know if we have to hold off on merging at all. I ask because I see the barbican-enable-proteccio.yml playbook is used in one job downstream, so if any changes need to be there we can wait for those changes to be ready. Thanks!

holding my approval since we need to be sure about this.
LGTM

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.

4 participants