Unverified Commit 165faaad authored by k8s-ci-robot's avatar k8s-ci-robot Committed by GitHub

Merge pull request #68602 from Pingan2017/internalerr

remove internalError in runtimeStates , not set anywhere
parents 5f7e1b55 2f2c4ebc
...@@ -27,7 +27,6 @@ type runtimeState struct { ...@@ -27,7 +27,6 @@ type runtimeState struct {
lastBaseRuntimeSync time.Time lastBaseRuntimeSync time.Time
baseRuntimeSyncThreshold time.Duration baseRuntimeSyncThreshold time.Duration
networkError error networkError error
internalError error
cidr string cidr string
healthChecks []*healthCheck healthChecks []*healthCheck
} }
...@@ -78,9 +77,6 @@ func (s *runtimeState) runtimeErrors() []string { ...@@ -78,9 +77,6 @@ func (s *runtimeState) runtimeErrors() []string {
if !s.lastBaseRuntimeSync.Add(s.baseRuntimeSyncThreshold).After(time.Now()) { if !s.lastBaseRuntimeSync.Add(s.baseRuntimeSyncThreshold).After(time.Now()) {
ret = append(ret, "container runtime is down") ret = append(ret, "container runtime is down")
} }
if s.internalError != nil {
ret = append(ret, s.internalError.Error())
}
for _, hc := range s.healthChecks { for _, hc := range s.healthChecks {
if ok, err := hc.fn(); !ok { if ok, err := hc.fn(); !ok {
ret = append(ret, fmt.Sprintf("%s is not healthy: %v", hc.name, err)) ret = append(ret, fmt.Sprintf("%s is not healthy: %v", hc.name, err))
...@@ -107,6 +103,5 @@ func newRuntimeState( ...@@ -107,6 +103,5 @@ func newRuntimeState(
lastBaseRuntimeSync: time.Time{}, lastBaseRuntimeSync: time.Time{},
baseRuntimeSyncThreshold: runtimeSyncThreshold, baseRuntimeSyncThreshold: runtimeSyncThreshold,
networkError: fmt.Errorf("network state unknown"), networkError: fmt.Errorf("network state unknown"),
internalError: nil,
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment