Uploaded image for project: 'Facter'
  1. Facter
  2. FACT-1865

Amazon Linux 2 is reported as 4

    Details

    • Template:
    • Team:
      Platform OS
    • Sprint:
      Platform OS Kanban
    • Method Found:
      Customer Feedback
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Updates facter to correctly read the format of /etc/system-release under Amazon Linux 2. This corrects the os release fact, which previously fell back to the kernel version.
    • QA Risk Assessment:
      Needs Assessment

      Description

      Facter 3.11.2 shipped with puppet-agent-5.5.3-1.el7 is reporting the following facts:

          "operatingsystem": "Amazon",
          "operatingsystemmajrelease": "4", <- Note this
          "operatingsystemrelease": "4.14.47-64.38.amzn2.x86_64",
          "os": {
            "architecture": "x86_64",
            "family": "RedHat",
            "hardware": "x86_64",
            "name": "Amazon",
            "release": {
              "full": "4.14.47-64.38.amzn2.x86_64",
              "major": "4",
              "minor": "14"
            },
            "selinux": {
              "enabled": false
            }
          },
          "osfamily": "RedHat",
      

      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/service/systemd.rb line 26 is:

          defaultfor :operatingsystem => :amazon, :operatingsystemmajrelease => ["2"]
      

      The operatingsystemmajrelease is rightfully reporting "4" as "All platforms: default to the major version of the kernel release.".
      This is causing systemd not to be selected as the default provider for the service type.

      The /etc/os-release file contains some clue about the version:

          $ cat /etc/os-release
          NAME="Amazon Linux"
          VERSION="2"
          ID="amzn"
          ID_LIKE="centos rhel fedora"
          VERSION_ID="2"
          PRETTY_NAME="Amazon Linux 2"
          ANSI_COLOR="0;33"
          CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
          HOME_URL="https://amazonlinux.com/"
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                casey.williams Casey Williams
                Reporter:
                branan Branan Riley
              • Votes:
                1 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support