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

Use Docker API Version instead of docker version #44068

Merged
merged 3 commits into from
May 4, 2017

Conversation

mkumatag
Copy link
Member

@mkumatag mkumatag commented Apr 5, 2017

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

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 5, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@k8s-ci-robot
Copy link
Contributor

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 @k8s-bot ok to test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

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.

@k8s-github-robot k8s-github-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. release-note-label-needed labels Apr 5, 2017
@mkumatag
Copy link
Member Author

mkumatag commented Apr 5, 2017

/cc @mikebrow @yujuhong @derekwaynecarr

@mkumatag
Copy link
Member Author

mkumatag commented Apr 5, 2017

testlog @ https://gist.github.com/mkumatag/6eb2730fbe9f1c142b4426067689e4d7

Tested -

  • No errors in kubelet
  • Deployed nginx pod, running fine without any errors.

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.

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
Copy link
Member

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)"

Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member Author

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)
Copy link
Member

Choose a reason for hiding this comment

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

on mount source %s

Copy link
Member Author

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.!

Copy link
Member

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)
Copy link
Member

Choose a reason for hiding this comment

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

on mount point %s

Copy link
Member Author

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.!

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.

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

@grodrigues3
Copy link
Contributor

@k8s-bot ok to test

@mkumatag
Copy link
Member Author

mkumatag commented Apr 5, 2017

I suspect some tests failures in docker_manager_test.go and few more, will work on them and update this PR..

@yujuhong
Copy link
Contributor

yujuhong commented Apr 5, 2017

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).

@mkumatag
Copy link
Member Author

mkumatag commented Apr 5, 2017

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

@mkumatag
Copy link
Member Author

mkumatag commented Apr 6, 2017

@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()
Copy link
Contributor

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?

Copy link
Member Author

@mkumatag mkumatag Apr 6, 2017

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

Copy link
Member

Choose a reason for hiding this comment

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

Gotta love empty structs :-)

Copy link
Contributor

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.

@yujuhong yujuhong added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-label-needed labels Apr 6, 2017
@yujuhong yujuhong self-assigned this Apr 6, 2017
@yujuhong
Copy link
Contributor

yujuhong commented Apr 6, 2017

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?

@mkumatag
Copy link
Member Author

ping @dashpole

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 11, 2017
@dashpole
Copy link
Contributor

The first commit LGTM!

@yujuhong
Copy link
Contributor

The first commit LGTM!

Thanks!

@mksalawa need to rebase and add a release note.

@yujuhong yujuhong assigned dashpole and unassigned timstclair Apr 11, 2017
@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 12, 2017
@soltysh
Copy link
Contributor

soltysh commented Apr 27, 2017

@mkumatag any chance for the rebase?

@k8s-github-robot k8s-github-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Apr 27, 2017
@mkumatag
Copy link
Member Author

@soltysh done. Can you please help me merging this PR?

@soltysh
Copy link
Contributor

soltysh commented Apr 27, 2017

@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

@mkumatag
Copy link
Member Author

@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

@mkumatag
Copy link
Member Author

@k8s-bot bazel test this

@dashpole
Copy link
Contributor

looks like the error is in a BUILD file. did you run ./hack/update-bazel?

@mkumatag
Copy link
Member Author

Yes, I did.. the file got updated result of that script run.

looks like the error is in a BUILD file. did you run ./hack/update-bazel?

@mikedanese
Copy link
Member

@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

@mikedanese
Copy link
Member

If that doesn't work, ping me and I'll push a fix to your branch.

@mkumatag
Copy link
Member Author

Thanks @mikedanese it worked..

@ixdy
Copy link
Member

ixdy commented Apr 27, 2017

looks like another case fixed by mikedanese/gazel#38. we should probably update gazel.

@yujuhong
Copy link
Contributor

yujuhong commented May 1, 2017

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 1, 2017
@yujuhong
Copy link
Contributor

yujuhong commented May 1, 2017

Ping a couple of folks for approval: @dchen1107 @thockin @smarterclayton

@dchen1107
Copy link
Member

/lgtm

and
/approve

@k8s-github-robot
Copy link

[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 /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 3, 2017
@mkumatag
Copy link
Member Author

mkumatag commented May 4, 2017

@k8s-bot verify test this

@k8s-github-robot
Copy link

Automatic merge from submit-queue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kublet.log reports error with latest Docker version