Skip to content

Commit 8958f87

Browse files
toskyopenshift-merge-bot[bot]
authored andcommitted
Add a (post-deploy) hook to set a multiattach volume type
This is required by a few tempest tests, see https://review.opendev.org/c/openstack/tempest/+/875372 . This is the ci-framework port of this devstack change: https://review.opendev.org/c/openstack/devstack/+/877337
1 parent 616eeef commit 8958f87

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
- name: Create cinder resources needed for tempest run
3+
hosts: "{{ cifmw_target_hook_host | default('localhost') }}"
4+
gather_facts: false
5+
tasks:
6+
- name: Set the multiattach volume type name
7+
ansible.builtin.set_fact:
8+
cifmw_volume_multiattach_type: "{{ cifmw_volume_multiattach_type|default('multiattach') }}"
9+
10+
- name: Set a multiattach volume type and create it if needed
11+
environment:
12+
KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}"
13+
PATH: "{{ cifmw_path }}"
14+
ansible.builtin.shell: |
15+
oc -n {{ cifmw_install_yamls_defaults['NAMESPACE'] }} rsh openstackclient \
16+
openstack volume type show {{ cifmw_volume_multiattach_type }} &>/dev/null || \
17+
oc -n {{ cifmw_install_yamls_defaults['NAMESPACE'] }} rsh openstackclient \
18+
openstack volume type create {{ cifmw_volume_multiattach_type }}
19+
oc -n {{ cifmw_install_yamls_defaults['NAMESPACE'] }} rsh openstackclient \
20+
openstack volume type set --property multiattach="<is> True" {{ cifmw_volume_multiattach_type }}

0 commit comments

Comments
 (0)