-
Notifications
You must be signed in to change notification settings - Fork 15
Add lscpu output to the build job #123
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
Conversation
…parison to a reference
| echo "bot/build.sh: EESSI_ACCELERATOR_TARGET_OVERRIDE='${EESSI_ACCELERATOR_TARGET_OVERRIDE}'" | ||
|
|
||
| # check if CPU architecture of the build host matches our expectation | ||
| lscpu_flags_line=$(lscpu | grep "Flags:") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would grab the full lscpu output, in a separate file?
Other fields (like Model name), and also additional info like host OS (/etc/os-release and /etc/redhat-release) would be relevant to grab
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree. First step could just be to write output of lscpu to _bot_job{job_id}.lscpu
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, we could definitely do both - I'd be happy if a file just gets dumped in the workdir of the bot like Thomas proposes. But to compare the flags against a reference, you definitely want the list of flags extracted separately, without any context. And, as stated in the comment below this code, you can quite easily compare between (sorted) bash arrays to spot any difference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In other words: I think there's two goals here
- Better logging, in which case we want to include as much info as possible (full lscpu and os-release output)
- Runtime checking of the supported Flags, and producing a hard abort if it is not as expected
I've implemented the 2nd, you want the first, I propose we do both ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the hard abort. It's anticipated yes, but not yet there, right.
Lets try to move quickly. Log the output of lscpu + os release into a file or two, keep grabbing the flags and print them to the job output. Putting this into production quickly we already gather information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the hard abort. It's anticipated yes, but not yet there, right.
You're right, it's not, this was just preparation, only logging the Flags and not doing anything with it yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added, see above.
FYI: I would like to keep what I have in terms of bash array. Once we have a reference, it'll be a 1 line change (loading the reference) + uncommenting the code below to implement the hard fail. No need to reinvent that later...
trz42
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm - lets get this integrated, then iterate to add missing functionality.
Also, add some suggestion for future comparison to a reference (in comments).
This is initial work in order to check that the build node we get allocated has the expected set of instruction flags supported.