-
Notifications
You must be signed in to change notification settings - Fork 453
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
SUSE: Use /etc/os-release if present for all platform attributes #1140
Conversation
lib/ohai/plugins/linux/platform.rb
Outdated
# use os-release (present on all modern linux distros) or use old *-release files as fallback | ||
# platform_family also does not need to be hardcoded anymore | ||
if File.exist?("/etc/os-release") | ||
platform_family os_release_info["ID_LIKE"] |
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.
platform_family
is special - and a huge amount of chef behaviour stems from it. I think we'd still need to run determine_platform_family
even in the case where we have /etc/os-release
.
I think this is the correct change in general but I'm rather nervous about possible behaviour change due to |
…lease files as fallback. os-release will only be used if no other *-release file is present. We have to do this for compatibility reasons, or older OS releases might get different "platform" or "platform_version" attributes (e.g. SLES12, RHEL7). platform_family also does not need to be hardcoded anymore. This would be the correct way, but we stick with "determine_platform_family" for compatibility reasons.
…lease files as fallback. os-release will only be used if no other *-release file is present. We have to do this for compatibility reasons, or older OS releases might get different "platform" or "platform_version" attributes (e.g. SLES12, RHEL7). platform_family also does not need to be hardcoded anymore. This would be the correct way, but we stick with "determine_platform_family" for compatibility reasons.
@thommay I think you're right. Use os-release (present on all modern linux distros) BUT use old *-release files as fallback. os-release will only be used if no other *-release file is present. platform_family also does not need to be hardcoded anymore. |
Signed-off-by: Eike Waldt <waldt@b1-systems.de>
@yeoldegrove needs one more reviewer and then it's good to go. |
Thanks for putting this together and reworking it for us @yeoldegrove |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
Use /etc/os-release (if present) for all platform attributes.
Issues Resolved
Newer linux distributions all have this file, but might not have the legacy *-release fles anmore.
This is for example true for the upcoming SUSE SLES 15.
#1054 This is also related (SLES12)
Check List