Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for FromError (0.31 sec)

  1. security/pkg/server/ca/server_test.go

    		}
    		if c.fakeAuthInfo != nil {
    			ctx = peer.NewContext(ctx, &peer.Peer{Addr: c.ipAddr, AuthInfo: c.fakeAuthInfo})
    		}
    		response, err := server.CreateCertificate(ctx, request)
    
    		s, _ := status.FromError(err)
    		code := s.Code()
    		if code != c.code {
    			t.Errorf("Case %s: expecting code to be (%d) but got (%d): %s", id, c.code, code, s.Message())
    		} else if c.code == codes.OK {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Feb 28 16:41:38 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  2. pkg/volume/csi/expander.go

    			return false, failedConditionErr
    		}
    		return false, fmt.Errorf("Expander.NodeExpand failed to expand the volume : %w", err)
    	}
    	return true, nil
    }
    
    func inUseError(err error) bool {
    	st, ok := status.FromError(err)
    	if !ok {
    		// not a grpc error
    		return false
    	}
    	// if this is a failed precondition error then that means driver does not support expansion
    	// of in-use volumes
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 31 17:23:56 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  3. pilot/pkg/grpc/grpc.go

    // things are operating normally. This is basically capturing when the client disconnects.
    func IsExpectedGRPCError(err error) bool {
    	if err == io.EOF {
    		return true
    	}
    
    	if s, ok := status.FromError(err); ok {
    		if s.Code() == codes.Canceled || s.Code() == codes.DeadlineExceeded {
    			return true
    		}
    		if s.Code() == codes.Unavailable && containsExpectedMessage(s.Message()) {
    			return true
    		}
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Feb 17 04:27:50 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  4. pilot/pkg/xds/monitoring.go

    		if f {
    			t.RecordInt(int64(cnt))
    		} else {
    			pushTriggers.With(typeTag.Value(string(r))).Increment()
    		}
    	}
    }
    
    func isUnexpectedError(err error) bool {
    	s, ok := status.FromError(err)
    	// Unavailable or canceled code will be sent when a connection is closing down. This is very normal,
    	// due to the XDS connection being dropped every 30 minutes, or a pod shutting down.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 30 00:26:45 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  5. pkg/kubelet/kuberuntime/kuberuntime_container.go

    	}
    	if err != nil {
    		s, _ := grpcstatus.FromError(err)
    		m.recordContainerEvent(pod, container, "", v1.EventTypeWarning, events.FailedToCreateContainer, "Error: %v", s.Message())
    		return s.Message(), ErrCreateContainerConfig
    	}
    
    	err = m.internalLifecycle.PreCreateContainer(pod, container, containerConfig)
    	if err != nil {
    		s, _ := grpcstatus.FromError(err)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 54.7K bytes
    - Viewed (0)
  6. pkg/kubelet/stats/cri_stats_provider.go

    		result, err := p.listPodStatsStrictlyFromCRI(ctx, updateCPUNanoCoreUsage, containerMap, podSandboxMap, &rootFsInfo)
    		if err == nil {
    			// Call succeeded
    			return result, nil
    		}
    		s, ok := status.FromError(err)
    		// Legitimate failure, rather than the CRI implementation does not support ListPodSandboxStats.
    		if !ok || s.Code() != codes.Unimplemented {
    			return nil, err
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 01 18:46:33 UTC 2023
    - 35.1K bytes
    - Viewed (0)
  7. pilot/cmd/pilot-agent/status/server.go

    		Service: svc,
    	})
    	// the error handling is referenced from https://github.com/kubernetes/kubernetes/blob/v1.23.1/pkg/probe/grpc/grpc.go#L88-L106
    	if err != nil {
    		status, ok := grpcStatus.FromError(err)
    		if ok {
    			switch status.Code() {
    			case codes.Unimplemented:
    				log.Errorf("server does not implement the grpc health protocol (grpc.health.v1.Health): %v", err)
    			case codes.DeadlineExceeded:
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 15:07:03 UTC 2024
    - 31.1K bytes
    - Viewed (0)
  8. cmd/kubelet/app/server.go

    	// Fail quickly on known, non transient errors.
    	for i := 0; i < 3; i++ {
    		runtimeConfig, err = kubeDeps.RemoteRuntimeService.RuntimeConfig(ctx)
    		if err != nil {
    			s, ok := status.FromError(err)
    			if !ok || s.Code() != codes.Unimplemented {
    				// We could introduce a backoff delay or jitter, but this is largely catching cases
    				// where the runtime is still starting up and we request too early.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 00:05:34 UTC 2024
    - 53.9K bytes
    - Viewed (0)
Back to top