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
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
James Sturtevant
8a60ff1906
lowercase ipv6 ( #989 )
2021-09-02 16:03:54 -05:00
Evan Baker
1087201b28
chore: appease the linter, pt 2 of ? ( #925 )
2021-09-01 18:28:17 -05:00
tamilmani1989
b63e52328c
disable cleaning up hns network and state files from windows cni ( #879 )
...
* disable cleaning up hns network and state files from windows cni
* fixed uts
* fixed ut
* remove the ut which is not needed anymore
* addressed comments
* updated same pattern for cnm
* added comments
* addressed comments
2021-07-21 09:37:48 -07:00
Mathew Merrick
f2e763050d
fix: [CNI] handle getting endpoints when state file is empty ( #916 )
...
* handle empty state file
* update tests
* restore
* fix: add custom unmarshaller for struct with embedded custom interface type
* mkdir images
Co-authored-by: Evan Baker <rbtr@users.noreply.github.com>
2021-06-30 17:54:43 -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
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
aegal
d8e57328c1
Merge pull request #640 from Azure/ipamLeakFix
...
ipam pool leak fix
2020-09-01 16:10:08 -07:00
Ali Egal
90401b7a4d
addressing a couple other comments
2020-08-31 13:18:27 -07:00
Ali Egal
7006932d52
removing setting pool count to zero
2020-08-31 10:34:06 -07:00
Ali Egal
9049eaa10b
back from vacation, addressing some comments
2020-08-31 10:18:25 -07:00
Ali Egal
b236797bc0
remove couple things
2020-08-18 09:04:19 -07:00
Ali Egal
2de8c2c6c8
remove a typo
2020-08-17 10:19:30 -07:00
Ali Egal
14dbf14c04
removing test file I added
2020-08-17 09:30:07 -07:00
Ali Egal
72b6f4edbb
adding couple more changes
2020-08-15 14:54:41 -07:00
Ali Egal
7448bac52d
revert IPAM.go file
2020-08-10 17:10:42 -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
Ali Egal
44607247d3
fixing up some tests
2020-08-06 16:54:09 -07:00
Ali Egal
9a05e5c73e
don't decrement refCount if addresses are in use
2020-08-04 22:12:53 -07:00
Ali Egal
faa0f584b3
ipam leak fix
2020-08-04 21:58:45 -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
PrIce Qian
512ffed5ef
Add IPAM unit tests && Using ginkgo replace the origin go test ( #508 )
...
* 1. Add IPAM unit tests
2. Using ginkgo instead of the origin go test
* fix go mod
2020-04-09 01:10:24 -07:00
Mathew Merrick
79d8758228
ipv6 don't reserve gateway address ( #537 )
2020-04-02 20:24:51 -07:00
Mathew Merrick
d2ba9bb2f3
IPv6 Node IPAM ( #532 )
...
* switch to go mod
* pull node spec from apiserver
* carve v6 addresses
* address pool
* update go mod vendor
* build image
* build image
* build image
* separate go mod for npm
* add manager ipv6 ipam test
* added comments and addressed feedback
* address comments
* address comments
* address comments
* check if loaded
* address comments
* update pipeline
* update pipeline
* update test message
Co-authored-by: Ubuntu <azureuser@k8s-agentpool1-23761303-0.2w0jm2xwiahebmp33klngrlq1d.xx.internal.cloudapp.net>
2020-04-02 11:01:05 -07:00
Mathew Merrick
2a6a195a9b
Update CNM test to delete endpoint ( #499 )
...
* Update network_test.go
* Update fileIpam_test.go
2020-02-06 16:45:46 -08:00
Ashutosh Dubey
c2665f3e4a
adds environment flag fileIPAM ( #482 )
...
* adds environment flag fileIPAM
* "creating fileIpamSource once"
* Update fileIpam.go
well spaced if-1
* Update fileIpam_test.go
well spaced if-2
* comment improved
* smarter code structure
2020-02-06 14:59:56 -08:00
tamilmani1989
534e646fd9
Fix for http client call to wireserver ( #431 )
...
* modified wireserver call to non-blocking. Fixed logging issue in ipam
* fixed ut
* addressing review comments
* used inithttpclient function
2019-11-25 17:07:50 -08:00
t-chappl
34cbf8285d
Read network configuration from a file on azure stack ( #369 )
...
* read interface configuration from file on azure stack
* remove name field and wrap interface array
* switch from crlf to lf
* address comments
* increase unit test coverage
* nil check source on refresh
* remove space
2019-07-03 15:41:53 -07: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
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
tamilmani1989
ec415fd08b
Fixed initializing store in ipam ( #188 )
...
* fixed initializing store in ipam
2018-07-05 15:27:24 -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
Tamilmani Manoharan
1669082f90
Moved xmldocument structure to common directory
2017-12-12 10:45:53 -08:00
Tamilmani Manoharan
3c5ae5da8c
Handled address not found during release address as false positive
2017-10-18 14:59:21 -07:00
Onur Filiz
5efa19bdb5
Add logging for host query soft failures
2017-08-17 13:49:36 -07:00
Onur Filiz
da269caaaf
Add support for releasing addresses by ID
2017-06-14 14:39:25 -07:00
Onur Filiz
ed73debdf8
Add support for releasing addresses by ID
2017-06-14 14:34:52 -07:00
tamilmani1989
127ec6d945
Add support for releasing addresses by ID
2017-06-12 16:36:21 -07:00
tamilmani1989
fb1d76fc18
Add GetPoolInfo to retrieve additional information about address pools ( #62 )
2017-06-08 18:37:21 -07:00
Onur Filiz
7bf7647482
Return the pre-allocated address for the same id to enable idempotency
2017-06-08 12:42:19 -07:00
Onur Filiz
e0f0e1ca5f
Store an identifier in address records to track address requests
2017-06-07 12:07:53 -07:00
Onur Filiz
223cb03242
Updated IPAM to return the VNET gateway address for libnetwork gateway requests
2017-05-04 19:59:21 -07:00
Onur Filiz
d954cfd024
Moved IP address utility functions to platform
2017-05-03 18:19:52 -07:00
Onur Filiz
ff9c4697a1
Updated DNS server address for vnet
2017-04-20 11:04:12 -07:00