mirror of https://github.com/k3s-io/k3s.git
Merge pull request #68602 from Pingan2017/internalerr
remove internalError in runtimeStates , not set anywherepull/58/head
commit
165faaaddf
|
@ -27,7 +27,6 @@ type runtimeState struct {
|
|||
lastBaseRuntimeSync time.Time
|
||||
baseRuntimeSyncThreshold time.Duration
|
||||
networkError error
|
||||
internalError error
|
||||
cidr string
|
||||
healthChecks []*healthCheck
|
||||
}
|
||||
|
@ -78,9 +77,6 @@ func (s *runtimeState) runtimeErrors() []string {
|
|||
if !s.lastBaseRuntimeSync.Add(s.baseRuntimeSyncThreshold).After(time.Now()) {
|
||||
ret = append(ret, "container runtime is down")
|
||||
}
|
||||
if s.internalError != nil {
|
||||
ret = append(ret, s.internalError.Error())
|
||||
}
|
||||
for _, hc := range s.healthChecks {
|
||||
if ok, err := hc.fn(); !ok {
|
||||
ret = append(ret, fmt.Sprintf("%s is not healthy: %v", hc.name, err))
|
||||
|
@ -107,6 +103,5 @@ func newRuntimeState(
|
|||
lastBaseRuntimeSync: time.Time{},
|
||||
baseRuntimeSyncThreshold: runtimeSyncThreshold,
|
||||
networkError: fmt.Errorf("network state unknown"),
|
||||
internalError: nil,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue