ceph: report osd status when there are no devices

The OSD prepare pod must always update status on the status configmap
in order to alert the operator that the OSD configuration on the node
is completed. This fixes an issue where the status was not being reported
if no devices were configured.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
This commit is contained in:
Travis Nielsen committed 2020-03-05 14:10:24 -07:00
1 parent a52948e7f7
commit 3cef930fab
1 file changed
+2
+2
View File
@@ -232,6 +232,8 @@ func Provision(context *clusterd.Context, agent *OsdAgent, crushLocation string)
// 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)
status = oposd.OrchestrationStatus{OSDs: deviceOSDs, Status: oposd.OrchestrationStatusCompleted, PvcBackedOSD: agent.pvcBacked}
oposd.UpdateNodeStatus(agent.kv, agent.nodeName, status)
return nil
}