Add workarount to attach volumes in an determined order
This commit is contained in:
parent
cda4173f12
commit
2c2c0ec604
2 changed files with 8 additions and 2 deletions
|
@ -16,6 +16,7 @@ runcmd:
|
|||
- [ systemctl, enable, chronyd ]
|
||||
- systemctl restart chronyd
|
||||
- mkdir -p /var/snap
|
||||
- timeout 60 /bin/bash -c 'until ls /dev/sdb 2>/dev/null;do sleep 1;done'
|
||||
- vgcreate snapvg /dev/sdb
|
||||
- lvcreate -n lvol_snap -l 100%FREE snapvg
|
||||
- mkfs -t xfs -n ftype=1 /dev/snapvg/lvol_snap
|
||||
|
|
|
@ -40,11 +40,16 @@
|
|||
flavor: b2.c4r16
|
||||
key_name: manderssonpub
|
||||
boot_volume: kube{{ item }}-matrix-test-sunet-se-osvol
|
||||
volumes:
|
||||
- "kube{{ item }}-matrix-test-sunet-se-snapvol"
|
||||
nics:
|
||||
- port-name: "kube{{ item }}-matrix-test-sunet-se-port"
|
||||
security_groups: "{{ kubesecgroups | join(',') }}"
|
||||
userdata: |
|
||||
{{ lookup('ansible.builtin.template', 'kubenodes-user.yaml.j2') | indent(4, False ) }}
|
||||
loop: "{{ range(1, numnodes + 1 )|list }}"
|
||||
|
||||
- name: Attaches snap volume to kubernetes nodes
|
||||
openstack.cloud.server_volume:
|
||||
state: present
|
||||
server: "kube{{ item }}.matrix-test.sunet.se"
|
||||
volume: "kube{{ item }}-matrix-test-sunet-se-snapvol"
|
||||
loop: "{{ range(1, numnodes + 1 )|list }}"
|
||||
|
|
Loading…
Add table
Reference in a new issue