* Ignoring hostnetwork pods from being added into Ipsets
* generalizing the check on hostnetwork pod
* Adding tests for add, update and delete hostnetwork pods
* write to temp file and move to state file
* fixed memleak and other issues
* call windows replace function with MOVEFILE_WRITE_THROUGH flag
* moved few functions to platform package
* moved test files to correct dir
* addressed comments
* 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.
* update cns tag in yaml
* pipeline cleanup
* Use int64 for NC version in NNC status
* bump cns version to 1.2.0
Co-authored-by: Matthew Long <Matthew.Long@microsoft.com>
Co-authored-by: Matthew Long <matlong@microsoft.com>
* Adding port_ format for named ports
* Cleaning existing ipsets incase of a upgrade
* Changing the delimiter for port prefix
* Some basic formatting
* Adding fixes to testcases
* Addressing comments
* Adding mitigation for empty string in named port
* Changing port nil behavior. NPM does partial rule handling in port nil case
* removing exists check, as setmap is not accessible from this test
* Adding support to delete only azure-npm ipsets
* Adding support to delete only azure-npm ipsets
* Addressing comments
* Changing azure-npm to const flag and cleaning up un wanted error log
* Changing the make entries to 0
* changes to support http and https for CNS
* correct small typo
* address feedback
* address feedback
* rename file
* small fix
* small fix
* fixing issue with cert not found
* update cns tag in yaml
* pipeline cleanup
* Use int64 for NC version in NNC status
Co-authored-by: Matthew Long <Matthew.Long@microsoft.com>
Co-authored-by: Matthew Long <matlong@microsoft.com>
* update cns tag in yaml
* pipeline cleanup
Co-authored-by: Matthew Long <Matthew.Long@microsoft.com>
Co-authored-by: Matthew Long <matlong@microsoft.com>
This change removes GetNCVersionURLFmt from the NodeInfoResponse which CNS gets
as a part of SyncNodeStatus in case of managed mode. This data is available with CNS and
should not be needed from DNC.
This change calls GetNCVersionStatus API for NMAgent to validate if the data path is set up. If the data path is set up, the NC version with CNS matches with the NC version programmed by NMAgent. A conservative approach is taken to check if the data path is set up i.e. only if GetNCVersionStatus successfully returns NC version mismatch, it is treated as error. All the other cases including error in calling this API are considered success.
This is multitenancy only change.