Skip to content

Commit 9286b03

Browse files
committed
Fix possible race condition in swift_migration check
When the replicator is still moving data off the standalone node, the find command might fail with a race condition because empty directories are removed while iterating over the same subdirectories. This fix adds the "-ignore_readdir_race" option to find to ignore this kind of errors. The test should simply succeed as long as there are no .data or .db files left; empty directories will be cleaned up later and are ok. JIRA: OSPCIX-1318 Signed-off-by: Christian Schwede <cschwede@redhat.com>
1 parent 624a414 commit 9286b03

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/roles/swift_migration/tasks/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
ansible.builtin.shell: |
5858
{{ shell_header }}
5959
CONTROLLER1_SSH="{{ controller1_ssh }}"
60-
$CONTROLLER1_SSH "timeout 900s bash -c 'while \$(find /srv/node/ -type f -name \"*.db\" -o -name \"*.data\" | grep -q \".\"); do sleep 5; done'"
60+
$CONTROLLER1_SSH "timeout 900s bash -c 'while \$(find /srv/node/ -ignore_readdir_race -type f -name \"*.db\" -o -name \"*.data\" | grep -q \".\"); do sleep 5; done'"
6161
6262
- name: remove standalone node from rings
6363
ansible.builtin.shell: |

0 commit comments

Comments
 (0)