Skip to content

Commit e3308d6

Browse files
author
Mauricio Harley
committed
Skip barbican_adoption role when barbican is not enabled
The barbican_adoption role runs unconditionally in all test playbooks, even when Barbican is not deployed on the source TripleO standalone. The KEK extraction fails with a KeyError and silently writes an empty BarbicanSimpleCryptoKEK to osp-secret. The barbican-operator then rejects the empty value with "empty password not allowed" (validation introduced by lib-common PR #672), and the job times out waiting for Barbican pods that are never created. Gate the barbican_adoption role on prelaunch_barbican_secret, which is already written to vars.yaml by the deploy playbook with the value of enable_barbican. This is consistent with how tls_adoption and telemetry_adoption are already gated on variables present in vars.yaml. Signed-off-by: Mauricio Harley <mharley@redhat.com>
1 parent ebf7e74 commit e3308d6

7 files changed

Lines changed: 6 additions & 7 deletions

File tree

tests/playbooks/test_minimal.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
- role: barbican_adoption
3737
tags:
3838
- barbican_adoption
39-
when: enable_barbican|default(true)|bool
39+
when: prelaunch_barbican_secret | default(false) | bool
4040
- role: neutron_adoption
4141
tags:
4242
- neutron_adoption

tests/playbooks/test_rollback_minimal.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
- role: barbican_adoption
3838
tags:
3939
- barbican_adoption
40-
when: enable_barbican|default(true)|bool
40+
when: prelaunch_barbican_secret | default(false) | bool
4141
- role: neutron_adoption
4242
tags:
4343
- neutron_adoption

tests/playbooks/test_rollback_with_ceph.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
- role: barbican_adoption
4646
tags:
4747
- barbican_adoption
48-
when: enable_barbican|default(true)|bool
48+
when: prelaunch_barbican_secret | default(false) | bool
4949
- role: neutron_adoption
5050
tags:
5151
- neutron_adoption

tests/playbooks/test_with_ceph.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
- role: barbican_adoption
4646
tags:
4747
- barbican_adoption
48-
when: enable_barbican|default(true)|bool
48+
when: prelaunch_barbican_secret | default(false) | bool
4949
- role: neutron_adoption
5050
tags:
5151
- neutron_adoption

tests/playbooks/test_with_ceph_and_ironic.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
- role: barbican_adoption
7070
tags:
7171
- barbican_adoption
72-
when: enable_barbican|default(true)|bool
72+
when: prelaunch_barbican_secret | default(false) | bool
7373
- role: neutron_adoption
7474
tags:
7575
- neutron_adoption

tests/playbooks/test_with_ironic.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
- role: barbican_adoption
5858
tags:
5959
- barbican_adoption
60-
when: enable_barbican|default(true)|bool
60+
when: prelaunch_barbican_secret | default(false) | bool
6161
- role: neutron_adoption
6262
tags:
6363
- neutron_adoption

tests/roles/barbican_adoption/tasks/main.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@
9191
delay: "{{ barbican_retry_delay }}"
9292

9393
- name: check that Barbican secret payload was migrated successfully
94-
when: prelaunch_barbican_secret|default(false)
9594
ansible.builtin.shell: |
9695
{{ shell_header }}
9796
{{ oc_header }}

0 commit comments

Comments
 (0)