Skip to content

Commit 6622ee6

Browse files
committed
Change Unavailable error codes that signal a problem with the driver to Internal error codes in preparation for filtering out Unavailable from our SLO
1 parent 7a47671 commit 6622ee6

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

pkg/gce-cloud-provider/compute/gce-compute.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,8 @@ func wrapOpErr(name string, opErr *computev1.OperationErrorErrors) error {
889889
}
890890

891891
// codeForGCEOpError return the grpc error code for the passed in
892-
// gce operation error.
892+
// gce operation error. All of these error codes are filtered out from our SLO,
893+
// but will be monitored by the stockout reporting dashboard.
893894
func codeForGCEOpError(err computev1.OperationErrorErrors) codes.Code {
894895
userErrors := map[string]codes.Code{
895896
"RESOURCE_NOT_FOUND": codes.NotFound,

pkg/gce-pd-csi-driver/controller.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1902,7 +1902,7 @@ func (b *csiErrorBackoff) code(id csiErrorBackoffId) codes.Code {
19021902
// If we haven't recorded a code, return unavailable, which signals a problem with the driver
19031903
// (ie, next() wasn't called correctly).
19041904
klog.Errorf("using default code for %s", id)
1905-
return codes.Unavailable
1905+
return codes.Internal
19061906
}
19071907

19081908
func (b *csiErrorBackoff) next(id csiErrorBackoffId, code codes.Code) {

pkg/gce-pd-csi-driver/identity.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type GCEIdentityServer struct {
2929
// GetPluginInfo(context.Context, *GetPluginInfoRequest) (*GetPluginInfoResponse, error)
3030
func (gceIdentity *GCEIdentityServer) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error) {
3131
if gceIdentity.Driver.name == "" {
32-
return nil, status.Error(codes.Unavailable, "Driver name not configured")
32+
return nil, status.Error(codes.Internal, "Driver name not configured")
3333
}
3434

3535
return &csi.GetPluginInfoResponse{

0 commit comments

Comments
 (0)