Skip to content

Conversation

@zhiweiv
Copy link
Contributor

@zhiweiv zhiweiv commented Aug 9, 2021

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:


// Parse the boot time.
layout := "2006-01-02 15:04:05"
rebootTime, err := time.ParseInLocation(layout, systemBootTime, time.Local)
Copy link
Contributor

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?

Copy link
Member

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

@rbtr rbtr requested a review from tamilmani1989 August 9, 2021 17:31
@tamilmani1989
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tamilmani1989
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@zhiweiv
Copy link
Contributor Author

zhiweiv commented Aug 11, 2021

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.

@tamilmani1989
Copy link
Member

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

Note that this PR doesn't actually deprecate Ubuntu 16.04-LTS. Its intention is to make it much less likely that someone would build a new cluster backed by 16.04-LTS (the default has been 18.04-LTS for a long time, so any new 16.04-LTS clusters would have to be explicitly configured as such).

@tamilmani1989 tamilmani1989 merged commit 4b38974 into Azure:master Aug 11, 2021
@zhiweiv zhiweiv deleted the boottime branch August 12, 2021 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Azure CNI creates lots of short lived calls to WMI

3 participants