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

rootfs: add util-linux#213

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

rootfs: add util-linux#213
bergwolf wants to merge 1 commit into
kata-containers:masterfrom
bergwolf:util-linux

Conversation

@bergwolf
Copy link
Copy Markdown
Member

So that kata-agent can call related commands.

Fixes: #212

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

So that kata-agent can call related commands.

Fixes: kata-containers#212

Signed-off-by: Peng Tao <bergwolf@gmail.com>
bergwolf added a commit to bergwolf/kata-agent that referenced this pull request 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: kata-containers#422

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

/test
/cc @jcvenegas @marcov
I wonder what the footprint impact might be...

@jodh-intel
Copy link
Copy Markdown

Technically, we only need this package if we're building an initrd since only an initrd can be used for VM templating.

The problem is the rootfs builder can't know if it's going to be used for a rootfs image or an initrd image. We could only add this package if [ "$AGENT_INIT" = "yes" ] but that's rather a crude heuristic.

@jodh-intel
Copy link
Copy Markdown

Yeah - space. We're only using a single binary from that package, so it does seem somewhat overkill to drag in over 100 binaries. Maybe we should remove all but hwclock.... or consider adding busybox which also provides hwclock (as does toybox ftr) - named as hwclock with no other symlinks maybe.

# Set OS_NAME to the desired debian "codename"
OS_NAME=${OS_NAME:-"stretch"}

PACKAGES="util-linux"
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.

You dont need to add the package here, debian is reusing the config from ubuntu.

@devimc
Copy link
Copy Markdown

devimc commented Nov 29, 2018

wow util-linux contains a lot of binaries, that potentially can increase attack surface, can we sync system clock by using a Golang function or library?

@jodh-intel
Copy link
Copy Markdown

jodh-intel commented Nov 29, 2018

+1 if that's a possibility.

Approved with PullApprove

Copy link
Copy Markdown

@devimc devimc left a comment

Choose a reason for hiding this comment

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

I don't like the idea of including util-linux for just one binary, attack surface will increase

@kata-containers/osbuilder wdyt?

@bergwolf
Copy link
Copy Markdown
Member Author

Fire enough. Let me try to copy what hwclock does with golang in the agent.

@bergwolf
Copy link
Copy Markdown
Member Author

bergwolf commented Dec 4, 2018

Let's pursue grpc based solution since that would work for NUME as well which is missing rtc emulation.

@bergwolf bergwolf closed this Dec 4, 2018
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.

5 participants