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

136 Коммитов

Автор SHA1 Сообщение Дата
Ramiro 33a1dd5070 handling endpoint not found in hns delete 2020-11-12 06:14:06 -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
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
Mathew Merrick 223b5ba0bf
fix: Pass host gateway to CNI in swift mode (#695)
* fix: pass host gateway to cni in swift mode

* hostgwkey

* update comments
2020-10-21 10:56:54 -07:00
Mathew Merrick 7bd8a2644d
Add "acn" cli tool to install and manage Azure CNI (#688)
* tail azure-vnet.logs

* dockerfile update

* installer fixes

* remove external deps

* move to cli design

* manager cmd

* update vendor

* minor fixes

* logs

* update makefile

* Update manager-master.yaml

* Update manager-agent.yaml
2020-10-20 14:00:40 -07:00
Mathew Merrick 41232c134d
CNI using CNS IPAM (#597)
* Configure CNI to use CNS IPAM
2020-09-29 14:43:19 -07:00
tamilmani1989 75fae82f9d
CNI not to rehydrate based on reboot time (#643)
* cni to not consider reboot time and rehydrate

* added missing files

* fixed ut
2020-08-10 16:59:18 -07:00
tamilmani1989 a42d5aca45
added check to find accept_ra file exists (#620) 2020-07-22 11:36:41 -07:00
Jaeryn 9d6b6c9194
Fix NATing on *COW (HnsV2) Scenarios (#596)
* For HnsV2 we will only add outbound nat policy for single tenant scenario or if enableSnatForDns is true.

* adding comments to detail results of determineSnat func

Co-authored-by: Jaeryn <tsun.chu@microsoft.com>
2020-07-15 16:14:34 -07:00
PrIce Qian 7b5e817bd8
Improving and adding CNI unit tests (#543)
* Add ipam/pool_test.go & add network/*test.go

* add testing ./network/ in Makefile

* fix context
2020-06-26 14:16:45 -07:00
tamilmani1989 6515faee86
Disable RA for interfaces created by CNI (#567) 2020-05-26 15:22:10 -07:00
tamilmani1989 aed0d716b9
Azure CNI Windows dualstack support (#557)
* windows ipv6 changes

* addressed compilation issues

* return fix

* type error

* updated pipeline.yaml

* removed -mod=vendor

* updated pipeline yaml

* fixed pipeline.yaml

* fixed pipeline.yaml

* updated function name as per comment
2020-05-07 11:40:46 -07:00
tamilmani1989 6ac5e8c9f0
CNI Ipv6 Dualstack Support (#538)
* added cniv6 plugin

* cni ipv6 base framework

* removed unwanted changes

* added ipv6 change

* added cni ipv6 changes

* drop neighbor discovery messages to other VMs

* fixed issues

* fixed unit tests

* fix nil dereference

* addressed comments

* ipv6 fixes and changes

* addressed comments
2020-04-15 22:30:48 -07:00
tamilmani1989 dc1ecbfd95
added ipv6 changes (#534) 2020-04-01 13:21:47 -07:00
Paul Johnston 0b62fc40c7
Fixing windows test failure (#531)
* Testing windows change

* Found error
2020-03-18 17:57:34 -07:00
Paul Johnston 17e2c7d404
Adding network monitor capabilities for prerouting and postrouting ebrules (#527)
* About to take debugging comments out

* Removed debugging statements and tested again

* Removed more debugging statements and unused method

* Made changes suggested by Tamilmani, tested again.

* Made spacing changes suggested by Tamilmani

* Triggering new tests to run
2020-03-18 14:02:31 -07:00
Paul Johnston a01afb7a93
Added EB rule for ip addresses in conflist for linux (#505)
* Added EB rule for ip addresses in conflist for linux

* Made methods more generic and removed line from endpoint struct

* Adding log statement

* Fixed syntax error

* Made review2 changes

* Made review3 changes

* Made method lowercase
2020-02-21 14:35:37 -08:00
Vipul Hattiwale 19ac791afc Option to not enable hairpin on the host interface. (#472) 2020-01-16 14:27:25 -08:00
jaer-tsun 43d2c684d1
Setup SNAT Configuration Based on Azure Host Support (#401)
* Save enable snat on host settings after querying NMagent version

* Adding changes to exclude outbound snat for win cni if new NMAgent is running

* try to acquire lock file when writing to disableSnatOnHost.json

* addressed some of Tamilmani's comments

* Adding snat for DNS if current NMAgent does not support it yet

* Adding DNS NAT changes for Windows CNI

* vendoring HCSShim changes that support destination based SNATing

* Reverting k8s.io/api dependencies from master branch to last working version

* Addressing Tamilmani's comments

* syncing with an older version of k8s.io dependencies

* verify valid windows version before Dns NAT.

* only remove snat on windows when host has full support

* addressing Tamilmani's comments

* addressing Tamilmani's comments

* rebased and re-depped
2019-11-14 12:01:04 -08:00
Ashvin Deodhar 84fb35b545
Add Host NC communication support in Windows with HnsV2 (#424)
This PR adds support for host NC bidirectional communication with windows HnsV2. This is supported in multitenant scenario only. AllowHostToNCCommunication and AllowNCToHostCommunication flags are used to enable Host to NC and NC to host communication respectively.
2019-10-18 13:12:03 -07:00
Ashvin Deodhar edd2ae7c8b
Support hyper-v and process based containers with cricontainerd (*COW) (#417)
Support hyper-v and process based containers with cricontainerd (*COW)
2019-10-18 06:58:27 -07:00
Mathew Merrick c44e775344
NPM test fixes + Azure Pipelines (#402)
Initial Azure Pipelines config, run pipeline tests in container, CNM and NPM fixes
2019-09-20 16:15:08 -07:00
tamilmani1989 b027258240
Enable IP forwarding for Linux mulititenancy (#386)
* Enable ipforwarding, prevent ip spoofing and other security concern

* added ovssnat test to circleci

* fixed compiler error

* updated circleci image

* fixed circleci yaml

* updated circleci image

* fixed UT

* fixed UTs

* addressed review comments

* added comments

* addressed review comments

* fixed UT

* separating PRs - removing ip spoofing check changes

* added document for describing multitenancy fields

* fixed docs/cnimultitenancy.md

* removed a condition as it seems to be not working
2019-08-20 14:06:36 -07:00
tamilmani1989 d7320a9ac2
Addressing security concerns in Linux Multitenancy (#387)
* Block IP Sppofing in linux multitenacy by verifying the source IP based on ovs port

* removed tag while adding portto ovs bridge

* addressed review comments

* addressed review comments
2019-08-15 13:24:28 -07:00
tamilmani1989 59969fec20
Fix for CNI lock timedout issue. (#382)
* Fix for CNI lock timedout issue.

* removed duplicate log

* addressed review comments
2019-07-31 11:40:51 -07:00
tamilmani1989 edabc6dd39
Added Host NC communication support in Linux (#374)
* allow inbound connection to container from host if the feature is enabled

* Allowinbound from host to NC if flag is enabled

* fixed old changes

* minor fixes

* added NC to host commn support

* added NCToHostCommunication field in cns contract

* addressed review comments

* addressed review comments

* addressed review comments

* address comments

* fixed space damage
2019-07-16 17:09:34 -07:00
tamilmani1989 7e9525c8ee
Fix for CNM issue (#375)
* Fox for cnm issue. Now able to run container using cnm plugin

* added comment for the change
2019-07-16 16:54:21 -07:00
tamilmani1989 18ebb287a4 Set dns domain on azure0 interface for ubuntu 18.0 and above(#350) 2019-05-02 15:51:40 -07:00
tamilmani1989 a75fbe77b3 Set dns server on azure bridge for ubuntu version >= 17 (#345)
* configure dns server on azure bridge for ubuntu versions > 18. Moved hns related apis from platform package to hsnclient package

* read dns server from interface instead of file and fixed few issues

* renturn error on fail to configure dns

* added unitest and fixed an issue in ReadFileByLines method

* added a UT

* addressed comments and added few tests to get code coverage

* confiure dns for ubuntu17 also

* corrected typo error of filename
2019-04-30 16:27:48 -07:00
Ashvin Deodhar e28f5836d0
Skip HotAttachEp from CNM createEndpoint (#332)
* Skip HotAttachEp from CNM create endpoint

* Address review comments
2019-04-12 16:17:45 -07:00
Ashvin Deodhar 9b17569da2
Check for null ref before deleting Network (#331) 2019-04-12 10:11:37 -07:00
Vivek Aggarwal 78e47deda4 CNI Update operation support 2019-03-06 19:21:45 -08:00
jaer-tsun 67debca901
Add ability in CNS to setup networking for a docker container (#298)
* Limiting the size of our buffered payload to ~2MB

* CNI Update operation support

* Adding APIs for attach/detach network container to/from network.

* Updating new apis.

* Addressing Tamilmani's review/comments.

* Renaming Batch APIs and Request members for better clarity.

* Adding check for pluginsSection length before accessing element.

* Renaming ConfigureNetworkContainerNetworkingRequest to ConfigureContainerNetworkRequest.

* Adding default k8s cni paths for windows.

* Adding AzureFirstParty orchestrator type and Basic container type.

* Addressing Sushant's comments.
2019-02-26 16:04:27 -08:00
Tamilmani Manoharan 4055fa9f51 Added support for CNI telmetry report to mds 2019-02-01 16:24:45 -08:00
tamilmani1989 69fde1c342 changed vethnaming logic for transparent mode (#286) 2019-01-09 18:29:22 -08:00
Ashvin Deodhar e98936c622 Cleanup old networks and lock files after detecting reboot (#285) 2019-01-07 17:04:39 -08:00
tamilmani1989 b7f6742b7f CNI to support transparent mode (#279)
* added changes in azure cni to support transparent mode

* cni for calico policy controller

* removed unused parameter

* minor fix

* addressed review comments

* addressed review comments

* modified vethname generation and the hostbveth prefix

* removed setting arp for default gw

* minor fix
2019-01-04 16:19:36 -08:00
Ashvin Deodhar 96b4401f76 Detect reboot for windows and cleanup network config (#281) 2018-12-31 14:44:44 -08:00
tamilmani1989 a1b4da1b90 Adding/Remove static arp entry for pod IP in VM (#273)
* add static arp entry in vm (for bridge mode and singletenancy) whenever pod created and remove when its deleted
2018-12-11 11:18:11 -08:00
Ashvin Deodhar 3f1216ef26 Fix Endpoint policy regression (#268)
Fix endpoint policy regression
2018-11-20 10:51:18 -08:00
Ashvin Deodhar bfb3eaafa7 Implement multitenancy for windows (#259)
* Implement multitenancy for windows
2018-10-31 14:34:04 -07:00
Sushant Sharma 6e6260afe5 Implement CNI update for Azure CNI (#265)
* Implement CNI Update for Azure CNI (#21)
2018-10-29 11:10:27 -07:00
Yongli Chen 530d13adf2 Remove HNSNetwork's DNS suffix in Windows (#254)
* remove network dns suffix and preserve endpoint dns suffix
2018-10-10 15:30:05 -07:00
tamilmani1989 1b821feb3d Fix for Pod Connecting to itself via ServiceIP (#248)
* Enable hairpin for veth interface connecting to container interface. This fixes pod connecting to itself via service IP
2018-10-02 22:07:09 -07:00
John Howard a386846345 Store fixes; Windows compile
Signed-off-by: John Howard <jhoward@microsoft.com>

- First, the store timeout is woefully low. Bumped to 20 seconds from 2 seconds.
  This may fix https://github.com/Azure/azure-container-networking/issues/242#issuecomment-422701838
  IMO, as only test code calls it non-blocked, why even have a block parameter to Lock()?
  IMO also, why a timeout at all? They're always fraught with error and machine timing.

- Presence of a key should be checked using `raw, ok := hvs.data[key]`, not the current nil checked

- ErrKeyNotFound should be returned if the store file does not exist. It shouldn't ignore that error.

- Actually now reports if a timeout occurred correctly, along with non-block lock attempt when already locked.

- Serial pattern abuse in not always closing the lock file.

- Some golang correctness (errors should be lower case)

- go build ./... actually passes on Windows now - various compile errors previously.

- golang pattern conformance `if err:=<test>; err!=nil {....`

- Simplified timeout duration (no need for time.Duration(...))
2018-09-19 15:30:36 -07:00
tamilmani1989 f656f44ea2 Block apipa address (#238)
* block apipa address and remove reading dns from dnc. Added config for passing dns

* modified iptable rule to allow dns server to top of chain
2018-08-20 15:53:37 -07:00
tamilmani1989 9a9c2cd8d4 Added support for InfraVnet connectivity in multitenancy CNI (#234)
* Added infravnet connectivity support for multitenancy CNI
2018-08-18 14:50:49 -07:00
tamilmani1989 f84799b5f4 Added support for blocking private IP space via snat bridge (#228)
* Added support for blocking private ip space via snat bridge except for 10.0.0.10
2018-08-17 15:25:34 -07:00
jaer-tsun 431ac08469 Enable Circleci (#220)
Enable CircleCi
2018-08-14 12:08:48 -07:00
tamilmani1989 3ea96edae3 Update Windows CNI implementation to free resources in case of HNS failures (#223)
Update Windows CNI implementation to free resources in case of HNS failures
2018-08-09 16:54:10 -07:00