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

cgroup: fixed cpu,cpuacct controller order incompatibility. #45255

Merged
merged 1 commit into from Jul 10, 2023

Conversation

pingandb
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #44790

Problem Summary:

What is changed and how it works?

Fixed the issue that getCgroupCPU() v1 logic doesn't work with CPU controller that appears like 'cpuacct,cpu' in /proc/self/cgroup and /proc/self/mountinfo. Added controllerMatch() to split the controllers and do the matching one by one instead of simply comparing them as a whole.

Check List

Tests

  • Unit test: the modified cgroup_mock_test

Side effects

None

Documentation

None

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

Fix the issue that getCgroupCPU() v1 logic doesn't work with CPU controller that appears like 'cpuacct,cpu' in /proc/self/cgroup and /proc/self/mountinfo.

@sre-bot
Copy link
Contributor

sre-bot commented Jul 10, 2023

CLA assistant check
All committers have signed the CLA.

@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. needs-ok-to-test labels Jul 10, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Jul 10, 2023

Hi @pingandb. Thanks for your PR.

I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with /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.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@tiprow
Copy link

tiprow bot commented Jul 10, 2023

Hi @pingandb. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

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.

@pingandb pingandb changed the title [ISSUE#44790] fixed cpu,cpuacct controller order incompatibility. [ISSUE#44790] cgroup: fixed cpu,cpuacct controller order incompatibility. Jul 10, 2023
@hawkingrei hawkingrei changed the title [ISSUE#44790] cgroup: fixed cpu,cpuacct controller order incompatibility. cgroup: fixed cpu,cpuacct controller order incompatibility. Jul 10, 2023
@hawkingrei
Copy link
Member

/

CLA assistant check Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
zhaopei646 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@pingandb Please sign the CLA.

@hawkingrei hawkingrei requested a review from YangKeao July 10, 2023 04:53
@hawkingrei
Copy link
Member

/ok-to-test

@hawkingrei
Copy link
Member

/test tiprow_fast_test

@ti-chi-bot
Copy link

ti-chi-bot bot commented Jul 10, 2023

@hawkingrei: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test build
  • /test canary-scan-security
  • /test check-dev
  • /test check-dev2
  • /test mysql-test
  • /test pingcap/tidb/canary_ghpr_unit_test
  • /test pull-br-integration-test
  • /test pull-e2e-test
  • /test pull-integration-copr-test
  • /test pull-integration-jdbc-test
  • /test pull-integration-mysql-test
  • /test unit-test

Use /test all to run the following jobs that were automatically triggered:

  • pingcap/tidb/ghpr_build
  • pingcap/tidb/ghpr_check
  • pingcap/tidb/ghpr_check2
  • pingcap/tidb/ghpr_mysql_test
  • pingcap/tidb/ghpr_unit_test

In response to this:

/test tiprow_fast_test

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.

Copy link
Member

@YangKeao YangKeao left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot bot added the lgtm label Jul 10, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Jul 10, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hawkingrei, YangKeao

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:
  • OWNERS [YangKeao,hawkingrei]

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

@ti-chi-bot
Copy link

ti-chi-bot bot commented Jul 10, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-07-10 03:56:34.086885367 +0000 UTC m=+304285.857224079: ☑️ agreed by hawkingrei.
  • 2023-07-10 06:05:34.039868611 +0000 UTC m=+312025.810207324: ☑️ agreed by YangKeao.

@ti-chi-bot ti-chi-bot bot merged commit 4a79845 into pingcap:master Jul 10, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test release-note size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
4 participants