Skip to content
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

Ensure minimum kernel version for thin_ls #1411

Merged
merged 1 commit into from
Aug 4, 2016

Conversation

ncdc
Copy link
Collaborator

@ncdc ncdc commented Aug 4, 2016

Ensure that kernel >= 4.4.0 or RHEL/Centos 7 kernel >= 3.10.0-366 exists before starting the thin
pool watcher. Prior versions have a bug in which reserving and releasing the metadata snapshot can
cause thin pool corruption.

Fixes #1409

@eparis @smarterclayton @derekwaynecarr @pmorie @sjenning

@k8s-bot
Copy link
Collaborator

k8s-bot commented Aug 4, 2016

Jenkins GCE e2e

Build/test passed for commit d1e2041.

@ncdc
Copy link
Collaborator Author

ncdc commented Aug 4, 2016

FYI @timstclair @vishh - lmk if something like this is ok

@timothysc
Copy link
Contributor

This is breaking nodes in our cluster atm.

@ncdc
Copy link
Collaborator Author

ncdc commented Aug 4, 2016

@ncdc
Copy link
Collaborator Author

ncdc commented Aug 4, 2016

devicemapper filesystem stats will not be reported: RHEL/Centos 7.x kernel version 3.10.0-366 or later is required to use thin_ls - you have "3.10.0-327.22.2.el7.x86_64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"

Need to fix that 😄

@@ -197,6 +208,80 @@ func startThinPoolWatcher(dockerInfo *dockertypes.Info) (*devicemapper.ThinPoolW
return thinPoolWatcher, nil
}

func getKernelVersion() (string, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok cool, thanks!
On Thu, Aug 4, 2016 at 1:30 PM Tim St. Clair [email protected]
wrote:

In container/docker/factory.go
#1411 (comment):

@@ -197,6 +208,80 @@ func startThinPoolWatcher(dockerInfo _dockertypes.Info) (_devicemapper.ThinPoolW
return thinPoolWatcher, nil
}

+func getKernelVersion() (string, error) {

This function already exists here:
https://github.com/google/cadvisor/blob/master/machine/info.go#L142


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/google/cadvisor/pull/1411/files/d1e20410961d80cf2bde3a8a68c6249cf7c06c95#r73566520,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAABYme1PxGA4dN5oKe4pj-zPO7GPq7Eks5qciHAgaJpZM4Jc2Va
.

@timstclair timstclair self-assigned this Aug 4, 2016
@k8s-bot
Copy link
Collaborator

k8s-bot commented Aug 4, 2016

Jenkins GCE e2e

Build/test passed for commit 5bb3c31.

@k8s-bot
Copy link
Collaborator

k8s-bot commented Aug 4, 2016

Jenkins GCE e2e

Build/test passed for commit 1bd0010.

@ncdc
Copy link
Collaborator Author

ncdc commented Aug 4, 2016

@timstclair any other comments?


if sem.EQ(minRhel7KernelVersion) {
// need to check release
releaseRE := regexp.MustCompile(`^[^-]+-([^.]+)\.`)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: since you're calling Atoi on it, make the match group digits (([0-9]+)).

Ensure that kernel >= 4.4.0 or RHEL/Centos 7 kernel >= 3.10.0-366 exists before starting the thin
pool watcher. Prior versions have a bug in which reserving and releasing the metadata snapshot can
cause thin pool corruption.
@timstclair
Copy link
Contributor

Just one nit. All the regex parsing is unfortunate, but I won't block you on it. Fix the nit, squash, and I'll merge.

@ncdc
Copy link
Collaborator Author

ncdc commented Aug 4, 2016

Done

@timstclair
Copy link
Contributor

You're fast! Waiting for tests to complete.

@ncdc
Copy link
Collaborator Author

ncdc commented Aug 4, 2016

😄 I was in the middle of squashing when you posted the comment

@k8s-bot
Copy link
Collaborator

k8s-bot commented Aug 4, 2016

Jenkins GCE e2e

Build/test passed for commit 2b525ff.

@timstclair timstclair merged commit 8fa31bc into google:master Aug 4, 2016
@ncdc
Copy link
Collaborator Author

ncdc commented Aug 4, 2016

Thanks for the review + merge!

k8s-github-robot pushed a commit to kubernetes/kubernetes that referenced this pull request Aug 17, 2016
Automatic merge from submit-queue

godep: cadvisor: bump to v0.23.9

```release-note
Update cadvisor to v0.23.9 to fix a problem where attempting to gather container filesystem usage statistics could result in corrupted devicemapper thin pool storage for Docker.
```
v0.23.9 fixes an important devicemapper issue

xref google/cadvisor#1411

@ncdc @vishh @timstclair
shyamjvs pushed a commit to shyamjvs/kubernetes that referenced this pull request Dec 1, 2016
Automatic merge from submit-queue

godep: cadvisor: bump to v0.23.9

```release-note
Update cadvisor to v0.23.9 to fix a problem where attempting to gather container filesystem usage statistics could result in corrupted devicemapper thin pool storage for Docker.
```
v0.23.9 fixes an important devicemapper issue

xref google/cadvisor#1411

@ncdc @vishh @timstclair
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.

5 participants