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

tools/snap: simplify nproc #4533

Merged
merged 1 commit into from
Jul 7, 2022
Merged

Conversation

bookinabox
Copy link

Replaces calls of nproc with nproc with

nproc ${CI: --ignore 1}

to run nproc with one less processing unit than the maximum to prevent
DOS-ing the local machine.

If process is being run in a container (determined via whether $CI is
null), all processing units avaliable will be used.

Fixes #3967

Signed-off-by: Derek Lee [email protected]

@bookinabox bookinabox requested a review from a team as a code owner June 24, 2022 17:17
@katacontainersbot katacontainersbot added the size/small Small and simple task label Jun 24, 2022
Copy link
Member

@bergwolf bergwolf left a comment

Choose a reason for hiding this comment

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

Sounds reasonable. Thanks!

@bergwolf
Copy link
Member

bergwolf commented Jul 5, 2022

/test

@BbolroC
Copy link
Member

BbolroC commented Jul 5, 2022

Please DO care about the result for s390x. Thanks. (updated)

@BbolroC
Copy link
Member

BbolroC commented Jul 5, 2022

I found that this change breaks a CI job for s390x, which has the connection to the slave instance lost during the test. I tried the test 4 times over 3 different machines, but no success and the same failures. I have just confirmed that this does not happen with the main branch. Please see the log: http://jenkins.katacontainers.io/job/kata-containers-2.0-ubuntu-s390x-PR/1963/

Question: I was even not able to ssh into the slave instance after the failure. Any guess? ^^

Replaces calls of nproc	with nproc with

nproc ${CI: --ignore 1}

to run nproc with one less processing unit than the maximum to prevent
DOS-ing the local machine.

If process is being run in a container (determined via whether $CI is
null), all processing units avaliable will be used.

Fixes kata-containers#3967

Signed-off-by: Derek Lee <[email protected]>
@bookinabox
Copy link
Author

Not too familiar with how most things work still, but I did notice problem in my code after looking at it again. I left an extra $() in the snapcraft.yaml. I fixed that, so hopefully it'll work.

I don't think I'm able to re-run the jenkins job. Is there a better way for me to test by myself?

@liubin
Copy link
Member

liubin commented Jul 7, 2022

/test

@liubin
Copy link
Member

liubin commented Jul 7, 2022

/test-arm

@liubin liubin merged commit bee7915 into kata-containers:main Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/small Small and simple task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simplify nproc calls
5 participants