Skip to content

Fix for SUSE Expanded Support detection#49538

Merged
rallytime merged 1 commit into
saltstack:developfrom
brejoc:develop-fix-for-wrong-os-grain-in-suse-es
Sep 7, 2018
Merged

Fix for SUSE Expanded Support detection#49538
rallytime merged 1 commit into
saltstack:developfrom
brejoc:develop-fix-for-wrong-os-grain-in-suse-es

Conversation

@brejoc
Copy link
Copy Markdown
Contributor

@brejoc brejoc commented Sep 6, 2018

What does this PR do?

A SUSE ES installation has both, the centos-release and redhat-release
file. Since os_data() only used the centos-release file to detect a
CentOS installation, this lead to SUSE ES being detected as CentOS.

This change also adds a check for redhat-release and then marks the
lsb_distrib_id as RedHat.

Previous Behavior

$ salt-call --local grains.get os
local:
    CentOS

New Behavior

$ salt-call --local grains.get os
local:
    RedHat

Tests written?

No

Commits signed with GPG?

Yes

Comment thread salt/grains/core.py Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should be salt.utils.files.fopen() in develop now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for catching this. Fixed it and squashed the commits.

A SUSE ES installation has both, the centos-release and redhat-release
file. Since os_data only used the centos-release file to detect a
CentOS installation, this lead to SUSE ES being detected as CentOS.

This change also adds a check for redhat-release and then marks the
'lsb_distrib_id' as RedHat.
@rallytime rallytime merged commit 7d5637c into saltstack:develop Sep 7, 2018
alexey-zhukovin pushed a commit to alexey-zhukovin/salt that referenced this pull request May 8, 2020
@alexey-zhukovin alexey-zhukovin added the has master-port port to master has been created label May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

has master-port port to master has been created

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants