* 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.
* Spawn telemetry buffer in a separate process instead of goroutine.
* Adding an option to disable telemetry.
* Addressing some of Tamilmani's comments.
* 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
* 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
* 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
* 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
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(...))
* 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...
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.
* 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
* 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
* 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
* 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