Comment 2 for bug 2056765

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ansible-playbooks (master)

Reviewed: https://review.opendev.org/c/starlingx/ansible-playbooks/+/912463
Committed: https://opendev.org/starlingx/ansible-playbooks/commit/e63bfd683e5ffe3db941f921129b6fafab790c0f
Submitter: "Zuul (22348)"
Branch: master

commit e63bfd683e5ffe3db941f921129b6fafab790c0f
Author: Erickson Silva de Oliveira <email address hidden>
Date: Mon Mar 11 11:13:39 2024 -0300

    Add flock in wipe_osds.sh to avoid race condition

    When running the script to wipe the OSDs, it sometimes happened
    that the second partition was not found, although it was there.

    Analyzing the code, it was possible to replicate the problem,
    which is caused by a race condition when running the parted
    command on the first partition, which causes udev to be reloaded
    while the second partition was being processed.

    To solve this problem, the “flock” command was used to lock the
    entire disk, not just the partition.

    Additionally, the use of udevadm has also been removed.

    Test Plan:
      - PASS: (AIO-SX) Replace wipe_osds.sh with changes,
              run and check script output

    Closes-Bug: 2056765

    Change-Id: Icbc351a868b413a51dc8273ca422737d39756b3b
    Signed-off-by: Erickson Silva de Oliveira <email address hidden>