]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
ceph-volume: improve wipefs retry logic in lvm.zap
authorGuillaume Abrioux <gabrioux@ibm.com>
Wed, 8 Jan 2025 12:17:16 +0000 (12:17 +0000)
committerGuillaume Abrioux <gabrioux@ibm.com>
Mon, 24 Feb 2025 11:53:01 +0000 (11:53 +0000)
commit9bafa3eb403c1ca19cba6623874194f108beb569
tree3c27fa7589b99d13822d1f940b101a59deb88fe4
parentc288ed7794d4b0d9ab2156e0cbd7db6e0dcdcbe3
ceph-volume: improve wipefs retry logic in lvm.zap

- Simplify the initialization of `tries` and `interval` variables for clarity.
- Adjust the retry logic in the `wipefs` function to:
  - Include the attempt count in the warning message for better debugging.
  - Start the retry loop at 1 and increment up to `tries`.
- Remove unnecessary unpacking of `stdout` and `stderr` since they were unused.
- Update the loop to increment `tries` by 1 to reflect the intended number of attempts.

This change improves code readability and makes retry behavior more transparent.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
(cherry picked from commit 297aa57ca5ff9e7822d94b504b776f12407a1854)
src/ceph-volume/ceph_volume/devices/lvm/zap.py