Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

agent: sync system clock with hwclock when creating new sandbox#423

Closed
bergwolf wants to merge 1 commit into
kata-containers:masterfrom
bergwolf:clock
Closed

agent: sync system clock with hwclock when creating new sandbox#423
bergwolf wants to merge 1 commit into
kata-containers:masterfrom
bergwolf:clock

Conversation

@bergwolf
Copy link
Copy Markdown
Member

@bergwolf bergwolf commented Nov 29, 2018

The two might differ due to vm templating. We need to fix the
drift by setting system clock from hardware clock since kvmclock
should be trusted.

Depends-on: github.com/kata-containers/packaging#260
Depends-on: github.com/kata-containers/osbuilder#213
Fixes: #422

Signed-off-by: Peng Tao bergwolf@gmail.com

@bergwolf
Copy link
Copy Markdown
Member Author

/cc @linxiulei This should be able to fix kata-containers/runtime#951

Comment thread agent.go

func (s *sandbox) syncTimeHw2Sys() error {
cmd := &exec.Cmd{
Path: "/sbin/hwclock",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heh - do we know we have this in all our rootfs distro variants btw?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, yeah, you are right, I'm missing the osbuilder PR! Will send it out soon.

Copy link
Copy Markdown
Member Author

@bergwolf bergwolf Nov 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sent github.com/kata-containers/osbuilder/pull/213 and updated the Depends-on tag here. Thanks for catching it so quickly!

The two might differ due to vm templating. We need to fix the
drift by setting system clock from hardware clock since kvmclock
should be trusted.

Depends-on: github.com/kata-containers/packaging#260
Depends-on: github.com/kata-containers/osbuilder#213
Fixes: kata-containers#422

Signed-off-by: Peng Tao <bergwolf@gmail.com>
@bergwolf
Copy link
Copy Markdown
Member Author

bergwolf commented Dec 4, 2018

replaced by #425 since it would work for all architectures and hypervisors.

@bergwolf bergwolf closed this Dec 4, 2018
@bergwolf bergwolf deleted the clock branch April 8, 2019 08:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sync time when creating new sandbox

2 participants