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

13 Коммитов

Автор SHA1 Сообщение Дата
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
tamilmani1989 cdab7d0241
Use Lockedfile api to acquire lock (#1070)
* added lockedfileapi support for CNI

* fixed interface changes

* addressed comments
fixed ut

* addressed comments

* fixed copy to buffer part in writer api

* fixed copy to buffer part in writer api

* keeping old code not changing it.
2021-11-09 08:19:44 -08: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
Ashvin Deodhar 4c4e5f5d6d
fix: Remove unreadable CNS state file upon CNS service start (#782)
This change removes unreadable state file ( azure-cns.json ) while starting the CNS service
2021-02-11 09:10:13 -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
Ashvin Deodhar e98936c622 Cleanup old networks and lock files after detecting reboot (#285) 2019-01-07 17:04:39 -08: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
Onur Filiz 437f7876d7 Added license notice to all source files 2017-02-12 02:03:39 -08:00
Onur Filiz f17e20ac90 Updated network and address managers to ignore stale persisted state from previous boots 2016-12-16 18:03:03 -08:00
Onur Filiz 9f1ffeb9ae Added lock timeouts to JSON store 2016-11-21 13:48:03 -08:00
Onur Filiz e49a9ec606 Added locking capability to JSON store 2016-11-14 18:21:37 -08:00
Onur Filiz 747b522bcd Updated JSON store to return error if key is not found 2016-07-27 18:24:26 -07:00
Onur Filiz e5912f0de1 Implemented JSON key value store 2016-07-25 18:33:43 -07:00