Skip to content

Conversation

@yarda
Copy link
Contributor

@yarda yarda commented Oct 8, 2025

Wrong hook directory can make the machine unbootable: https://issues.redhat.com/browse/RHEL-119889

@yarda yarda force-pushed the dracut-hook-location-fix branch from e91e9aa to b8d9e74 Compare October 8, 2025 17:47
@yarda
Copy link
Contributor Author

yarda commented Oct 14, 2025

EPEL-7 failure is unrelated.

Copy link
Contributor

@jmencak jmencak left a 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.

. /usr/lib/tuned/functions

start() {
DRACUT_VER=`dracut --version | cut -d' ' -f2 | cut -d'-' -f1`
Copy link
Contributor

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|'`

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, it makes sense.

@yarda yarda force-pushed the dracut-hook-location-fix branch from b8d9e74 to e162e6c Compare October 14, 2025 18:09
@yarda
Copy link
Contributor Author

yarda commented Oct 14, 2025

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.

I wanted to use some dracut variable, but it seems this path is hardcoded into dracut.

@jmencak
Copy link
Contributor

jmencak commented Oct 15, 2025

LGTM

@yarda yarda force-pushed the dracut-hook-location-fix branch from e162e6c to 3129894 Compare October 19, 2025 22:17
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}}
Copy link
Contributor

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?

Copy link
Contributor Author

@yarda yarda Oct 20, 2025

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.

Copy link
Contributor Author

@yarda yarda Oct 20, 2025

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.

Copy link
Contributor

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

@yarda yarda force-pushed the dracut-hook-location-fix branch from 3129894 to 8889fbb Compare October 20, 2025 14:13
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>
@yarda yarda force-pushed the dracut-hook-location-fix branch from 8889fbb to 2145e19 Compare October 20, 2025 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants