* removed test/ and testutil/ from code coverage
* remove promutil from coverage
* removed tools/ from code coverage
* removed crd/ from code coverage and updated multitenantnetworkcontainer's manifest
* switch to !ignore_NAME syntax for test and cli tags
* add coverage back to crd (besides autogenerated files)
* rename ignore_test and ignore_cli tags to ignore_uncovered
* make cns/fakes/ uncovered
* mark go files in crd api folders as uncovered again
* add main.go back for nnsmock server
This commit has following changes -
1. Removed AllocatedIPCount field from HTTPRestService
struct in restserver.go as it is not used in project.
2. Added debug command getInMemory and API to expose
fields-HTTPRestService and 2 fields from IPAMPoolMonitor.
Please review the naming of the command, handler and end
point.
3. Added Test function to test the new api response.
4. Added changes as per review comments - Get request
for Test endpoint.
Handle the race scenario where HTTP Listener gets started before initializing CNS state. During Initialization/Reconciliation, CNS gets the CRD and recreates the NC request with SecondaryIPs, then it gets list of pods and set those ips as Allocated. If HTTP listener is started then CNI will start requesting ips to CNS and CNS will start allocating right after they are set to Available, thus double allocations. Thus reordered the calls and ensured HTTP Listener is started after initializing CNS.
Also fixed
some logging
avoid double release during failure in IPAM pool monitor
* Add a go routine to update NC host version from NMAgent periodically.
If orchestrator type is CRD, update pending programming IPs as well.
* Update NC version in test from 0 to -1, which will allow default IP state as Avaialable instead of pending programming.
* Add secondary IP status updation when reconcile.
Resovle conflicts manually.
Update unit test nc version value.
Update unit test nc version.
Add get nmagent default value back for integ testing purpose.
Unit test can be break by this change.
Update default new IP CNS status to available.
Assign value to host version if none exist in util.go
Addressed feedback and perform cluster integ test with 1 sec frequent nc version update.
Need to clean logNCSnapshots when send out PR.
Update nc version associate with secondary ip. Add new nmagent api test.
Add versionResponseWithoutToken.Containers log
Add containerId from our runner sub.
Add containerId from NMAgent team.
Addressed feedback and add real nmagent logic.
Add timeout when query nmagent for nc version.
* Update comments.
* Add context background with timeout function for syncing node nc version.
* Add 5 second force update CNS pending programming IP to available logic.
* Resovle merge conflict from master.
* Debug and it pass all the test.
This is the final version.
Change the way of http get request to add context. Change channel to no buffer with same goroutine.
Found always fall in ctx.Done() condition.
Add channel close for get nc version list.
Add milisecond unit for timeout.
Testing with different context version.
* Resolve merge conflict.
* Remove force update pending programming IP to available logic. Remain retry if no response from NMAgent.
Release pending programming IP when scale down.
* Remain VMVersion, HostVersion variable name as it is and use the Version inside CreateNetworkContainerRequest.
* Addressed team member feedback.
* Add pending program status for IPs in CNS.
Add logic structure of how to update program status.
* Add missing NCVersion CreateNetworkContainerRequest in commit.
* Add missing fake GetPendingProgramIPConfigs to unblock ipam pool unit test.
* Address feedbacks.
* Modify function parameter to meet current unit test requirement.
* Add updating secondary IPs to pending programming status logic.
* Add ip state update when CRD status change.
* Update NC ID.
* Update NC ID.
* Update comments.
* Remove NC version compare and update logic. This logic will be moved to a background thread.
* Update comments accordingly.
* Add unit test.
* Update nmagent version in test.
* Update function name.
* init with test framework
* handle multiple batch size pool request
* test verification
* handle batch size multiples
* address feedback
* fix test
* remove test struct from fakes
* fix nil test
* fix tests
* feedback
* scale down
* init scale down
scale down testing
test work
reconcile fake requestcontroller
test revision
check for cached nonreleased ipconfigs
remove test struct from decrease fakes
initial integration
fix interface signature
test get pending release
futher integration tseting
test fixes
* start feedback
* update request controller
* fixed tests
* test fix
* ipampoolmonitor in cns not request controller
* init fake ipam pool monitor