Граф коммитов

874 Коммитов

Автор SHA1 Сообщение Дата
Vamsi Kalapala 30dedee967
[NPM] Fixing log noise and removing GetClusterState (#784)
* Fixing log noise for hotnet pods

* Removing GetClusterState usage
2021-02-16 14:11:54 -08:00
Vamsi Kalapala 82768ac7fa
[NPM] Ignoring hostnetwork pods from being added into Ipsets (#776) (#777)
* Ignoring hostnetwork pods from being added into Ipsets

* generalizing the check on hostnetwork pod

* Adding tests for add, update and delete hostnetwork pods
2021-02-02 22:31:56 -08:00
tamilmani1989 cc3f97059a
latency fix for transparent mode (#753) 2021-01-19 10:48:11 -08:00
tamilmani1989 33a26bd830
changed blocking channel send to non-blocking (#766) 2021-01-15 20:44:14 -08:00
shchen 327b0b6415
Ensure pending programming IPs will be released before available IPs when scale down. (#750)
* Ensure pending programming IPs will be released first when scale down.

* Addressed feedbacks for testing and coding style.
2021-01-15 10:05:59 -08:00
tamilmani1989 98f838ef1b
Write to intermediate file before moving to state file (#755)
* 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
2021-01-07 17:43:33 -08:00
Paul Johnston c3aa60f7f9
chore: updating the base cnms image to reach compliance (#759)
* chore: updating the base cnms image to reach compliance
2020-12-23 15:00:33 -08:00
Paul Johnston fb3481ded3
Show codecoverage for entire repo (#754)
* test: include all packages in code coverage report
2020-12-16 13:25:15 -08:00
shchen 3c48a34df6
Add a go routine to update NC host version from NMAgent periodically. (#714)
* 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.
2020-12-11 13:54:17 -08:00
Mathew Merrick 2bb1fd9af5
fix: Move acncli to hack and update error message (#748)
* fix: update acncli error message

* fix: acncnli move to hack
2020-12-10 18:06:53 -08:00
Matthew Long 2e2efa7a79
Update cns yaml (#743)
* 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>
2020-12-07 19:08:44 -05:00
Ramiro 16ce278bea
Merge pull request #745 from ramiro-gamarra/vendor-fix
Fixing vendored code
2020-12-02 12:56:21 -08:00
Mathew Merrick c499075742
chore: Update pipeline yaml, replace hardcoded registries to env's (#744)
* fix: replace hardcoded image env's to env's
2020-12-02 11:26:08 -08:00
Ramiro 3ed6949788 ran go mod vendor 2020-11-30 15:27:41 -08:00
aegal 169d7d7935
Updates for TLS: reading from encrypted PEM file & hostname fix (#742)
* tls fixes

* updating test

* update to support linux as well

* update to support linux and windows

* remove old test file

* pushing minor changes
2020-11-30 14:05:25 -08:00
Ashvin Deodhar 8e7c43edb4
Remove GetNetworkContainerStatus func (#741)
This change removes the unused / unsupported function exposed by CNS
2020-11-25 13:21:56 -08:00
Ashvin Deodhar 007e903a21
Prevent storing auth token in CNS state file (#739)
This change prevents the subnet auth token getting saved in the CNS state file.
2020-11-24 16:29:44 -08:00
Ramiro db8724e2f2
Merge pull request #738 from ramiro-gamarra/wireserver-ip-fix
Configurable wireserver endpoint
2020-11-24 10:39:12 -08:00
shchen 0835cae2d1
Change AI log and metrics sending function name in NPM. (#737) 2020-11-23 23:14:31 -08:00
Ramiro 1ece2a6d7f making endpoint configurable, attempt to extract host 2020-11-23 18:38:19 -08:00
Vamsi Kalapala 8ae7b8ad41
[NPM] 🐞 {fix} error creating IPsets when same string for ports and labels is used (#734)
* 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
2020-11-19 23:48:58 -08:00
Vamsi Kalapala a22a852381
Merge pull request #680 from Azure/vakr/cns_lb_mnat
mNAT + LB support for swift containers
2020-11-19 14:15:00 -08:00
vakr 4d3de91316 Addressing comments 2020-11-19 12:27:53 -08:00
vakr cf34795529 changing logic around noderegister 2020-11-19 11:48:02 -08:00
vakr aafc04124f Addressing comments 2020-11-17 19:47:21 -08:00
neaggarwMS 28207fc493
CNS: Fix IPAM scaler down to handle incremental decrease (#731) 2020-11-16 16:47:28 -08:00
Mathew Merrick f0907b4e82
refactor: Move CNI bridge/transparent routes to common (#694)
* fix: pass host gateway to CNI with Swift to enable Swift+Transparent
2020-11-16 14:24:00 -08:00
Paul Miller d68c75cd5e
log what ips we got and make defer pickup when no ips are found (#720)
* log what ips we got and make defer pickup when no ips are found

* fix typos

* differentiate success from failure
2020-11-16 10:28:16 -08:00
Ramiro c856bc108d
Merge pull request #728 from ramiro-gamarra/hns-endpoint-not-found
Handling "endpoint not found" in hns delete
2020-11-16 10:26:29 -08:00
vakr 2129a6f5b1 Adjusting logic on re-registering the Node in mDNC case 2020-11-16 10:08:34 -08:00
vakr 6717e485e7 Correcting a timing of the ticker 2020-11-12 13:13:13 -08:00
vakr b971ce473f Correcting a timing of the ticker 2020-11-12 13:03:16 -08:00
vakr 3eedd84c86 changing wireserver to Var, as tests are trying to change this value 2020-11-12 09:54:11 -08:00
Ramiro 33a1dd5070 handling endpoint not found in hns delete 2020-11-12 06:14:06 -08:00
vakr 84742f8970 resolving Merge conflict issues 2020-11-11 16:55:00 -08:00
Vamsi Kalapala 52b030f41d
Merge branch 'master' into vakr/cns_lb_mnat 2020-11-11 16:43:58 -08:00
vakr 5dea9d9c11 Adding a ticker logic and cleaning up some comments 2020-11-11 13:51:06 -08:00
vivekagg-MSFT 030992273f
Remove default ACLs (#724)
Remove default ACLs in CNI config
2020-11-09 10:35:19 -08:00
Adelina Tuvenie 01bbbe6fad
Use PortMappingPolicySetting (#689)
In order to support VIPs for container Port Mappings, we should
use PortMappingPolicySetting type from HNSv2 instead of the old
NatPolicy from HNSv1.
2020-11-09 10:33:27 -08:00
shchen 61fb84d11e
fix: Resolve flaky TestDestroy ipset unit test (#671)
* fix: Improve TestDestroy unit test validation to make it not flaky.
2020-11-06 16:27:20 -08:00
aegal 13677e6092
changes to support http and https for CNS (#717)
* 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
2020-11-06 09:51:30 -08:00
Matthew Long e9741df9ff
Use int64 for NC version in NNC (#721)
* 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>
2020-11-04 16:55:25 -08:00
vivekagg-MSFT cc2aab5dea
Support for ACL (Hnsv2) (#705)
* initial changes

* remove extraneous code

* Add ACL and wireserver ACL

* add ACLs

* default acls

* address comments

* addressed comment
2020-11-04 16:35:45 -08:00
Matthew Long eab521d616
update cns tag in yaml (#719)
* update cns tag in yaml

* pipeline cleanup

Co-authored-by: Matthew Long <Matthew.Long@microsoft.com>
Co-authored-by: Matthew Long <matlong@microsoft.com>
2020-11-04 12:27:44 -08:00
Ashvin Deodhar 2a6ce6159b
Remove GetNCVersionURLFmt from NodeInfo contract (#718)
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.
2020-11-03 12:19:30 -08:00
neaggarwMS e40551f9da
NodeNetworkconfig: Updated json name to avoid spaces in the IP definition (#703)
* updated json name

* Updated manifests'
2020-11-03 11:20:34 -08:00
Ashvin Deodhar 37c75f6b6d
Call GetNCVersionStatus API to validate the datapath setup (#686)
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.
2020-11-02 21:56:08 -08:00
Mathew Merrick c2b8caeb73
Adds debug commands to CNS binary with debug API (#650)
* feat: add cns debug api and cli

* update tests

* fixed nits

* feedback

* remove merge artifacts

* rebase artifacts

* fix missing variable rename

* add support for pending release

* feedback

* connect to localhost
2020-11-02 09:53:35 -08:00
Vamsi Kalapala e0a532d983
Merge pull request #709 from Azure/vakr/tempbranch
Azure CNI transparent mode as default
2020-10-30 14:40:02 -07:00
Mathew Merrick a9c7d6e684
fix: Add missing CNI invoker delete calls (#696)
* fix missing invoker delete calls

* pipeline debug

* fix nil on delete

* another nil check
2020-10-29 18:03:44 -07:00