-
Notifications
You must be signed in to change notification settings - Fork 260
fix: Improve boot time query on Windows #966
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
||
| // Parse the boot time. | ||
| layout := "2006-01-02 15:04:05" | ||
| rebootTime, err := time.ParseInLocation(layout, systemBootTime, time.Local) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this cause a difference in output in different regions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
based on timezone, its printing the reboot time.
pst:
2021/08/09 13:19:34 [12816] Formatted Boot time: 2021-07-20 15:02:32
i then set it to ist:
2021/08/10 01:49:58 [17720] Formatted Boot time: 2021-07-21 03:32:32
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Co-authored-by: tamilmani1989 <tamilmani1989@gmail.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Just a question, I saw a e2e job (E2E - Ubuntu 16.04 Singletenancy AKS Engine Suite - (ubuntu_16_04_linux_e2e)), Ubuntu 16.04 support is dropped in AKS Engine, see Azure/aks-engine#4418. |
ubuntu16.04 is not deprecated still. They just recommend to use ubuntu18 since canonical retire support for ubuntu16
|
Reason for Change:
Improve performance of boot time query on Windows, it is also a solution for #955.
This is refresh of #529, the idea comes from https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/util/util_windows.go#L119.
Please note there will be possible one second deviation of result in new implementation, for example the output:
Old: 2021-08-09 00:52:28
New: 2021-08-09 00:52:27(the actual value is 2021-08-09 00:52:27.3958047)
Issue Fixed:
Fixes #955
Requirements: