]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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>
Wed, 8 Jan 2025 12:29:14 +0000 (12:29 +0000)
commit297aa57ca5ff9e7822d94b504b776f12407a1854
tree03769670035b6a41c60131310222a5e311c48edd
parent8056c233a9e805c7edf44a6dd35003ccf16e5e8e
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>
src/ceph-volume/ceph_volume/devices/lvm/zap.py