mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 23:15:14 +00:00
Errors in network setup should prevent pod creation
This commit is contained in:
parent
37b5726716
commit
4fe4f1f20e
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user