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

fix function NodeAllocatableRoot #88970

Merged

Conversation

mysunshine92
Copy link
Contributor

@mysunshine92 mysunshine92 commented Mar 9, 2020

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:

/kind bug
/kind cleanup

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #88969

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

if we set parameter cgroupPerQos=false and cgroupRoot=/docker,this function will retrun  nodeAllocatableRoot=/docker/kubepods, it is not right, the correct return should be /docker.
cm.NodeAllocatableRoot(s.CgroupRoot, s.CgroupDriver)

kubeDeps.CAdvisorInterface, err = cadvisor.New(imageFsInfoProvider, s.RootDirectory, cgroupRoots, cadvisor.UsingLegacyCadvisorStats(s.ContainerRuntime, s.RemoteRuntimeEndpoint))
the above funtion,as we use cgroupRoots to create cadvisor interface,the wrong parameter cgroupRoots will lead eviction manager not  to collect metric from /docker, then kubelet frequently print those error:
E0303 17:25:03.436781 63839 summary_sys_containers.go:47] Failed to get system container stats for "/docker": failed to get cgroup stats for "/docker": failed to get container info for "/docker": unknown container "/docker"
E0303 17:25:03.436809 63839 helpers.go:680] eviction manager: failed to construct signal: "allocatableMemory.available" error: system container "pods" not found in metrics

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Mar 9, 2020
@k8s-ci-robot k8s-ci-robot added area/kubelet sig/node Categorizes an issue or PR as relevant to SIG Node. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Mar 9, 2020
Copy link
Contributor

@mattjmcnaughton mattjmcnaughton left a comment

Choose a reason for hiding this comment

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

Thanks for your pr :)

Could you please include, either in your commit message or pr description (or ideally both), a description of the fix that you're making? Having the description makes it a lot easier for a reviewer the pr makes the intended change :)

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Mar 25, 2020
@mysunshine92
Copy link
Contributor Author

ping @dashpole

@mysunshine92
Copy link
Contributor Author

/test pull-kubernetes-e2e-gce

func NodeAllocatableRoot(cgroupRoot, cgroupDriver string) string {
root := ParseCgroupfsToCgroupName(cgroupRoot)
nodeAllocatableRoot := NewCgroupName(root, defaultNodeAllocatableCgroupName)
func NodeAllocatableRoot(cgroupRoot string, cgroupsPerQOS bool, cgroupDriver string) string {
Copy link
Contributor

Choose a reason for hiding this comment

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

you will have to change this function in other builds as well.

@dashpole
Copy link
Contributor

Good find. This lgtm after the cross-builds are fixed.

@mysunshine92
Copy link
Contributor Author

mysunshine92 commented Mar 26, 2020

Good find. This lgtm after the cross-builds are fixed.

I can not understand "cross-builds are fixed.", would you like to explain it for me ?
thanks @dashpole

@mysunshine92
Copy link
Contributor Author

/test pull-kubernetes-e2e-gce-100-performance

@mysunshine92
Copy link
Contributor Author

ping @dashpole

@mysunshine92
Copy link
Contributor Author

ping @mattjmcnaughton

@wangyx1992
Copy link
Contributor

/test pull-kubernetes-typecheck

@mysunshine92
Copy link
Contributor Author

ping @mattjmcnaughton ,please add to lgtm and approved,thanks

@dashpole
Copy link
Contributor

The type-check test is essentially a lightweight cross-build. I.E. make sure this builds for "other" systems.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 26, 2020
@mattjmcnaughton
Copy link
Contributor

ping @mattjmcnaughton ,please add to lgtm and approved,thanks

You need sign off from one of the owners, which I'm not :)
/assign @yujuhong

@dashpole
Copy link
Contributor

/priority important-soon

@k8s-ci-robot k8s-ci-robot added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Mar 27, 2020
@mysunshine92
Copy link
Contributor Author

The type-check test is essentially a lightweight cross-build. I.E. make sure this builds for "other" systems.

thanks for your explanation, i have modified it.

@mysunshine92
Copy link
Contributor Author

ping @yujuhong ,please add approved label,thanks

@mysunshine92
Copy link
Contributor Author

ping @yujuhong

@mysunshine92
Copy link
Contributor Author

ping @yujuhong @Random-Liu @vishh ,please add approved label,thanks

@mysunshine92
Copy link
Contributor Author

ping @yujuhong @Random-Liu @vishh ,please add approved label,thanks

@yujuhong
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dashpole, mysunshine92, yujuhong

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 14, 2020
@k8s-ci-robot k8s-ci-robot merged commit 105c0c6 into kubernetes:master Apr 14, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.19 milestone Apr 14, 2020
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. area/kubelet cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/node Categorizes an issue or PR as relevant to SIG Node. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
6 participants