Merge pull request #10968 from cybozu-go/osd-disallow-to-create-encrypted-osd-on-part

osd: disallow to create encrypted osd on partition
This commit is contained in:
Satoru Takeuchi authored and GitHub committed 2022-09-14 04:26:15 +09:00
commit 9ad82eebbb
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