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

45 Коммитов

Автор SHA1 Сообщение Дата
Evan Baker c3f1a6ef9e
fix: remove PowerShell from Windows registry interactions (#2993)
remove powershell from windows registry txs

Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
2024-11-13 21:22:03 +00:00
QxBytes fc4da42d66
refactor: create safer command execution method (#2899)
* rename ExecuteCommand to ExecuteRawCommand

* add safer execute command method

* fix windows platform command test

* add uts and comments

* address feedback

* add parent context to execute command
2024-08-06 21:36:55 +00:00
shreyashastantram 313ce0c4b0
feat: Adding backend interfaces support to CNS (#2693)
* Adding backend interfaces support for CNS

* Fixing the log line

* Moving backend nic functions to platform package

* Moving the pnpID fetching to platform package

* Moving the mapping to CRD mode

* Moving macaddress parsing to net package function

* removing the backend nic config

* Handling multiple interface information

* Adding error handling for macaddress parsing

* Moving pnpid mapping to swift v2  flow

* Adding pipeline vars

* Adding ut's for Happy paths

* Adding ut's for Happy paths

* Adding mtpnc check

* Rebasing with master

* Addressing lint errors

* Adding function to linux file

* Addressing lint errors

* Addressing lint comments

* Addressing Lint issues

* Modifying ut's

* removing mutex lock on cache

* Adding podnetwork instance label

* Modifying ut's after change

* Moving function out of restserver

* Moving mapping after crd intial state

* Adding the config debug statements

* removing the unused config

* Adding the debug statements

* Adding the debug statements

* Adding more debug logs

* removing log lines and adding mtpnc status check

* Moving mapping to state file

* Rebasing and removing the debug statements

* Addressing lint errors

* removing the debug pipeline changes

* Adding more coverage

* Adding test coverage and unhappy paths

* Addressing lint errors

* addressing lint errors

* Addressing lint errors
2024-07-05 23:11:00 +00:00
ZetaoZhuang aab8e714fd
fix: skip setting SdnRemoteArpMacAddress when hns is not enabled (#2315)
fix: skip setting SdnRemoteArpMacAddress when hns is not enabled

Signed-off-by: ZetaoZhuang <106119232+ZetaoZhuang@users.noreply.github.com>
2023-11-01 05:13:11 +00:00
Paul Yu ae37d40982
[CNI] zap logger for platform package (#2233)
* zap logger for platform package
2023-10-13 12:08:58 -07:00
tamilmani1989 63548ede34
chore: Removing CNI logs that are not useful (#2065)
removed logs that's spamming and not useful

Co-authored-by: Ramiro <64089641+ramiro-gamarra@users.noreply.github.com>
2023-07-20 14:21:21 -04:00
Ramiro 99843e9a74
Improving error messages in windows command execution (#2054)
improving error messages from executing commands on windows
2023-07-18 10:48:53 -05:00
Rajvi fa2de6d579
set mellanox reg key (#1768) 2023-06-13 22:50:03 +00:00
Paul Yu b02110f59a
Dualstack overlay cni (#1925) 2023-04-29 14:50:44 -07:00
Keith Nguyen 81b84f6eea
Bugfix/14337706/remove state file (#1392)
* fix: remove state file to let CNI autorecover if CNI state file not present and RefCount not 0

* fix: move to invoker_azure.go

* fix: move to invoker_azure.go

* fix: revert error to private

* fix: unit test

* fix: move into delegate add/delete

Co-authored-by: Keith Nguyen <keithnguyen@microsoft.com>
2022-05-20 17:43:34 -05:00
msvik 9604d6e22f
CNI Linux: Add 10 seconds timeout for ExecuteCommand (#1336)
* CNI Linux: Add 10 seconds timeout for ExecuteCommand

* ran gofmt on changed file

* Fix lint error

* Added unit test for ExecuteCommand for linux

* Moved timeout to execlient. It has default timeout and method to override it now

* reduce timeout values in unit tests

Co-authored-by: msvik <msvik@users.noreply.github.com>
Co-authored-by: VK <misvik@users.noreply.github.com>
2022-04-21 10:00:50 -07:00
Paul Johnston 6d208e9762
Cns windows aks (#1059)
* chore: add in some functionality for CNS on windows host process pods
2021-11-22 09:23:01 -08:00
Eng Zer Jun e812bc82b8
refactor: move from io/ioutil to io and os packages (#1096)
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2021-11-17 16:31:42 -06:00
tamilmani1989 279911c94a
Support for Dualstack transparent (#1046)
* ipv6 dualstack support transparent mode

* golint fixes

* fixed linter errors

* enable ipv6 setting

* dualstack transparent changes

* abstracted platform execute command

* lint fixes
fix compilation issues

* addressed comments

* fixed a bug
2021-10-15 14:28:37 -07:00
Evan Baker 96bec09d41
chore: appease the linter (3/?), the big gofumpt (#987)
* gofumpt -w -s .

* small addtl cleanups after gofumpt

* rerun after rebase
2021-09-02 16:33:18 -05:00
Zhiwei Liu 4b3897470d
fix: Improve boot time query on Windows (#966)
* Improve boot time query on Windows

* Ad tz info of time in log

Co-authored-by: tamilmani1989 <tamilmani1989@gmail.com>

Co-authored-by: zwliu <zhiwei.liu@avepoint.com>
Co-authored-by: tamilmani1989 <tamilmani1989@gmail.com>
2021-08-11 09:44:49 -07:00
tamilmani1989 0bab55c31c
updated lockdir to /var/run/azure-vnet (#934) 2021-07-14 13:46:24 -07:00
Evan Baker 45f3668401
chore: appease the linter, pt 1 of ? (#922) 2021-07-08 13:30:59 -05:00
tamilmani1989 bac354aadf
updated lock directory for cni and ipam (#919)
manually triggered pipeline succeeded, so merging it
2021-07-02 09:15:16 -07:00
Mathew Merrick 1fa243e5f5
CI: Add golint-ci (#888)
* add golint-ci

* add gofmt

* enable linters

* uncap count

* fix linting/fmt issues
2021-06-01 16:58:56 -07: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
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 5fb1d7f713
Added config option for disabling iptable lock (#470)
* added config option for disabling iptable lock

* added log for iptable and ebtable version

* moved logging dependency package details to platform specific file
2020-01-03 17:08:14 -08:00
tamilmani1989 6ca873ce05
Remove Orphan lock file (#445)
* added removeorphanlockfile function

* remove lock file if process holding that exited

* addressed comments

* addressed comments and added a condition to check get process cmd is supported

* Addressed comments
fixed trim line ending

* updated log
2019-12-03 17:15:45 -08:00
jaer-tsun 01f722bf17
Moving some Hns const variables. (#348) 2019-04-30 17:00:56 -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 2dbc856ca1
Add option in CNS to pre-provision hns network (#323)
* Add option in CNS to pre-provision hns network

Add a commandline option in CNS to pre-provision hns network.
The commandline option take the type of the network that needs
pre-provisioning. This allows orchestrators to start CNS with this
option so that the VM network blip / disconnect is avoided when
calling cni add the very first time.
2019-04-15 13:10:23 -07:00
Ashvin Deodhar a1f804a912
Set SDNRemoteArpMacAddress regKey for windows multitenancy (#330)
* set SDNRemoteArpMacAddress

* Update the Comment

* address review comment
2019-04-12 11:01:18 -07:00
Ashvin Deodhar aa055ab979 Change the implementation of Get boot time (#304) 2019-02-27 11:35:33 -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 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
Ashvin Deodhar e98936c622 Cleanup old networks and lock files after detecting reboot (#285) 2019-01-07 17:04:39 -08:00
Ashvin Deodhar 96b4401f76 Detect reboot for windows and cleanup network config (#281) 2018-12-31 14:44:44 -08:00
jaer-tsun 136f03caf7 Cns telemetry (#275)
Adds telemetry capability for CNS.
2018-12-12 10:45:48 -08: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
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 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 40237b7444
Convert time to UTC (#162)
* convert time to utc

* Added a fix in getting last reboot time.

* moved logpath from platform to log package to prevent cycle
2018-06-04 16:47:21 -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
Onur Filiz d954cfd024 Moved IP address utility functions to platform 2017-05-03 18:19:52 -07:00
Onur Filiz 3bbcd0fd26 Add support for multiple subnets and gateways per network 2017-03-10 13:53:37 -08:00
Onur Filiz 0a0b483225 Fixed golint warnings 2017-03-09 10:34:30 -08:00
Onur Filiz 437f7876d7 Added license notice to all source files 2017-02-12 02:03:39 -08:00
Onur Filiz 789819e76d Moved OS-specific logic to platform package 2017-01-20 16:21:41 -08:00