Skip to content

Commit 6c3c9f5

Browse files
committed
final cleanup
1 parent bc1401f commit 6c3c9f5

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

cns/healthserver/healthz.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ func NewHealthzHandlerWithChecks(cfg *Config) (http.Handler, error) {
7070
return nil
7171
}
7272
}
73-
7473
return &healthz.Handler{
7574
Checks: checks,
7675
}, nil

cns/restserver/nodesubnet.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ func (service *HTTPRestService) UpdateIPsForNodeSubnet(secondaryIPs []netip.Addr
2929

3030
logger.Debugf("IP change processed successfully")
3131

32-
// saved NC successfully. UpdateIPsForNodeSubnet is called only when IPs are fetched from NMAgent.
33-
// We now have IPs to serve IPAM requests. Generate conflist to indicate CNS is ready
34-
service.ncSynced = make(chan struct{}) // in case this is called multiple times
32+
//encapsulation viloation. Better if this called something equivalent to StartSyncHostNCVersionLoop
3533
service.mustGenerateCNIConflistOnce()
3634
return nil
3735
}

cns/restserver/synchostnc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"github.com/pkg/errors"
1616
)
1717

18-
//TODO make this file a sub pacakge?
18+
// TODO: make this file a sub pacakge?
1919

2020
func (service *HTTPRestService) StartSyncHostNCVersionLoop(ctx context.Context, cnsconfig configuration.CNSConfig) error {
2121
if !service.ncSyncLoop.CompareAndSwap(false, true) {

cns/service/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,7 @@ func main() {
11211121
// Wait for NC sync to complete before marking service as ready.
11221122
httpRemoteRestService.WaitForConfList(rootCtx)
11231123
// mark the service as "ready"
1124-
close(readyCh) // This will not block, even if rootCtx is canceled.
1124+
close(readyCh)
11251125
// block until process exiting
11261126
<-rootCtx.Done()
11271127

0 commit comments

Comments
 (0)