Move "detect host CPUs" into mantle#1287
Merged
openshift-merge-robot merged 1 commit intocoreos:masterfrom Apr 1, 2020
Merged
Conversation
7f9c15c to
ba452d5
Compare
dustymabe
reviewed
Mar 31, 2020
Member
dustymabe
left a comment
There was a problem hiding this comment.
mostly LGTM - a few comments
Today if you type `cosa run` you get the host CPUs, but all invocations of `kola` (including `kola spawn` to log in via SSH, as well as all tests) use exactly 1 processor. This doesn't make sense - it's just a historical artifact. This continues the move of cosa qemu logic into mantle so we can use it for tests. For now though, `kola qemuexec` learns a `-C` argument to guess the number of CPUs. With a few more patches `cmd-run` will turn into just `exec kola qemuexec [a few args]`.
ba452d5 to
b80bfa0
Compare
Member
|
/lgtm Nice work @cgwalters |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cgwalters, dustymabe The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Member
Author
|
/test sanity |
jlebon
added a commit
to jlebon/rpm-ostree
that referenced
this pull request
Jan 21, 2021
Otherwise, it defaults to `_SC_NPROCESSORS_ONLN` (via `%make_build` ->
`%_smp_mflags` -> `%_smp_build_ncpus` -> `%{getncpus}` ->
https://github.com/rpm-software-management/rpm/blob/48c0f28834eb377a54f27ee0b6950af7e6d537b8/rpmio/macro.c#L583).
And that's going to be wrong in Kubernetes because we're constrained via
cgroups.
The `%_smp_build_ncpus` macro allows overriding this logic via
`RPM_BUILD_NCPUS`.
See: coreos/coreos-ci#23
See: coreos/coreos-assembler#1287
jlebon
added a commit
to jlebon/rpm-ostree
that referenced
this pull request
Jan 21, 2021
Otherwise, it defaults to `_SC_NPROCESSORS_ONLN` (via `%make_build` ->
`%_smp_mflags` -> `%_smp_build_ncpus` -> `%{getncpus}` ->
https://github.com/rpm-software-management/rpm/blob/48c0f28834eb377a54f27ee0b6950af7e6d537b8/rpmio/macro.c#L583).
And that's going to be wrong in Kubernetes because we're constrained via
cgroups.
The `%_smp_build_ncpus` macro allows overriding this logic via
`RPM_BUILD_NCPUS`.
See: coreos/coreos-ci#23
See: coreos/coreos-assembler#632
See: coreos/coreos-assembler#1287
openshift-merge-robot
pushed a commit
to coreos/rpm-ostree
that referenced
this pull request
Jan 21, 2021
Otherwise, it defaults to `_SC_NPROCESSORS_ONLN` (via `%make_build` ->
`%_smp_mflags` -> `%_smp_build_ncpus` -> `%{getncpus}` ->
https://github.com/rpm-software-management/rpm/blob/48c0f28834eb377a54f27ee0b6950af7e6d537b8/rpmio/macro.c#L583).
And that's going to be wrong in Kubernetes because we're constrained via
cgroups.
The `%_smp_build_ncpus` macro allows overriding this logic via
`RPM_BUILD_NCPUS`.
See: coreos/coreos-ci#23
See: coreos/coreos-assembler#632
See: coreos/coreos-assembler#1287
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Today if you type
cosa runyou get the host CPUs, butall invocations of
kola(includingkola spawnto log invia SSH, as well as all tests) use exactly 1 processor.
This doesn't make sense - it's just a historical artifact.
This continues the move of cosa qemu logic into mantle so
we can use it for tests. For now though,
kola qemuexeclearns a-Cargument to guess the number of CPUs.Yes, the technical debt reduction from the mantle/cosa merger
is STILL GOING!
With a few more patches
cmd-runwill turn into justexec kola qemuexec [a few args].