[FACT-1888] 'os.release' values not correct for VZ7 Created: 2018/10/04  Updated: 2019/07/15  Resolved: 2019/06/19

Status: Closed
Project: Facter
Component/s: None
Affects Version/s: FACT 3.12.0
Fix Version/s: FACT 3.14.1, FACT 3.12.5, FACT 3.13.3

Type: Bug Priority: Normal
Reporter: Kilian Engelhardt Assignee: Gheorghe Popescu
Resolution: Fixed Votes: 1
Labels: community, help_wanted, resolved-issue-added, virtualization
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Team: Night's Watch
Sprint: PR - 2019-04-03, PR - 2019-04-17, PR - 2019-05-02, PR - 2019-05-15, PR - 2019-05-29, PR - 2019-06-12, PR - 2019-06-25
Method Found: Needs Assessment
Release Notes: Enhancement
Release Notes Summary: [Community Supported OS]
- added support for Virtuzzo Linux facts
QA Risk Assessment: Needs Assessment

 Description   

Facter 3.12.0 ships d9c30e5 which adds support for VirtuozzoLinux. This breaks parsing the release information. Instead, as a fallback, kernel version will be returned:
Version 3.12.0:

os => {
  architecture => "x86_64",
  family => "Linux",
  hardware => "x86_64",
  name => "VirtuozzoLinux",
  release => {
    full => "3.10.0-693.17.1.vz7.43.10",
    major => "3",
    minor => "10"
  },
  selinux => {
    enabled => false
  }
}

Version 3.11.4:

{
  architecture => "x86_64",
  family => "RedHat",
  hardware => "x86_64",
  name => "RedHat",
  release => {
    full => "7.5",
    major => "7",
    minor => "5"
  },
  selinux => {
    enabled => false
  }
}

In case of VirtuozzoLinux Facter should also return the correct release information. It's still in redhat-release:

# cat /etc/redhat-release 
Virtuozzo Linux release 7.5



 Comments   
Comment by Kenn Hussey [ 2018/10/04 ]

Could this be a duplicate of FACT-1886?

Comment by Kilian Engelhardt [ 2018/10/05 ]

Kenn Hussey No it's not. FACT-1886 is about adding support for Virtuozzo's PCS6.

The new support for Virtuozzo's VZ7 somehow breaks the former (facter 3.11.4) correct parsing of 'os.release' information.

So FACT-1886 is more or less depending on this issue (FACT-1888) being fixed, because support for PCS6 would break parsing it's 'os.release', too.

Comment by Boris [ 2019/03/06 ]

We also stumbled across this issue. This issue results in other issues like:

  • pip3 gets the default package provider
  • templated repo files break because of os.release.major
  • monitoring that is depending on these entries wont work

This issue breaks our whole automated infrastructure so we rolled back  to puppet5 with facter version 3.11.7 (commit efb78024806a461a4b0c46819979085362790520)

Comment by Boris [ 2019/05/17 ]

Hi,

will this get fixed someday? We really like to update our nodes to puppet6, because we really want to use the [Puppet Server: Intermediate CA|https://puppet.com/docs/puppetserver/6.3/intermediate_ca.html] and it looks like this is only supported for puppet6.

 

Cheers

 Boris

Comment by Gheorghe Popescu [ 2019/06/10 ]

Kilian Engelhardt let me know if e get this correctly. The fact that should be returned must be for example:

root@localhost bin]# ./facter os
{
  architecture => "x86_64",
  family => "Linux",
  hardware => "x86_64",
  name => "VirtuozzoLinux",
  release => {
    full => "7.6",
    major => "7",
    minor => "6"
  },
  selinux => {
    enabled => false
  }
}
[root@localhost bin]# cat /etc/redhat-release
Virtuozzo Linux release 7.6
[root@localhost bin]#

Comment by Boris [ 2019/06/10 ]

Looks good. I would think that family should be rh and don’t miss package provider should be yum.

Comment by Gheorghe Popescu [ 2019/06/10 ]

Ok, i'll look also into os family fact

Comment by Gheorghe Popescu [ 2019/06/10 ]

Boris Kilian Engelhardt

root@localhost bin]# ./facter --version
3.12.5 (commit c86b1bc6a91ca9614b5d18999d5f5056550ef120)
[root@localhost bin]# ./facter os
{
  architecture => "x86_64",
  family => "RedHat",
  hardware => "x86_64",
  name => "VirtuozzoLinux",
  release => {
    full => "7.6",
    major => "7",
    minor => "6"
  },
  selinux => {
    enabled => false
  }
}
[root@localhost bin]# cat /etc/redhat-release
Virtuozzo Linux release 7.6

I'll put a PR for this

Comment by Gheorghe Popescu [ 2019/06/10 ]

PR: https://github.com/puppetlabs/facter/pull/1789

Generated at Mon Dec 16 02:16:13 PST 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.