Skip to content

Commit

Permalink
Merge pull request #852 from xing-yang/health_status
Browse files Browse the repository at this point in the history
Set health annotation to Inaccessible when it is not set
  • Loading branch information
k8s-ci-robot committed May 17, 2021
2 parents ff5a154 + af03ece commit 713f989
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/csi/service/common/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,10 @@ func ConvertVolumeHealthStatus(volHealthStatus string) (string, error) {
case string(pbmtypes.PbmHealthStatusForEntityUnknown):
return string(pbmtypes.PbmHealthStatusForEntityUnknown), nil
default:
return "", fmt.Errorf("cannot convert invalid volume health status %s", volHealthStatus)
// NOTE: volHealthStatus is not set by SPBM in this case.
// This implies the volume does not exist any more.
// Set health annotation to "Inaccessible" so that
// the caller can make appropriate reactions based on this status
return VolHealthStatusInaccessible, nil
}
}

0 comments on commit 713f989

Please sign in to comment.