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

Import 'cpuset' from kubernetes repository in kubernetes/utils #267

Merged
merged 45 commits into from
Mar 13, 2023

Conversation

iancoolidge
Copy link
Contributor

/kind feature

Fixes #266

See also kubernetes/kubernetes#112899 for background and source repository details

Release note:

Maintain 'cpuset' library in kubernetes/utils. This library is useful for parsing and stringifying cpusets, and doing set operations on them.

ConnorDoyle and others added 30 commits August 22, 2017 11:42
This reverts commit 8d2832021ad049eee6f184315a10f3abe18036f9.
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
Signed-off-by: Ted Yu <yute@vmware.com>
Obtain unsorted slice in cpuAccumulator#freeCores
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
- ToSliceInt64 returns sorted slice of cores IDs in int64 format
- ToSliceNoSortInt64 returns slice of cores IDs in int64 format

Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
Add e2e tests for the new GetAllocatableResources API.
The tests are added in the `podresources_test` suite
created previously in this series.

Signed-off-by: Francesco Romani <fromani@redhat.com>
Migrate remaining pkg/kubelet/cm/ top level files to structured logging
The cpuset.Parse function missed a couple bad input cases, specifically
"1--3" and "10-6".  These were silently ignored when they should instead
be flagged as invalid.

This now catches these cases and expands the unit tests for cpuset to
cover them (and other negative test cases as well).

Signed-off-by: Jim Ramsay <jramsay@redhat.com>
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
Signed-off-by: chymy <chang.min1@zte.com.cn>
@iancoolidge iancoolidge requested review from cici37 and SergeyKanzhelev and removed request for SergeyKanzhelev and cici37 March 2, 2023 20:09
@klueska
Copy link

klueska commented Mar 3, 2023

This code was pulled out of the CPUManager in the kubelet (which I am one of the maintainers of). In general, the change looks good, just one small comment about the OWNERS file. Otherwise:

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 3, 2023
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 3, 2023
@iancoolidge
Copy link
Contributor Author

This code was pulled out of the CPUManager in the kubelet (which I am one of the maintainers of). In general, the change looks good, just one small comment about the OWNERS file. Otherwise:

/lgtm

Done

Copy link
Member

@SergeyKanzhelev SergeyKanzhelev left a comment

Choose a reason for hiding this comment

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

/lgtm

besides the list of approvers code looks good. Thank you for addressing all comments

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 3, 2023
* Note that this came from kubernetes repository
* Remove emeritus owners
* Add klueska, dchen1107, ffromani, klueska, SergeyKanzhelev to owners
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 3, 2023
Copy link
Member

@SergeyKanzhelev SergeyKanzhelev left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 3, 2023
@bart0sh bart0sh moved this from Needs Reviewer to Needs Approver in SIG Node PR Triage Mar 10, 2023
Copy link
Member

@thockin thockin left a comment

Choose a reason for hiding this comment

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

Thanks!

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: iancoolidge, klueska, SergeyKanzhelev, thockin

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 Mar 13, 2023
@k8s-ci-robot k8s-ci-robot merged commit 38a27ef into kubernetes:master Mar 13, 2023
SIG Node PR Triage automation moved this from Needs Approver to Done Mar 13, 2023
rayowang pushed a commit to rayowang/kubernetes that referenced this pull request Feb 9, 2024
Feedback from kubernetes/utils#267 and related
reviews.

* Equality when insertion order is different
* UnsortedList contents
* Not-Subset cases
* Clone coverage
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. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/node Categorizes an issue or PR as relevant to SIG Node. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Maintain kubelet 'pkg/kubelet/cm/cpuset' here