forked from rook/rook
Merge pull request #4811 from leseb/unclean-pvc
ceph: fail if no devices found
This commit is contained in:
@@ -214,6 +214,15 @@ func Provision(context *clusterd.Context, agent *OsdAgent, crushLocation string)
|
||||
return errors.Wrap(err, "failed to configure devices")
|
||||
}
|
||||
|
||||
// Let's fail if no OSDs were configured
|
||||
// This likely means the filter for available devices passed (in PVC case)
|
||||
// but the resulting device was already configured for another cluster (disk not wiped and leftover)
|
||||
// So we need to make sure the list is filled up, otherwise fail
|
||||
if len(deviceOSDs) == 0 {
|
||||
logger.Warningf("skipping OSD configuration as no devices matched the storage settings for this node %q", agent.nodeName)
|
||||
return nil
|
||||
}
|
||||
|
||||
logger.Infof("devices = %+v", deviceOSDs)
|
||||
|
||||
// Populate CRUSH location for each OSD on the host
|
||||
|
||||
Reference in New Issue
Block a user