Revert "bootstrap: Start hostNetwork pods even if network plugin not ready"

This commit is contained in:
Yu-Ju Hong
2016-10-25 08:38:59 -07:00
committed by GitHub
parent 0dc983a4c0
commit 94f580ef03
9 changed files with 17 additions and 23 deletions

View File

@@ -68,13 +68,16 @@ func (s *runtimeState) setInitError(err error) {
s.initError = err
}
func (s *runtimeState) runtimeErrors() []string {
func (s *runtimeState) errors() []string {
s.RLock()
defer s.RUnlock()
var ret []string
if s.initError != nil {
ret = append(ret, s.initError.Error())
}
if s.networkError != nil {
ret = append(ret, s.networkError.Error())
}
if !s.lastBaseRuntimeSync.Add(s.baseRuntimeSyncThreshold).After(time.Now()) {
ret = append(ret, "container runtime is down")
}
@@ -84,16 +87,6 @@ func (s *runtimeState) runtimeErrors() []string {
return ret
}
func (s *runtimeState) networkErrors() []string {
s.RLock()
defer s.RUnlock()
var ret []string
if s.networkError != nil {
ret = append(ret, s.networkError.Error())
}
return ret
}
func newRuntimeState(
runtimeSyncThreshold time.Duration,
) *runtimeState {