@@ -331,7 +331,6 @@ func (node *OsdnNode) Start() error {
331331 }
332332
333333 if networkChanged && len (existingPods ) > 0 {
334- klog .Infof ("OVS bridge has been recreated. Will reattach %d existing pods..." , len (existingPods ))
335334 err := node .reattachPods (existingPods )
336335 if err != nil {
337336 return err
@@ -382,7 +381,7 @@ func (node *OsdnNode) reattachPods(existingPods map[string]podNetworkInfo) error
382381 for sandboxID , podInfo := range existingPods {
383382 sandbox , ok := sandboxes [sandboxID ]
384383 if ! ok {
385- klog .Warningf ( "Could not find sandbox for existing pod with IP %s; it may be in an inconsistent state " , podInfo .ip )
384+ klog .V ( 5 ). Infof ( "Sandbox for pod with IP %s no longer exists " , podInfo .ip )
386385 continue
387386 }
388387 if _ , err := netlink .LinkByName (podInfo .vethName ); err != nil {
@@ -400,6 +399,7 @@ func (node *OsdnNode) reattachPods(existingPods map[string]podNetworkInfo) error
400399 AssignedIP : podInfo .ip ,
401400 Result : make (chan * cniserver.PodResult ),
402401 }
402+ klog .Infof ("Reattaching pod '%s/%s' to SDN" , req .PodNamespace , req .PodName )
403403 // NB: we don't need to worry about locking here because the cniserver
404404 // isn't running for real yet.
405405 if _ , err := node .podManager .handleCNIRequest (req ); err != nil {
@@ -421,7 +421,7 @@ func (node *OsdnNode) killFailedPods(failed []*kruntimeapi.PodSandbox) {
421421 podRef := & corev1.ObjectReference {Kind : "Pod" , Name : sandbox .Metadata .Name , Namespace : sandbox .Metadata .Namespace , UID : types .UID (sandbox .Metadata .Uid )}
422422 node .recorder .Eventf (podRef , corev1 .EventTypeWarning , "NetworkFailed" , "The pod's network interface has been lost and the pod will be stopped." )
423423
424- klog .V (5 ).Infof ("Killing pod '%s/%s' sandbox due to failed restart " , podRef .Namespace , podRef .Name )
424+ klog .V (5 ).Infof ("Killing pod '%s/%s' sandbox" , podRef .Namespace , podRef .Name )
425425 if err := node .runtimeService .StopPodSandbox (sandbox .Id ); err != nil {
426426 klog .Warningf ("Failed to kill pod '%s/%s' sandbox: %v" , podRef .Namespace , podRef .Name , err )
427427 }
0 commit comments