-
Notifications
You must be signed in to change notification settings - Fork 260
CNS CRD nullref fix #673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CNS CRD nullref fix #673
Conversation
Codecov Report
@@ Coverage Diff @@
## master #673 +/- ##
==========================================
- Coverage 42.63% 41.69% -0.95%
==========================================
Files 72 72
Lines 10392 9483 -909
==========================================
- Hits 4431 3954 -477
+ Misses 5482 5057 -425
+ Partials 479 472 -7 |
8379eff to
316006f
Compare
cns/restserver/internalapi.go
Outdated
| logger.Errorf("[cns-rc] Error creating or updating IPAM Pool Monitor: %v", err) | ||
| // requeue | ||
| return UnexpectedError | ||
| if scalar != nil && spec != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should not be even calling CreateNC call if scaler/spec are null
| } | ||
|
|
||
| // If there are no NCs, pass nil to CNSClient | ||
| if len(nodeNetConfig.Status.NetworkContainers) == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should only be called if NodeNetworkConfig is null
pjohnst5
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, talked about this in teams chat, and this is good in case the CRD is defined on the cluster, but the NNC instance of the crd isn't there yet, I missed that
Reason for Change:
Fixes an issue where if the CRD is nil, then don't pass to IPAM pool monitor
Issue Fixed:
Requirements:
Notes: