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

Get Windows network stats directly for Containerd #105744

Merged

Conversation

jsturtevant
Copy link
Contributor

@jsturtevant jsturtevant commented Oct 18, 2021

What type of PR is this?

/kind bug
/kind cleanup

What this PR does / why we need it:

This ensures we have Network stats for containerd on Windows by querying for the stats were directly. By going to network component directly we also minimize the calls the to listing containers (#104285)

Which issue(s) this PR fixes:

Fixes #104286 #104285

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Add support for Windows Network stats in Containerd

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


@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. 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. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Oct 18, 2021
@k8s-ci-robot k8s-ci-robot added sig/node Categorizes an issue or PR as relevant to SIG Node. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 18, 2021
@ehashman ehashman added this to Triage in SIG Node PR Triage Oct 19, 2021
@wgahnagl
Copy link
Contributor

wgahnagl commented Oct 20, 2021

/triage accepted

@k8s-ci-robot k8s-ci-robot added the triage/accepted Indicates an issue or PR is ready to be actively worked on. label Oct 20, 2021
@k8s-ci-robot
Copy link
Contributor

@wgahnagl: The label(s) priority/longterm cannot be applied, because the repository doesn't have them.

In response to this:

/triage accepted
/priority longterm

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.

@k8s-ci-robot k8s-ci-robot removed the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Oct 20, 2021
@wgahnagl
Copy link
Contributor

/priority important-longterm

@k8s-ci-robot k8s-ci-robot added priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Oct 20, 2021
@wgahnagl wgahnagl moved this from Triage to Needs Reviewer in SIG Node PR Triage Oct 20, 2021
@marosset
Copy link
Contributor

/sig windows

@k8s-ci-robot k8s-ci-robot added the sig/windows Categorizes an issue or PR as relevant to SIG Windows. label Oct 21, 2021
@marosset
Copy link
Contributor

/milestone v1.23

@k8s-ci-robot k8s-ci-robot added this to the v1.23 milestone Oct 21, 2021
@marosset marosset added this to In Progress (v1.23) in SIG-Windows Oct 21, 2021
@jsturtevant jsturtevant force-pushed the windows-containerd-networkstats branch from 018aa96 to adbecd4 Compare October 29, 2021 20:06
@k8s-ci-robot k8s-ci-robot added area/test sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Oct 29, 2021
Copy link
Contributor

@dashpole dashpole left a comment

Choose a reason for hiding this comment

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

/approve
/hold
Adding hold to give you a chance to address comments. Remove when you are satisfied

type windowsNetworkStatsProvider interface {
HNSListEndpointRequest() ([]hcsshim.HNSEndpoint, error)
GetHNSEndpointStats(endpointName string) (*hcsshim.HNSEndpointStats, error)
Now() time.Time
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure Now() belongs in the interface. Adding a k8s.io/utils/clock.Clock to the cri stats provider seems better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

makes sense, i've made this adjustment

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 10, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dashpole, jsturtevant

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 Nov 10, 2021
@SergeyKanzhelev
Copy link
Member

/cc @bobbypage @qiutongs

FYI

@jsturtevant jsturtevant force-pushed the windows-containerd-networkstats branch from c421931 to b9672c3 Compare November 10, 2021 19:49
@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Nov 10, 2021
@jsturtevant jsturtevant force-pushed the windows-containerd-networkstats branch from b9672c3 to f225a9d Compare November 10, 2021 19:51
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 10, 2021
@jsturtevant jsturtevant force-pushed the windows-containerd-networkstats branch from f225a9d to ec0c4cf Compare November 10, 2021 20:35
@jsturtevant jsturtevant force-pushed the windows-containerd-networkstats branch from ec0c4cf to ab2e58c Compare November 10, 2021 20:44
@ehashman
Copy link
Member

/hold cancel
@dashpole's comment is addressed

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 12, 2021
@marosset
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 12, 2021
@k8s-ci-robot k8s-ci-robot merged commit 1f6aa87 into kubernetes:master Nov 12, 2021
SIG-Windows automation moved this from In Review (v1.23) to Done (v1.23) Nov 12, 2021
SIG Node CI/Test Board automation moved this from Archive-it to Done Nov 12, 2021
SIG Node PR Triage automation moved this from Needs Reviewer to Done Nov 12, 2021
@bobbypage
Copy link
Member

Thank you @jsturtevant for adding this. I wanted to point out the KEP that me and @haircommander are working on to move all of the stats from pod / container stats from the kubelet to the underlying container runtime (this includes network stats). So long term, it would be great to get these stats implemented directly in containerd CRI API (and get support on windows!). Happy to chat more about this offline, will ping you on slack :)

@jsturtevant
Copy link
Contributor Author

yup been following the effort! lets chat in slack

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 area/test 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-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. 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. sig/testing Categorizes an issue or PR as relevant to SIG Testing. sig/windows Categorizes an issue or PR as relevant to SIG Windows. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Archived in project
SIG-Windows
  
Done (v1.23)
Development

Successfully merging this pull request may close these issues.

containerd on windows doesn't return network stats
9 participants