]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
ceph-volume: honour osd_dmcrypt_key_size option
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 25 Jan 2022 09:25:53 +0000 (10:25 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Thu, 10 Feb 2022 12:45:06 +0000 (13:45 +0100)
commitf69339e00f582ec64b843ff58b66817975fca0d7
treef15d8b6260b7a8101bbffc261b778e398039090b
parentfe7041d6507e2131d39e27e4505599637ff0ef23
ceph-volume: honour osd_dmcrypt_key_size option

ceph-volume doesn't honour osd_dmcrypt_key_size.
It means the default size is always applied.

It also changes the default value in `get_key_size_from_conf()`

From cryptsetup manpage:

> For XTS mode you can optionally set a key size of 512 bits with the -s option.

Using more than 512bits will end up with the following error message:

```
Key size in XTS mode must be 256 or 512 bits.
```

Fixes: https://tracker.ceph.com/issues/54006
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 47c33179f9a15ae95cc1579a421be89378602656)
src/ceph-volume/ceph_volume/tests/util/test_encryption.py
src/ceph-volume/ceph_volume/util/encryption.py