canonical / microceph

MicroCeph is snap-deployed Ceph with built-in clustering
https://snapcraft.io/microceph
GNU Affero General Public License v3.0
222 stars 35 forks source link

Report encryption support before first attempt #455

Open masnax opened 6 days ago

masnax commented 6 days ago

MicroCeph supports OSD encryption with the --encrypt flag. In order for this to work, a user must first run the following before adding the disks they want.

sudo snap connect microceph:dm-crypt
sudo snap restart microceph.daemon

However, in practice you are only informed of the current status if you manually attempt to add a disk. If the above connection hasn't been established, MicroCeph returns an error informing you to run those commands and try again.

This poses a particular issue for MicroCloud because we can't view MicroCeph's snap connections. Instead after the clusters have been formed and the disks are being created, the whole initialization breaks because the connection was not established beforehand.

It would be convenient if this information could be included in microceph status with a line similar to encryption: enabled/disabled. That way in MicroCloud we can detect ahead of time if the connection has been made by checking against the MicroCeph API. Then we can either prompt the user to enable encryption per OSD or warn them that encryption is not enabled across their snaps.

Not a blocker for the LTS, but would be nice to include in a coming point release.

masnax commented 6 days ago

Doesn't look like MicroCeph has a status API so I don't know if services or config is a better place for this, and then it can also be included in the CLI status command as well.

UtkarshBhatthere commented 6 days ago

status API is incoming :D #453