mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 05:57:25 +00:00
Merge pull request #19493 from bprashanth/kubelet_fix
Errors in network setup should prevent pod creation
This commit is contained in:
commit
926b94fefc
@ -2637,12 +2637,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