Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@haircommander
Copy link
Member

What type of PR is this?

/kind feature

What this PR does / why we need it:

If InfraCtrCPUSet is configured, then there is an expectation that all commands land on certain CPUs. However, this isn't always the case. Thus, we need a way of spawning commands given a list of CPUs.

To do this, update cmdrunner to be a singleton object that stores an optional command and args to prepend to commands. Then use this singleton anytime exec.Command would be called.

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Add functionality to use taskset to spawn new commands cri-o runs. Now, if InfraCtrCPUSet is called, all newly spawned commands will be placed in the InfraCtrCPUSet (as it's expected to be set to the reserved CPU set that system commands should run on).

@openshift-ci openshift-ci bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Jan 17, 2022
@openshift-ci openshift-ci bot requested review from kolyshkin and sboeuf January 17, 2022 18:07
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 17, 2022
@codecov
Copy link

codecov bot commented Jan 17, 2022

Codecov Report

Merging #5547 (51b9a7e) into release-1.22 (f1d2c6e) will increase coverage by 0.05%.
The diff coverage is 58.53%.

@@               Coverage Diff                @@
##           release-1.22    #5547      +/-   ##
================================================
+ Coverage         43.72%   43.78%   +0.05%     
================================================
  Files               118      120       +2     
  Lines             11785    11813      +28     
================================================
+ Hits               5153     5172      +19     
- Misses             6145     6154       +9     
  Partials            487      487              

@haircommander
Copy link
Member Author

/retest

@cri-o/cri-o-maintainers 1.23 version was verified, please review and merge :)

Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 19, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 19, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haircommander, saschagrunert

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [haircommander,saschagrunert]

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

@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 19, 2022

@haircommander: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/openshift-jenkins/integration_crun_cgroupv2 51b9a7e link false /test integration_cgroupv2
ci/openshift-jenkins/e2e_crun_cgroupv2 51b9a7e link false /test e2e_cgroupv2

Full PR test history. Your PR dashboard.

Details

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.

@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit ac40287 into cri-o:release-1.22 Jan 19, 2022
@haircommander
Copy link
Member Author

/cherry-pick release-1.21

@openshift-cherrypick-robot

@haircommander: #5547 failed to apply on top of branch "release-1.21":

Applying: cmdrunner: create singleton
Applying: cmdrunner: add tests for prepended commands
Applying: config: prepend commands with taskset if InfraCtrCPUSet is configured
Using index info to reconstruct a base tree...
M	pkg/config/config.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/config/config.go
Applying: cmdrunner: update mocks and add target to makefile
Using index info to reconstruct a base tree...
M	Makefile
M	test/mocks/cmdrunner/cmdrunner.go
Falling back to patching base and 3-way merge...
Auto-merging test/mocks/cmdrunner/cmdrunner.go
CONFLICT (content): Merge conflict in test/mocks/cmdrunner/cmdrunner.go
Auto-merging Makefile
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0004 cmdrunner: update mocks and add target to makefile
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

Details

In response to this:

/cherry-pick release-1.21

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.

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. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/feature Categorizes issue or PR as related to a new feature. lgtm 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants