Errors in network setup should prevent pod creation

parent 37b57267
...@@ -2683,12 +2683,14 @@ func (kl *Kubelet) syncNetworkStatus() { ...@@ -2683,12 +2683,14 @@ func (kl *Kubelet) syncNetworkStatus() {
if err := ensureIPTablesMasqRule(); err != nil { if err := ensureIPTablesMasqRule(); err != nil {
err = fmt.Errorf("Error on adding ip table rules: %v", err) err = fmt.Errorf("Error on adding ip table rules: %v", err)
glog.Error(err) glog.Error(err)
kl.runtimeState.setNetworkState(err)
return
} }
podCIDR := kl.runtimeState.podCIDR() podCIDR := kl.runtimeState.podCIDR()
if len(podCIDR) == 0 { if len(podCIDR) == 0 {
err = fmt.Errorf("ConfigureCBR0 requested, but PodCIDR not set. Will not configure CBR0 right now") err = fmt.Errorf("ConfigureCBR0 requested, but PodCIDR not set. Will not configure CBR0 right now")
glog.Warning(err) glog.Warning(err)
} else if err := kl.reconcileCBR0(podCIDR); err != nil { } else if err = kl.reconcileCBR0(podCIDR); err != nil {
err = fmt.Errorf("Error configuring cbr0: %v", err) err = fmt.Errorf("Error configuring cbr0: %v", err)
glog.Error(err) glog.Error(err)
} }
......
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