]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph-volume: fix regex usage in `set_dmcrypt_no_workqueue` 62791/head
authorGuillaume Abrioux <gabrioux@ibm.com>
Wed, 19 Jun 2024 13:06:52 +0000 (15:06 +0200)
committerMatt Vandermeulen <matt@reenigne.net>
Fri, 11 Apr 2025 19:47:01 +0000 (16:47 -0300)
commit69e5789f4ac81d79393fcd8fcc0f65578c518c43
tree9ff6fa260b25db76eaf532e6932af9f3dea91490
parent5f71b3ff4da03d46598f003d5e1006739f7fed70
ceph-volume: fix regex usage in `set_dmcrypt_no_workqueue`

- Updated the regex pattern to `r'(\d+\.?)+'` to more accurately
  capture version numbers.

- Replaced `re.match` with `re.search` to properly match the cryptsetup
  version in the output.

- `re.match` only checks for a match at the beginning of the string,
   while `re.search` looks for a match anywhere in the string.

This fix ensures that the function correctly retrieves the
cryptsetup version from the output.

Fixes: https://tracker.ceph.com/issues/66393
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
src/ceph-volume/ceph_volume/tests/util/test_encryption.py
src/ceph-volume/ceph_volume/util/encryption.py