-
Notifications
You must be signed in to change notification settings - Fork 221
cpu-partitioning: autodetect dracut hook directory #805
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
base: master
Are you sure you want to change the base?
Conversation
e91e9aa to
b8d9e74
Compare
|
EPEL-7 failure is unrelated. |
jmencak
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.
Looks good to me, only a minor concern depending what (future) dracut decides to output. It would be great if we could get some feedback in https://issues.redhat.com/browse/RHEL-119889 on whether this is the best way.
profiles/cpu-partitioning/script.sh
Outdated
| . /usr/lib/tuned/functions | ||
|
|
||
| start() { | ||
| DRACUT_VER=`dracut --version | cut -d' ' -f2 | cut -d'-' -f1` |
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.
Do we know dracut always outputs - ? E.g. 107-4.fc42? Could it also output something like 107.fc42? If so, the following should be slightly more robust:
DRACUT_VER=`dracut --version | sed -E 's|^.* ([0-9]+).*|\1|'`
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.
Thanks, it makes sense.
b8d9e74 to
e162e6c
Compare
I wanted to use some dracut variable, but it seems this path is hardcoded into dracut. |
|
LGTM |
e162e6c to
3129894
Compare
| isolated_cores_expanded=${f:cpulist_unpack:${isolated_cores}} | ||
| isolated_cpumask=${f:cpulist2hex:${isolated_cores_expanded}} | ||
| not_isolated_cores_expanded=${f:cpulist_invert:${isolated_cores_expanded}} | ||
| not_isolated_cores=${f:cpulist_pack:${not_isolated_cores_expanded}} |
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.
Do we want to add a note this is because of https://issues.redhat.com/browse/RHEL-97580 and that it should be dropped afterwards? Also, should this be in a separate PR as this has nothing to do with the dracut functionality?
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.
Although it's related to the original report - in the original initrd image there was preudev script and systemd config, both were broken - the preudev script was fixed by this PR, not the systemd config which is still broken, I agree the subject of this PR is misleading, I will probably split it to two PRs.
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.
@jmencak besides the formal side that the patch doesn't match the subject, are you OK with such change? If yes, I am going to release it as a 0-day z-stream patch downstream.
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 will probably split it to two PRs.
Leaving this up to you. I'm fine with both as long as it is clear from the commit message what the PR does.
LGTM
3129894 to
8889fbb
Compare
Wrong hook directory can make the machine unbootable: https://issues.redhat.com/browse/RHEL-119889 Also added workaround for currently non-functional systemd plugin which doesn't include the systemd config into the initrd image. Resolves: RHEL-40619 Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
8889fbb to
2145e19
Compare
Wrong hook directory can make the machine unbootable: https://issues.redhat.com/browse/RHEL-119889