Skip to content

Commit

Permalink
additional logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Greer committed Feb 22, 2022
1 parent 6fa2571 commit 60e47cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TAG=v2.5.5-rc11
TAG=v2.5.5-rc12

# rc6: hub.comcast.net/k8s-eng/ravel:v2.5.0-proto45
# rc7: hub.comcast.net/k8s-eng/ravel:v2.5.0-proto66
Expand Down
9 changes: 8 additions & 1 deletion pkg/bgp/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,16 +217,20 @@ func (b *bgpserver) configure() error {
if err != nil {
return err
}
log.Debugln("bgp: setAddresses took", time.Since(startTime))
// log.Debugln("bgp: Setting addresses complete")

configuredStartTime := time.Now()
configuredAddrs, err := b.bgp.Get(b.ctx)
if err != nil {
return err
}
log.Debugln("bgp: configuredAddrs took", time.Since(configuredStartTime))

// Do something BGP-ish with VIPs from configmap
// This only adds, and never removes, VIPs
// log.Debug("bgp: applying bgp settings")
setStartTime := time.Now()
addrs := []string{}
for ip := range b.config.Config {
addrs = append(addrs, string(ip))
Expand All @@ -235,15 +239,18 @@ func (b *bgpserver) configure() error {
if err != nil {
return err
}
log.Debugln("bgp: set took", time.Since(setStartTime))
// log.Debugln("bgp: done applying bgp settings")

// Set IPVS rules based on VIPs, pods associated with each VIP
// and some other settings bgpserver receives from RDEI.
// log.Debugln("bgp: Setting IPVS settings")
setIPVSStartTime := time.Now()
err = b.ipvs.SetIPVS(b.nodes, b.config, b.logger)
if err != nil {
return fmt.Errorf("bgp: unable to configure ipvs with error %v", err)
}
log.Debugln("bgp: setIPVS took", time.Since(setIPVSStartTime))
// log.Debugln("bgp: IPVS configured")
b.lastReconfigure = time.Now()

Expand Down Expand Up @@ -548,7 +555,7 @@ func (b *bgpserver) performReconfigure() {
log.Debugln("bgp: running performReconfigure")

if b.noUpdatesReady() {
log.Debugln("bgp: no updates ready")
// log.Debugln("bgp: no updates ready")
// last update happened before the last reconfigure
return
}
Expand Down

0 comments on commit 60e47cb

Please sign in to comment.