Skip to content

osrelease_info broken for CentOS 7 #31365

Closed

Description

@cwicklein

It looks like the osrelease* grains aren't being set on CentOS 7 with 2015.8.5 as they were with 2015.5.x. The osrelease_info bits mostly fell out.

2015.5.x:

os:
    CentOS
os_family:
    RedHat
osarch:
    x86_64
oscodename:
    Core
osfinger:
    CentOS Linux-7
osfullname:
    CentOS Linux
osmajorrelease:
    7
osrelease:
    7.1.1503
osrelease_info:
    - 7
    - 1
    - 1503

2015.8.5:

os:
    CentOS
os_family:
    RedHat
osarch:
    x86_64
oscodename:
    CentOS Linux 7 (Core)
osfinger:
    CentOS Linux-7
osfullname:
    CentOS Linux
osmajorrelease:
    7
osrelease:
    7
osrelease_info:
    - 7

Activity

  1. added
    bug
    severity-medium
    Regression
    P1
    Platform
    needs-testcase
    on Feb 19, 2016
  2. added this to the Approved milestone on Feb 19, 2016
  3. jfindlay commented on Feb 19, 2016

    @jfindlay
    Contributor

    @cwicklein, thanks for reporting.

  4. added
    Confirmed
    on Feb 19, 2016
  5. jfindlay commented on Feb 19, 2016

    @jfindlay
    Contributor

    I can confirm this:

    • 2015.5.9

      os:
          CentOS
      os_family:
          RedHat
      osarch:
          x86_64
      oscodename:
          Core
      osfinger:
          CentOS Linux-7
      osfullname:
          CentOS Linux
      osmajorrelease:
          7
      osrelease:
          7.1.1503
      osrelease_info:
          - 7
          - 1
          - 1503
    • 2015.8.7

      os:
          CentOS
      os_family:
          RedHat
      osarch:
          x86_64
      oscodename:
          CentOS Linux 7 (Core)
      osfinger:
          CentOS Linux-7
      osfullname:
          CentOS Linux
      osmajorrelease:
          7
      osrelease:
          7
      osrelease_info:
          - 7
  6. ssgward commented on Feb 19, 2016

    @ssgward

    @jfindlay - is this just for Cent 7 or other distros, too? Trying to determine how wide spread this is.

  7. jfindlay commented on Feb 19, 2016

    @jfindlay
    Contributor

    I only tested on CentOS 7.

  8. DmitryKuzmenko commented on Feb 20, 2016

    @DmitryKuzmenko
    Contributor

    Works on Centos 6.6:

    $ ./scripts/salt --version # the same on master and minion
    salt 2015.8.5 (Beryllium)
    $ ./scripts/salt cent grains.items
    cent:
    <cut>
        os:
            CentOS
        os_family:
            RedHat
        osarch:
            x86_64
        oscodename:
            Final
        osfinger:
            CentOS-6
        osfullname:
            CentOS
        osmajorrelease:
            6
        osrelease:
            6.6
        osrelease_info:
            - 6
            - 6
    <cut>
    
  9. DmitryKuzmenko commented on Feb 20, 2016

    @DmitryKuzmenko
    Contributor

    Had some time today to check this: the difference is the following:

    CentOS 6

    • doesn't provide /etc/os-release file or it's just missing on my centos, will check on some another.
    • salt uses the info from /etc/centos-release that's content is:
    CentOS release 6.6 (Final)
    

    CentOS 7

    • provides /etc/os-release that is out of the freedesktop.org standard: it contains the only major release number for the os version id:
    # cat /etc/os-release 
    NAME="CentOS Linux"
    VERSION="7 (Core)"
    ID="centos"
    ID_LIKE="rhel fedora"
    VERSION_ID="7"
    PRETTY_NAME="CentOS Linux 7 (Core)"
    ANSI_COLOR="0;31"
    CPE_NAME="cpe:/o:centos:centos:7"
    HOME_URL="https://www.centos.org/"
    BUG_REPORT_URL="https://bugs.centos.org/"
    
    CENTOS_MANTISBT_PROJECT="CentOS-7"
    CENTOS_MANTISBT_PROJECT_VERSION="7"
    REDHAT_SUPPORT_PRODUCT="centos"
    REDHAT_SUPPORT_PRODUCT_VERSION="7"
    

    This is fresh default CentOS 7 installed today from the lates minimal iso.
    BTW, it also has the old-style /etc/centos-release that contains good useful number:

    CentOS Linux release 7.2.1511 (Core) 
    

    Salt uses the following priority to determine the release (stops if found):

    1. os-release file in /etc/
    2. specific os release file in /etc/ (centos-release for centos)
    3. python platform lib (that uses '/etc/.*-(release|version)')

    So the solution is to make an exception for CentOS.

    My propose:
    Add an exception for CentOS to use centos-release instead of os-release. This wouldn't touch the older versions because they have no os-release file and centos-release is the second by priority regarding the current logic.

    I can fix it on Wed (my next working day). If there is a need to do this sooner, u r welcome!

  10. 14 remaining items

  11. gzcwnk commented on Mar 22, 2016

    @gzcwnk

    -bash-4.1# salt vuwunicopatch06.ods.vuw.ac.nz grains.item os osrelease oscodename
    vuwunicopatch06.ods.vuw.ac.nz:
    ----------
    os:
    RedHat
    oscodename:
    Santiago
    osrelease:
    6.7
    -bash-4.1# salt vuwunicomysqlp2.ods.vuw.ac.nz grains.item os osrelease oscodename
    vuwunicomysqlp2.ods.vuw.ac.nz:
    ----------
    os:
    RedHat
    oscodename:
    Red Hat Enterprise Linux Server 7.2 (Maipo)
    osrelease:
    7.2
    -bash-4.1#

  12. DmitryKuzmenko commented on Mar 22, 2016

    @DmitryKuzmenko
    Contributor

    @gzcwnk Could you show the contents of /etc/redhat-release on both machines?

  13. gzcwnk commented on Mar 22, 2016

    @gzcwnk

    [jonesst1@vuwunicossj0001 Desktop]$ more /etc/redhat-release
    Red Hat Enterprise Linux Server release 7.2 (Maipo)
    [jonesst1@vuwunicossj0001 Desktop]$

  14. gzcwnk commented on Mar 22, 2016

    @gzcwnk

    [jonesst1@vuwunicopatch06 ~]$ more /etc/redhat-release
    Red Hat Enterprise Linux Server release 6.7 (Santiago)
    [jonesst1@vuwunicopatch06 ~]$

    and,

    Kickstarted on 2016-03-21
    [jonesst1@vuwunicomysqlp2 ~]$ more /etc/redhat-release
    Red Hat Enterprise Linux Server release 7.2 (Maipo)
    [jonesst1@vuwunicomysqlp2 ~]$

  15. modified the milestones: B -1, B 2 on Mar 29, 2016
  16. meggiebot commented on Mar 29, 2016

    @meggiebot

    Can you take another look @DmitryKuzmenko

  17. DmitryKuzmenko commented on Mar 29, 2016

    @DmitryKuzmenko
    Contributor

    @meggiebot will try to do today, I'm downloading RHEL 7.2 ISO right now.

  18. DmitryKuzmenko commented on Mar 29, 2016

    @DmitryKuzmenko
    Contributor
  19. gzcwnk commented on Mar 29, 2016

    @gzcwnk

    Hi,

    So I can just update via the repo?

  20. gzcwnk commented on Mar 29, 2016

    @gzcwnk

    Not sure what is going on here but I have a dependency issue when I try and update,

    [root@vuwunicossj0001 yum.repos.d]# yum update -y salt-minion
    Loaded plugins: langpacks, product-id, rhnplugin, search-disabled-repos, subscription-manager
    This system is not subscribed to any channels.
    RHN channel support will be disabled.
    saltstack-salt | 2.9 kB 00:00:00
    Resolving Dependencies
    --> Running transaction check
    ---> Package salt-minion.noarch 0:2015.5.2-3.el7.centos will be updated
    ---> Package salt-minion.noarch 0:2015.8.8-2.el7 will be an update
    --> Processing Dependency: salt = 2015.8.8-2.el7 for package: salt-minion-2015.8.8-2.el7.noarch
    --> Running transaction check
    ---> Package salt.noarch 0:2015.5.2-3.el7.centos will be updated
    ---> Package salt.noarch 0:2015.8.8-2.el7 will be an update
    --> Processing Dependency: python-tornado >= 4.2.1 for package: salt-2015.8.8-2.el7.noarch
    --> Processing Dependency: python-futures >= 2.0 for package: salt-2015.8.8-2.el7.noarch
    --> Running transaction check
    ---> Package python-futures.noarch 0:3.0.3-1.el7 will be installed
    ---> Package salt.noarch 0:2015.8.8-2.el7 will be an update
    --> Processing Dependency: python-tornado >= 4.2.1 for package: salt-2015.8.8-2.el7.noarch
    --> Finished Dependency Resolution
    Error: Package: salt-2015.8.8-2.el7.noarch (saltstack-salt)
    Requires: python-tornado >= 4.2.1
    Available: python-tornado-2.2.1-8.el7.noarch (rhel-7-server-optional-rpms)
    python-tornado = 2.2.1-8.el7


    yum can be configured to try to resolve such errors by temporarily enabling
    disabled repos and searching for missing dependencies.
    To enable this functionality please set 'notify_only=0' in /etc/yum/pluginconf.d/search-disabled-repos.conf


    Error: Package: salt-2015.8.8-2.el7.noarch (saltstack-salt)
    Requires: python-tornado >= 4.2.1
    Available: python-tornado-2.2.1-8.el7.noarch (rhel-7-server-optional-rpms)
    python-tornado = 2.2.1-8.el7
    You could try using --skip-broken to work around the problem
    You could try running: rpm -Va --nofiles --nodigest
    [root@vuwunicossj0001 yum.repos.d]# yum whatprovides python-tornado
    Loaded plugins: langpacks, product-id, rhnplugin, search-disabled-repos, subscription-manager
    This system is not subscribed to any channels.
    RHN channel support will be disabled.
    python-tornado-2.2.1-8.el7.noarch : Scalable, non-blocking web server and tools
    Repo : rhel-7-server-optional-rpms

    [root@vuwunicossj0001 yum.repos.d]#

    [root@vuwunicossj0001 yum.repos.d]# yum whatprovides python-tornado
    Loaded plugins: langpacks, product-id, rhnplugin, search-disabled-repos, subscription-manager
    This system is not subscribed to any channels.
    RHN channel support will be disabled.
    python-tornado-2.2.1-8.el7.noarch : Scalable, non-blocking web server and tools

    Repo : rhel-7-server-optional-rpms

    ?

  21. gzcwnk commented on Mar 29, 2016

    @gzcwnk

    ah I had an includes, doh..

  22. DmitryKuzmenko commented on Mar 30, 2016

    @DmitryKuzmenko
    Contributor

    @gzcwnk nope, it's just in the 2015.8 branch now, new packages will be out later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

ConfirmedCoreGrainsP1PlatformRegressionbugfixed-pls-verifyneeds-testcaseseverity-medium

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions