Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Do not error out if uuid is not found. #510

Merged
merged 1 commit into from
Jan 8, 2018

Conversation

Random-Liu
Copy link
Member

@Random-Liu Random-Liu commented Dec 18, 2017

Current uuid handling logic is not perfect. Some known issues have been reported such as #509, #399 and #325.

When this doesn't work, kubelet won't be able to get image filesystem capacity and usage. However, we should not keep user from trying cri-containerd out because of this.

Add a flag to skip this logic, and I'll figure out how we could make this more portable across different environments.

Signed-off-by: Lantao Liu lantaol@google.com

Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

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

See nit comments.

@@ -96,6 +96,9 @@ type Config struct {
ProfilingPort string `toml:"profiling_port" json:"profilingPort,omitempty"`
// ProfilingAddress is address for profiling via host:port/debug/pprof/
ProfilingAddress string `toml:"profiling_addr" json:"profilingAddress,omitempty"`
// SkipImageFSUUID skips retrieving imagefs uuid.
Copy link
Member

Choose a reason for hiding this comment

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

/s/./ for new instance of CRIContainerdService./

@@ -158,6 +161,8 @@ func (c *CRIContainerdOptions) AddFlags(fs *pflag.FlagSet) {
defaults.ProfilingPort, "Profiling port for web interface host:port/debug/pprof/.")
fs.StringVar(&c.ProfilingAddress, "profiling-addr",
defaults.ProfilingAddress, "Profiling address for web interface host:port/debug/pprof/.")
fs.BoolVar(&c.SkipImageFSUUID, "skip-imagefs-uuid",
defaults.SkipImageFSUUID, "Skip retrieving imagefs uuid. When turned on, kubelet can't get imagefs capacity and imagefs disk eviction can't work.")
Copy link
Member

Choose a reason for hiding this comment

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

Skip retrieval of imagefs uuid for new CRIContainerdService instances. When turned on, the kubelet will not be able to get imagefs capacity or request imagefs disk eviction.

Copy link
Member Author

@Random-Liu Random-Liu Jan 8, 2018

Choose a reason for hiding this comment

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

CRIContainerdService is code name, I don't think user cares about that in the flag discription. :)
I'll update the other parts.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

c.imageFSUUID, err = c.getDeviceUUID(imageFSPath)
if err != nil {
return nil, fmt.Errorf("failed to get imagefs uuid of %q: %v", imageFSPath, err)
if !c.config.SkipImageFSUUID {
Copy link
Member

Choose a reason for hiding this comment

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

suggest adding an info logf that it has been skipped..

Copy link
Member Author

Choose a reason for hiding this comment

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

Will do.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@Random-Liu Random-Liu added this to the v1.0.0-beta.1 milestone Jan 8, 2018
Signed-off-by: Lantao Liu <lantaol@google.com>
Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

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

/LGTM

@Random-Liu Random-Liu merged commit f6437b4 into containerd:master Jan 8, 2018
@Random-Liu Random-Liu deleted the do-not-exit branch January 8, 2018 19:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants