@@ -144,27 +144,27 @@ func New(c *OsdnNodeConfig) (network.NodeInterface, error) {
144
144
// we're ready yet
145
145
os .Remove (filepath .Join (cniDirPath , openshiftCNIFile ))
146
146
147
- log .Infof ("Initializing SDN node of type %q with configured hostname %q (IP %q), iptables sync period %q" , c .PluginName , c .Hostname , c .SelfIP , c .IPTablesSyncPeriod .String ())
147
+ glog .Infof ("Initializing SDN node of type %q with configured hostname %q (IP %q), iptables sync period %q" , c .PluginName , c .Hostname , c .SelfIP , c .IPTablesSyncPeriod .String ())
148
148
if c .Hostname == "" {
149
149
output , err := kexec .New ().Command ("uname" , "-n" ).CombinedOutput ()
150
150
if err != nil {
151
151
return nil , err
152
152
}
153
153
c .Hostname = strings .TrimSpace (string (output ))
154
- log .Infof ("Resolved hostname to %q" , c .Hostname )
154
+ glog .Infof ("Resolved hostname to %q" , c .Hostname )
155
155
}
156
156
if c .SelfIP == "" {
157
157
var err error
158
158
c .SelfIP , err = netutils .GetNodeIP (c .Hostname )
159
159
if err != nil {
160
- log .V (5 ).Infof ("Failed to determine node address from hostname %s; using default interface (%v)" , c .Hostname , err )
160
+ glog .V (5 ).Infof ("Failed to determine node address from hostname %s; using default interface (%v)" , c .Hostname , err )
161
161
var defaultIP net.IP
162
162
defaultIP , err = kubeutilnet .ChooseHostInterface ()
163
163
if err != nil {
164
164
return nil , err
165
165
}
166
166
c .SelfIP = defaultIP .String ()
167
- log .Infof ("Resolved IP address to %q" , c .SelfIP )
167
+ glog .Infof ("Resolved IP address to %q" , c .SelfIP )
168
168
}
169
169
}
170
170
@@ -227,10 +227,10 @@ func (node *OsdnNode) dockerPreCNICleanup() error {
227
227
// OpenShift-in-a-container case, so we work around that by sending
228
228
// the messages by hand.
229
229
if _ , err := osexec .Command ("dbus-send" , "--system" , "--print-reply" , "--reply-timeout=2000" , "--type=method_call" , "--dest=org.freedesktop.systemd1" , "/org/freedesktop/systemd1" , "org.freedesktop.systemd1.Manager.Reload" ).CombinedOutput (); err != nil {
230
- log .Error (err )
230
+ glog .Error (err )
231
231
}
232
232
if _ , err := osexec .Command ("dbus-send" , "--system" , "--print-reply" , "--reply-timeout=2000" , "--type=method_call" , "--dest=org.freedesktop.systemd1" , "/org/freedesktop/systemd1" , "org.freedesktop.systemd1.Manager.RestartUnit" , "string:'docker.service' string:'replace'" ).CombinedOutput (); err != nil {
233
- log .Error (err )
233
+ glog .Error (err )
234
234
}
235
235
236
236
// Delete pre-CNI interfaces
@@ -246,7 +246,7 @@ func (node *OsdnNode) dockerPreCNICleanup() error {
246
246
return err
247
247
}
248
248
249
- log .Infof ("Cleaned up left-over openshift-sdn docker bridge and interfaces" )
249
+ glog .Infof ("Cleaned up left-over openshift-sdn docker bridge and interfaces" )
250
250
251
251
return nil
252
252
}
@@ -289,9 +289,9 @@ func (node *OsdnNode) killUpdateFailedPods(pods []kapi.Pod) error {
289
289
return err
290
290
}
291
291
292
- log .V (5 ).Infof ("Killing pod '%s/%s' sandbox due to failed restart" , pod .Namespace , pod .Name )
292
+ glog .V (5 ).Infof ("Killing pod '%s/%s' sandbox due to failed restart" , pod .Namespace , pod .Name )
293
293
if err := node .runtimeService .StopPodSandbox (sandboxID ); err != nil {
294
- log .Warningf ("Failed to kill pod '%s/%s' sandbox: %v" , pod .Namespace , pod .Name , err )
294
+ glog .Warningf ("Failed to kill pod '%s/%s' sandbox: %v" , pod .Namespace , pod .Name , err )
295
295
}
296
296
}
297
297
return nil
@@ -316,7 +316,7 @@ func (node *OsdnNode) Start() error {
316
316
}
317
317
if err := node .networkInfo .CheckHostNetworks (hostIPNets ); err != nil {
318
318
// checkHostNetworks() errors *should* be fatal, but we didn't used to check this, and we can't break (mostly-)working nodes on upgrade.
319
- log .Errorf ("Local networks conflict with SDN; this will eventually cause problems: %v" , err )
319
+ glog .Errorf ("Local networks conflict with SDN; this will eventually cause problems: %v" , err )
320
320
}
321
321
322
322
node .localSubnetCIDR , err = node .getLocalSubnet ()
@@ -358,7 +358,7 @@ func (node *OsdnNode) Start() error {
358
358
node .watchServices ()
359
359
}
360
360
361
- log .V (2 ).Infof ("Starting openshift-sdn pod manager" )
361
+ glog .V (2 ).Infof ("Starting openshift-sdn pod manager" )
362
362
if err := node .podManager .Start (cniserver .CNIServerSocketPath , node .localSubnetCIDR , node .networkInfo .ClusterNetworks ); err != nil {
363
363
return err
364
364
}
@@ -376,7 +376,7 @@ func (node *OsdnNode) Start() error {
376
376
continue
377
377
}
378
378
if err := node .UpdatePod (p ); err != nil {
379
- log .Warningf ("will restart pod '%s/%s' due to update failure on restart: %s" , p .Namespace , p .Name , err )
379
+ glog .Warningf ("will restart pod '%s/%s' due to update failure on restart: %s" , p .Namespace , p .Name , err )
380
380
podsToKill = append (podsToKill , p )
381
381
} else if vnid , err := node .policy .GetVNID (p .Namespace ); err == nil {
382
382
node .policy .EnsureVNIDRules (vnid )
@@ -387,7 +387,7 @@ func (node *OsdnNode) Start() error {
387
387
// we'll be able to set them up correctly
388
388
if len (podsToKill ) > 0 {
389
389
if err := node .killUpdateFailedPods (podsToKill ); err != nil {
390
- log .Warningf ("failed to restart pods that failed to update at startup: %v" , err )
390
+ glog .Warningf ("failed to restart pods that failed to update at startup: %v" , err )
391
391
}
392
392
}
393
393
}
@@ -401,7 +401,7 @@ func (node *OsdnNode) Start() error {
401
401
gatherPeriodicMetrics (node .oc .ovs )
402
402
}, time .Minute * 2 )
403
403
404
- log .V (2 ).Infof ("openshift-sdn network plugin ready" )
404
+ glog .V (2 ).Infof ("openshift-sdn network plugin ready" )
405
405
406
406
// Write our CNI config file out to disk to signal to kubelet that
407
407
// our network plugin is ready
@@ -484,7 +484,7 @@ func (node *OsdnNode) handleAddOrUpdateService(obj, oldObj interface{}, eventTyp
484
484
return
485
485
}
486
486
487
- log .V (5 ).Infof ("Watch %s event for Service %q" , eventType , serv .Name )
487
+ glog .V (5 ).Infof ("Watch %s event for Service %q" , eventType , serv .Name )
488
488
oldServ , exists := oldObj .(* kapi.Service )
489
489
if exists {
490
490
if ! isServiceChanged (oldServ , serv ) {
@@ -495,7 +495,7 @@ func (node *OsdnNode) handleAddOrUpdateService(obj, oldObj interface{}, eventTyp
495
495
496
496
netid , err := node .policy .GetVNID (serv .Namespace )
497
497
if err != nil {
498
- log .Errorf ("Skipped adding service rules for serviceEvent: %v, Error: %v" , eventType , err )
498
+ glog .Errorf ("Skipped adding service rules for serviceEvent: %v, Error: %v" , eventType , err )
499
499
return
500
500
}
501
501
@@ -505,7 +505,7 @@ func (node *OsdnNode) handleAddOrUpdateService(obj, oldObj interface{}, eventTyp
505
505
506
506
func (node * OsdnNode ) handleDeleteService (obj interface {}) {
507
507
serv := obj .(* kapi.Service )
508
- log .V (5 ).Infof ("Watch %s event for Service %q" , watch .Deleted , serv .Name )
508
+ glog .V (5 ).Infof ("Watch %s event for Service %q" , watch .Deleted , serv .Name )
509
509
node .DeleteServiceRules (serv )
510
510
}
511
511
0 commit comments