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

(FACT-1134) Fix Facter operatingsystem resolution #1065

Merged
merged 1 commit into from
Jul 17, 2015

Conversation

MikaelSmith
Copy link

Facter 3's operatingsystem fact resolution rearranged the order release
files were searched for so that some RedHat distributions would resolve
to RedHat instead of more specific names, for example OracleLinux.

Restore original ordering with respect to searching specific
distributions before RedHat and SUSE.

@MikaelSmith
Copy link
Author

auto value = check_debian_linux(distro_id);
if (!value.empty()) {
return value;
}

// Check for specialized distributions next
return check_other_linux();

Choose a reason for hiding this comment

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

Early return?

Facter 3's operatingsystem fact resolution rearranged the order release
files were searched for so that some RedHat distributions would resolve
to RedHat instead of more specific names, for example OracleLinux.

Restore original ordering with respect to searching specific
distributions before RedHat and SUSE.
@MikaelSmith
Copy link
Author

[root@x5nhcn0p0c027pk ~]# cat /etc/oracle-release
Oracle Linux Server release 7.0
[root@x5nhcn0p0c027pk ~]# /opt/puppetlabs/bin/facter os
{
  architecture => "x86_64",
  family => "RedHat",
  hardware => "x86_64",
  name => "OracleLinux",
  release => {
    full => "7.0",
    major => "7",
    minor => "0"
  },
  selinux => {
    config_mode => "enforcing",
    current_mode => "enforcing",
    enabled => true,
    enforced => true,
    policy_version => "28"
  }
}

@MikaelSmith
Copy link
Author

Compared to Facter 2.4.4 on the same machine
{"name"=>"OracleLinux", "family"=>"RedHat", "release"=>{"major"=>"7", "minor"=>"0", "full"=>"7.0"}}

@puppetcla
Copy link

CLA signed by all contributors.

peterhuene added a commit that referenced this pull request Jul 17, 2015
@peterhuene peterhuene merged commit a150c0f into puppetlabs:stable Jul 17, 2015
@MikaelSmith MikaelSmith deleted the bug/stable/FACT-1134 branch July 20, 2015 21:49
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.

3 participants