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

300 Коммитов

Автор SHA1 Сообщение Дата
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
jaer-tsun 4a595724e1
Fix Attach/Detach NC from Network Calls (#309)
* Pass CNS server url when invoking CNI during add/del call in windows and update call in linux.

* Addressing Tamilmani's comments.

* Forgot to fix linux side of networkcontainers_linux.go

* Enabling exact match for pod name in attach/detach containertonetwork APIs.

* Returning the correct error when invoking Cni.

* Checking if orchestrator is Batch for attach/detach network calls.

* Moving similar lines for NewNetPluginConfiguration into a single function.

* Removing CNI configuration manipulation in CNS.

* Addressing Tamilmani's comments.

* Addressing Vivek's comments.

* Addressing Tamilmani's comments.

* Addressing Vivek's comment.

* Addressing Tamilmani's comments.
2019-04-08 16:41:33 -07:00
jaer-tsun 12acd3d177
Cutting out Routes and DNS from EventMessage because it is cause HostNetAgent crash. (#325) 2019-04-08 16:40:14 -07:00
jaer-tsun 3043dc9736
CNS to start telemetry process and connect to it (#324)
* Spawn telemetry buffer in a separate process instead of goroutine.

* Adding an option to disable telemetry.

* Addressing some of Tamilmani's comments.
2019-04-08 16:20:05 -07:00
tamilmani1989 a11d5104a0
Config support for Telemetry service (#317)
* 1. Start telemetry service as separate process for all components cns/networkmonitor
2. Added telemetry config through which we can configure reportTohost interval
3. Added unit tests for changes

* added new files for telemetry testing

* added tests for invalid cases

* updated with dummy subid
2019-03-25 14:12:32 -07:00
tamilmani1989 83945fd6bf
fixed logging part of telemetry (#312)
* fixed logging part of telemetry

* fixed an issue

* added more test coverage

* fixed an issue

* fixed invalid condition and added UT

* initialize telemetry logger as part of telemetry server

* changed checkifsockexists to sockexists

* changed interval time to push telemetry data to host
2019-03-13 14:01:30 -07:00
Michelle Cone 3ddb72cdbe Add dns capabilities to allow for custom dns in Windows (#305)
* Add dns capabilities to allow for custom dns in Windows

Co-authored-by: James Sturtevant <jstur@microsoft.com>

* Move customDNS logic for Windows into network_windows.go and update link for RuntimeDNSConfig

Co-authored-by: James Sturtevant <jstur@microsoft.com>

* Concatenate the elements of DNS.Searches
2019-03-04 13:01:56 -08:00
tamilmani1989 4be2f9288a
Close telemetry socket when its done (#302)
* 1. fix for closing telemetry socket in cni
2. fix for closing connection socket if server receives error on read

* added uts and addressed comments

* removed from slice after closing connection
2019-02-28 11:32:40 -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
jaer-tsun e5f6b0d03c
Update host machine ip (#300)
* Limiting the size of our buffered payload to ~2MB

* Changing IPs for calls to host machines from 169.254.169.254 to 168.63.129.16.
2019-02-26 16:03:29 -08:00
Tamilmani Manoharan f7033499bc modified uptime format 2019-02-14 12:41:31 -08:00
Tamilmani Manoharan 13ebac4f83 added vlanid as part of report log 2019-02-06 17:25:17 -08:00
Tamilmani Manoharan 7eb2391ff2 addressed review comments and added separate logger for telemetry service 2019-02-06 17:05:01 -08:00
Tamilmani Manoharan 5408d262a8 moved optype down if statement 2019-02-05 16:40:10 -08:00
Tamilmani Manoharan bff9bed007 addressed review comments and modified unit tests 2019-02-05 15:14:44 -08:00
Tamilmani Manoharan 4055fa9f51 Added support for CNI telmetry report to mds 2019-02-01 16:24:45 -08:00
Tamilmani Manoharan fdf044195d time format change 2019-01-24 16:40:12 -08:00
Tamilmani Manoharan d04d6bd9ed added new fields for telemetry 2019-01-23 17:10:29 -08:00
Tamilmani Manoharan 63a4d0f469 temp changes 2019-01-22 17:07:32 -08:00
Tamilmani Manoharan 0ac1ea6f92 telemetry changes 2019-01-14 15:04:17 -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 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
erfrimod ceac7912ac Adding PortMapping support to Azure cni for Windows (#256) 2018-10-15 11:30:17 -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
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
jaer-tsun d28b594619
Moving dnc specific material out. (#233) 2018-08-16 16:28:46 -07:00
jaer-tsun 45914be23d
Adding telemetry report functions for DNC. (#216)
* Adding telemetry report functions for DNC.

* Addressing Yongli's suggestions.

* commit to switch branches

* Adding some changes to npm due to telemetry change.

* Modifying tests for interface reports...
2018-08-16 14:12:58 -07:00
Sushant Sharma 6c826a7d19 Use CNI spec to create interface name for container interfaces 2018-08-13 16:15:06 -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
tamilmani1989 d0d9a4f934 Fix for unparseable error returned by Azure CNI (#212)
* Write result to stdout only in successful case
2018-08-08 12:40:39 -07:00
Yongli Chen 1c14dd0ad3
make archive for npm (#200) 2018-07-19 16:06:11 -07:00
Yongli Chen 6a0f9ff207
Add Azure-npm to provide k8s network policy support (#173)
* address comments

* make azure-npm versiona consistent with main version

* Npm telemetry (#12)

* azure-npm

* set logging file

* parameterize telemetry API

* avoid null ptr derefence

* add telemetry to npm

* address comments

* add descriptive comments

* add copyright info

* returns on err
2018-07-19 14:23:11 -07:00
tamilmani1989 9f93ec63f3 added windows multitenancy conflist (#192) 2018-07-06 17:12:30 -07:00
tamilmani1989 147c4388c8 Multitenancy Support for Linux (#156)
This PR adds the following capabilities
1. Support to create and connect containers to different Azure Vnets. Every VlanId corresponds to a different Azure Vnet.
2. SNAT support for containers to reach Internet using the container's host IP as the SNAT address.

Both the above options are controlled by the config parameters in Azure CNI.
2018-07-06 11:45:47 -07:00
tamilmani1989 ec415fd08b Fixed initializing store in ipam (#188)
* fixed initializing store in ipam
2018-07-05 15:27:24 -07:00
Madhan Raj Mookkandy d590c97e12 Fix to use latest cni for building (#182) 2018-07-05 15:22:24 -07:00
Madhan Raj Mookkandy 1f436d3af9 Fix error message to include endpoint, container id (#183) 2018-07-02 14:20:56 -07:00
tamilmani1989 f09a7132a1 Fixed the github acsengine issue #176 (#177) 2018-06-26 12:01:44 -07:00
ashvindeodhar 187609860a Fill in the plugin version in -about- string (#165) 2018-06-05 12:25:41 -07:00
ashvindeodhar 54be5fed60 azure-vnet: Implement GET command as per CNI 0.4.0 spec (#161)
* azure-vnet: Implement GET command
2018-06-01 17:48:19 -07:00
Yongli Chen 8e4cd96ecb make kube-dns main dns server (#153) 2018-05-29 16:24:11 -07:00
Yongli Chen 7f41e3dca5 add k8s pod namespace to dns suffix (#152) 2018-05-25 15:53:53 -07:00
tamilmani1989 41ecaedb0d Generate VethName based on podname and namespace in CNI (#143)
* Generate vethname based on podname and namespace
2018-05-16 17:02:09 -07:00
Yongli Chen f0f090e525
This PR moves cni related code from network package to cni. (#131)
* configure dnssuffix & dnsServerList

* add dns info to conflist

* change case for dns info

* remove hardcoding

* remove hardcoding

* parse k8s pod info

* add AdditionalArgs and Dns info to conflist

* serialize policies

* program route info

* start addressign ipam ip leak

* fix 1) ip inconsistency in k8s & pod. 2) IP leak in IPAM.

* remove comments

* separate windows & linux

* remove dnsServers

* remove comments

* address comments

* add dns verification

* abstract linux policy struct

* remove setPolicies

* separte Windows & Linux code

* change package

* add policy structure to Linux

* move policy code to policy.go

* fix network_linux func signature

* restructure policy pkg
2018-05-03 19:02:53 -07:00
Yongli Chen c6c23a7d94
This PR moves cni related code from network package to cni. (#130)
* configure dnssuffix & dnsServerList

* add dns info to conflist

* change case for dns info

* remove hardcoding

* remove hardcoding

* parse k8s pod info

* add AdditionalArgs and Dns info to conflist

* serialize policies

* program route info

* start addressign ipam ip leak

* fix 1) ip inconsistency in k8s & pod. 2) IP leak in IPAM.

* remove comments

* separate windows & linux

* remove dnsServers

* remove comments

* address comments

* add dns verification

* abstract linux policy struct

* remove setPolicies

* separte Windows & Linux code

* change package
2018-05-03 16:05:57 -07:00
Yongli Chen f1f65e73e9 moves cni related code from network package to cni. (#129)
* configure dnssuffix & dnsServerList

* add dns info to conflist

* change case for dns info

* remove hardcoding

* remove hardcoding

* parse k8s pod info

* add AdditionalArgs and Dns info to conflist

* serialize policies

* program route info

* start addressign ipam ip leak

* fix 1) ip inconsistency in k8s & pod. 2) IP leak in IPAM.

* remove comments

* separate windows & linux

* remove dnsServers

* remove comments

* address comments

* add dns verification

* abstract linux policy struct

* remove setPolicies

* separte Windows & Linux code
2018-05-03 15:48:30 -07:00
Yongli Chen 0bbce8daa9 Support k8s DNS & endpoint policy (#127)
* configure dnssuffix & dnsServerList

* add dns info to conflist

* change case for dns info

* remove hardcoding

* remove hardcoding

* parse k8s pod info

* add AdditionalArgs and Dns info to conflist

* serialize policies

* program route info

* start addressign ipam ip leak

* fix 1) ip inconsistency in k8s & pod. 2) IP leak in IPAM.

* remove comments

* separate windows & linux

* remove dnsServers

* remove comments

* address comments

* add dns verification

* abstract linux policy struct

* remove setPolicies
2018-05-03 14:57:31 -07:00
jaer-tsun 5018a365aa Adding CniSucceeded flag to report whether CNI had been run successfully. (#122) 2018-04-26 14:09:47 -07:00
tamilmani1989 2009917134 Added support for cnm reboot scenario (#98)
* Added support cnm reboot scenario

* Addressed review comments
2018-02-22 11:22:47 -08:00
tamilmani1989 e553913daa removed reservation id inclusion from CNI (#99) 2018-02-22 11:17:31 -08:00
Yongli Chen 0ddedd86d6 separate conflist for Windows & Linux (#94) 2018-01-30 16:40:07 -08:00
Yongli Chen 1242aa05f7 enable hostport (#89) 2018-01-05 16:03:04 -08:00
Tamilmani Manoharan aad93c52cf Fixed review comments 2017-12-12 10:45:53 -08:00
Tamilmani Manoharan 1669082f90 Moved xmldocument structure to common directory 2017-12-12 10:45:53 -08:00
Tamilmani Manoharan db64eed586 report will be sent only once except for reporting error message 2017-12-12 10:45:53 -08:00
Tamilmani Manoharan 104d6dc191 VSTS#1728451 Added telemetry support for CNI 2017-12-12 10:45:53 -08:00
Onur Filiz 8acef7dc10 Change CNI network plugin mode to bridge 2017-08-02 20:31:25 -07:00
Onur Filiz 21beed56fb Update CNI DEL cmd to succeed if the resource being deleted is not found 2017-07-19 15:28:17 -07:00
Onur Filiz 65107d4e74 Remove interface index from CNI IPAM plugin results 2017-06-27 11:15:35 -07:00
Onur Filiz 9ae3dd149c Recover from panics and convert to CNI errors 2017-06-16 12:03:54 -07:00
Onur Filiz ed73debdf8 Add support for releasing addresses by ID 2017-06-14 14:34:52 -07:00
Onur Filiz 0f34eb5c6a Store endpointId in CNI requests to track addresses back to their endpoints 2017-06-07 12:09:44 -07:00
Onur Filiz e2989826af Add support for CNI spec versions 0.3.0 and 0.3.1 2017-05-09 19:29:15 -07:00
Onur Filiz f9dd6e7655 Updated IPAM to return the VNET gateway address for libnetwork gateway requests 2017-05-04 20:02:03 -07:00
Manohar Castelino b269a67730 Bounds check the CNI ContainerID before using it (#59)
Bounds check the CNI ContainerID before using it.
Fixes #58

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2017-05-04 17:52:03 -07:00
Onur Filiz d954cfd024 Moved IP address utility functions to platform 2017-05-03 18:19:52 -07:00
Onur Filiz 60c540a02e Added support for custom API server URLs to CNM plugins 2017-05-02 18:39:32 -07:00
Onur Filiz 87642a38d7 Added ability to find the master interface by address pool 2017-03-29 23:03:26 -07:00
Onur Filiz 69510c9f88 Added ability to find the master interface by address pool 2017-03-29 22:56:11 -07:00
Onur Filiz 3bbcd0fd26 Add support for multiple subnets and gateways per network 2017-03-10 13:53:37 -08:00
Onur Filiz c6b708fc42 Added DNS info and ContainerID to endpoint 2017-03-07 23:23:44 -08:00
Onur Filiz 278ce7587b Added support for Linux l2tunnel mode 2017-03-06 16:24:20 -08:00
Onur Filiz e4041a1a4a Merge pull request #52 from Azure/development
Development
2017-02-24 14:38:53 -08:00
Onur Filiz 863dd51b85 Fixed error paths to return CNI errors 2017-02-24 14:38:00 -08:00
Onur Filiz 2ad0393c11 Deleted redundant code 2017-02-19 13:34:13 -08:00
Onur Filiz 437f7876d7 Added license notice to all source files 2017-02-12 02:03:39 -08:00
Onur Filiz d1370d9d8f Implemented CNI version 0.2.0 using the updated types package 2017-02-06 14:14:38 -08:00
Onur Filiz cb4517f6d8 Enabled support for CNI versions up to 0.3.0 2017-02-05 23:52:35 -08:00
Onur Filiz 4f561e1d5b Moved NetworkConfig and test hook to their own files 2017-02-05 21:26:57 -08:00
Onur Filiz e39a721103 Added CNI IPAM plugin test skeleton 2017-02-01 21:11:53 -08:00
Onur Filiz 06044b4c34 Exported address space scopes and IDs from IPAM package 2017-01-24 16:22:08 -08:00
Onur Filiz c8503393f7 Moved common CNI logic to CNI base class and enabled gracious shutdown on failure 2017-01-24 15:21:57 -08:00
Onur 02b0c0417d Updated plugins to use OS-specific paths 2017-01-20 19:03:42 -08:00
Onur Filiz 789819e76d Moved OS-specific logic to platform package 2017-01-20 16:21:41 -08:00
Onur Filiz fd36ee040b Separated CNI network and IPAM plugins to their own binaries 2017-01-19 16:37:57 -08:00
Onur Filiz 3dd61ff260 Updated CNI network configuration with new plugin names and master field 2017-01-19 16:34:03 -08:00
Onur Filiz 4342cc1bec Added a sample CNI configuration file 2017-01-06 17:36:44 -08:00
Onur Filiz 0e13965ced Added support for multiple IPv4 addresses and routes 2016-12-12 16:03:10 -08:00
Onur Filiz 23258937c7 Moved all CNI IPAM logic to cni.ipam package 2016-12-09 18:05:33 -08:00
Onur Filiz 4e4427ccc5 Updated EndpointInfo to store the interface's IP subnet 2016-12-07 17:41:46 -08:00
Onur Filiz 0ef945eb56 Added ability to pass cmd-line options to IPAM 2016-12-06 11:17:47 -08:00
Onur Filiz 82e8dca13f Updated arg names to be common between CNI and CNM 2016-12-06 11:12:47 -08:00
Onur Filiz 512c840d73 Updated network config to omit empty JSON fields 2016-12-01 13:29:23 -08:00
Onur Filiz bae7072fa4 Added initial CNI support 2016-11-30 18:00:08 -08:00