Skip to content

Commit 4104121

Browse files
authored
Merge pull request #1408 from amacaskill/automated-cherry-pick-of-#1406-upstream-release-1.11
Automated cherry pick of #1406: Change Unavailable error codes that signal a problem with the
2 parents fb2c880 + e14848a commit 4104121

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
@@ -886,7 +886,8 @@ func wrapOpErr(name string, opErr *computev1.OperationErrorErrors) error {
886886
}
887887

888888
// codeForGCEOpError return the grpc error code for the passed in
889-
// gce operation error.
889+
// gce operation error. All of these error codes are filtered out from our SLO,
890+
// but will be monitored by the stockout reporting dashboard.
890891
func codeForGCEOpError(err computev1.OperationErrorErrors) codes.Code {
891892
userErrors := map[string]codes.Code{
892893
"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)