Open thdrnsdk opened 1 month ago
@thdrnsdk could you give some more detail on the issue you're having? That logic to clean up HNS networks if a reboot is detected only happens on calico-node startup, and things will be restored to a working state in the end. A mis-detection of a reboot is unfortunate, but I fail to see how that's more than an inconvenience. Could you please elaborate your scenario?
when i was changed os timezone (for example from kst to utc), after than not reboot the server. in that state, if calico pod was restarted then always not equl storedboottime and last boottime so not after the node is rebooted, but simply restarting the pod, but all hnsnetworks are deleted.
for example 2024-10-18T03:01:45.2270501+09:00 stdout F StoredLastBootTime 6/13/2024 4:39:15 PM, CurrentLastBootTime 6/13/2024 7:39:15 AM
hcnnetwork get weird when change os's timezone
If the calico Windows container restarts without rebooting after the OS timezone is changed there is a mismatch between the last boottime used in node-start.ps1 and the stored lasttime, so logic to delete the HNS network is performed. (https://github.com/projectcalico/calico/blob/master/node/windows-packaging/CalicoWindows/node/node-service.ps1#L76)
In normal cases, Remove-HNSNetwork would not be performed, but the timezone changes, lastboottime changes, and the corresponding logic is performed when calico container restart
Expected Behavior
Current Behavior
Possible Solution
Steps to Reproduce (for bugs)
1. 2. 3. 4.
Context
Your Environment