]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph-volume: fix argparse dmcrypt opts: use str type 68769/head
authorGuillaume Abrioux <gabrioux@ibm.com>
Wed, 6 May 2026 11:48:13 +0000 (13:48 +0200)
committerGuillaume Abrioux <gabrioux@ibm.com>
Wed, 6 May 2026 12:00:35 +0000 (14:00 +0200)
commitd93755c3d8d210314dad88e75cedfe93e81eb2a4
treef2405bc0c3fee5315295bd30c170d7bfeb2ee422
parent277f43c7f9708450d9bd4c3c3c32eb31dcc36298
ceph-volume: fix argparse dmcrypt opts: use str type

argparse's `type` has to be a callable that turns the CLI string into the
stored value.

Optional[str] is a typing construct. Newer argparse treats that specially
and fails with "invalid Optional value".

default=None already means the flag is optional.

Fixes: https://tracker.ceph.com/issues/76433
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
src/ceph-volume/ceph_volume/devices/lvm/common.py
src/ceph-volume/ceph_volume/tests/devices/lvm/test_batch.py
src/ceph-volume/ceph_volume/tests/devices/lvm/test_common.py