-
Notifications
You must be signed in to change notification settings - Fork 40.3k
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
Use Docker API Version instead of docker version #44068
Use Docker API Version instead of docker version #44068
Conversation
Hi @mkumatag. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
testlog @ https://gist.github.com/mkumatag/6eb2730fbe9f1c142b4426067689e4d7 Tested -
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, just a few Minor nits.
@@ -1095,7 +1095,7 @@ func (dm *DockerManager) pluginDisablesDockerNetworking() bool { | |||
|
|||
// newDockerVersion returns a semantically versioned docker version value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should read "newDockerVersion returns a generic version value (not semantic)"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, might want to add a newDockerAPIVersion() API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see anyone is using this function at all! except docker_manager_test.go. If no objection from anyone, I would like to remove this function completely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's used just below on line number 1128 other than that yeah it doesn't seem to be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are right! it is used in Version function, I'll leave this function as is and lemme modify the description. We will add newDockerAPIVersion when somebody really need it!
buf := new(syscall.Stat_t) | ||
err := syscall.Stat(mount.Source, buf) | ||
if err != nil { | ||
glog.Warningf("stat failed on %s with error: %s", mount.Source, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on mount source %s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this is a godep stuff, we can submit a PR in cadvisor to get this message fixed.!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah vendor.. :-)
if buf.Mode&syscall.S_IFMT == syscall.S_IFBLK { | ||
err := syscall.Stat(mount.Mountpoint, buf) | ||
if err != nil { | ||
glog.Warningf("stat failed on %s with error: %s", mount.Mountpoint, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on mount point %s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this is a godep stuff, we can submit a PR in cadvisor to get this message fixed.!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about updating the test cases in docker_manager_test.go to cover the new date based versions? Specifically adding one that is not semver compatible like 17.01.03
@k8s-bot ok to test |
I suspect some tests failures in docker_manager_test.go and few more, will work on them and update this PR.. |
I'd suggest leave docker_manager and its unit tests alone. They are going away soon (see #43884). |
In that case lemme rollback the changes on docker_manager file |
d768b70
to
63ace7b
Compare
@yujuhong rollbacked the changes from docker_manager and all the checks passed.! can you PTAL at this PR? |
if err != nil { | ||
return nil, err | ||
} | ||
sysFs := sysfs.NewRealSysFs() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why removing the error check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's because in recent version there is change in NewRealSysFS function, check this out for more information - google/cadvisor#1578
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotta love empty structs :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see. I reviewed only the second commit, hence the question.
The second commit LGTM. I think you'll need to add a release note since this bumps the cadvisor version. @dashpole, do you want to look at the cadvisor version bump? |
ping @dashpole |
The first commit LGTM! |
Thanks! @mksalawa need to rebase and add a release note. |
63ace7b
to
93556f8
Compare
@mkumatag any chance for the rebase? |
22a0c14
to
f806387
Compare
@soltysh done. Can you please help me merging this PR? |
@mkumatag make sure the CI is green first, I'll take a look at this PR later today or tomorrow at latest and make sure to have it merge if it's ok |
@mikedanese @ixdy I see some failures for bazel-test but hack/verify passes locally. Any idea what is wrong here? btw: I'm using go1.8.1 version |
@k8s-bot bazel test this |
looks like the error is in a BUILD file. did you run ./hack/update-bazel? |
Yes, I did.. the file got updated result of that script run.
|
@mkumatag not sure what is going on but you need to revert your changes to vendor/BUILD. Looks like a weird rebase. Can you do this: # make sure your master is current
$ git checkout k8s_add_apiversion
$ git checkout master -- vendor/BUILD
$ ./hack/update-bazel.sh |
If that doesn't work, ping me and I'll push a fix to your branch. |
Thanks @mikedanese it worked.. |
looks like another case fixed by mikedanese/gazel#38. we should probably update gazel. |
/lgtm |
Ping a couple of folks for approval: @dchen1107 @thockin @smarterclayton |
/lgtm and |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dchen1107, mkumatag, yujuhong
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
@k8s-bot verify test this |
Automatic merge from submit-queue |
What this PR does / why we need it:
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #Fixes #42492
Special notes for your reviewer:
Release note:
Update cadvisor to latest head to use docker APIversion exposed by cadvisor