Skip to content

Commit 475de07

Browse files
authored
Add retries for removing datavol mountpoint if busy
There are some corner cases, like [1], when unmounting our (encrypted or not) data volume succeeds but the subsequent mount remove task fails; presumably this is a strange race condition due to the speed of execution between the two tasks. Make mount remove task more resilient but adding retries if it fails. Closes elastic#47 Relates elastic#48 [1] https://groups.google.com/a/elastic.co/d/msg/build-elasticsearch/nK8N3QQlpxI/1eE3WZBcAQAJ
1 parent e5a9ab0 commit 475de07

File tree

2 files changed

+8
-0
lines changed
  • fixtures/ansible/roles

2 files changed

+8
-0
lines changed

fixtures/ansible/roles/encryption-at-rest/tasks/linux/main.yml

+4
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
dump: 0
3434
passno: 2
3535
state: absent
36+
register: remove_mount_result
37+
retries: 5
38+
delay: 10
39+
until: remove_mount_result | success
3640

3741
- name: populate passphrase file for encrypted device
3842
copy:

fixtures/ansible/roles/initialize-data-disk/tasks/linux/main.yml

+4
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
dump: 0
3434
passno: 2
3535
state: absent
36+
register: remove_mount_result
37+
retries: 5
38+
delay: 10
39+
until: remove_mount_result | success
3640

3741
- name: delete cryptsetup passphrase file if present
3842
file:

0 commit comments

Comments
 (0)