osd: disallow to create encrypted osd on partition

Rook doesn't support encrypted osd on partition. So we should
skip partitions as candidates of the new encrypted osds.

Closes: https://github.com/rook/rook/issues/10911

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
This commit is contained in:
Satoru Takeuchi committed 2022-09-13 12:04:14 +00:00
1 parent e5fe5e7081
commit 591fc5f68b
1 file changed
+5
+5
View File
@@ -435,6 +435,11 @@ func getAvailableDevices(context *clusterd.Context, agent *OsdAgent) (*DeviceOsd
}
logger.Infof("device %q is available.", device.Name)
if device.Type == sys.PartType && agent.storeConfig.EncryptedDevice {
logger.Infof("partition %q is not picked because encrypted OSD on partition is not allowed", device.Name)
continue
}
var deviceInfo *DeviceOsdIDEntry
if agent.metadataDevice != "" && agent.metadataDevice == device.Name {
// current device is desired as the metadata device