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

CA-405404: Fix path to dracut #6250

Merged
merged 1 commit into from
Jan 27, 2025
Merged

Conversation

alexbrett
Copy link
Contributor

On all platforms tested the canonical location for dracut is /usr/bin/dracut. Older platforms symlink to it from /usr/sbin/dracut, whilst newer ones do not, thus on these platforms xapi is unable to find dracut and fails to start.

Adjust the path to the canonical location to ensure it operates correctly on all platforms.

Also adjust a reference in network_utils.ml (whilst newer platforms also seem to have the symlink from /sbin/dracut, it would seem to make sense to point to the canonical location regardless).

On all platforms tested the canonical location for dracut is `/usr/bin/dracut`.
Older platforms symlink to it from `/usr/sbin/dracut`, whilst newer ones do not,
thus on these platforms xapi is unable to find dracut and fails to start.

Adjust the path to the canonical location to ensure it operates correctly on all
platforms.

Also adjust a reference in network_utils.ml (whilst newer platforms also seem to
have the symlink from `/sbin/dracut`, it would seem to make sense to point to
the canonical location regardless).

Signed-off-by: Alex Brett <[email protected]>
@freddy77
Copy link
Collaborator

Question: Do we really need full path? Or PATH environment is enough?

@edwintorok
Copy link
Contributor

Question: Do we really need full path? Or PATH environment is enough?

I think the one in Xapi_globs (if passed to configure2) would search PATH. Not sure about the one in network_utils.
Although it is better to be explicit and use the full path, because I think PATH is different when started from systemd, and when started from the command-line, which could cause confusion during debugging (if one of them finds it and the other one doesn't).

@robhoes robhoes added this pull request to the merge queue Jan 27, 2025
Merged via the queue into xapi-project:master with commit bc62e4c Jan 27, 2025
15 checks passed
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.

6 participants