Bug 1325847

Summary: NGN 4.0: Incorrect values in /etc/os-release
Product: [oVirt] ovirt-node Reporter: cshao <cshao>
Component: GeneralAssignee: Fabian Deutsch <fdeutsch>
Status: CLOSED WONTFIX QA Contact: cshao <cshao>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.0CC: bugs, fdeutsch, huiwa, huzhao, leiwang, weiwang, yaniwang, ycui
Target Milestone: ---Flags: rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-11 11:42:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Node RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description cshao 2016-04-11 10:48:15 UTC
Description of problem:
In /etc/os-release, some values are incorrect, NAME, VERSION, ID, and CPE NAME,  although node parts did not use them visible, but it is in hypervisor product, we need to avoid incorrect values here, especially hostnamectl will return incorrect CPE name.


# cat /etc/os-release 
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
VARIANT="oVirt Node 4.0.0_alpha1"
VARIANT_ID="ovirt-node"
PRETTY_NAME="oVirt Node 4.0.0_alpha1"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.ovirt.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

# hostnamectl
   Static hostname: localhost.localdomain
         Icon name: computer-desktop
           Chassis: desktop
        Machine ID: 8188aa92fa13446eb5356b44d728bfb7
           Boot ID: ea787dc4e3604fe192d1ed1b32239255
  Operating System: oVirt Node 4.0.0_alpha1
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-327.13.1.el7.x86_64
      Architecture: x86-64


Version-Release number of selected component (if applicable):
ovirt-node-ng-installer-master-20160405.iso
squashfs.20160405
ovirt-node-ng-image-update-placeholder-4.0.0-0.2.alpha1.20160405123556.gitbd184ec.el7.noarch
imgbased-0.5-0.201604040928gitd6a85f8.el7.centos.noarch
ovirt-release-host-node-4.0.0-0.2.alpha1.20160405123556.gitbd184ec.el7.noarch


How reproducible:
100%

Steps to Reproduce:
1. Installed ngn 4.0
2. # cat /etc/os-release 
3. #hostnamectl

Actual results:
Incorrect values in /etc/os-release 

Expected results:
Use Node itself values instead of CentOS values.

Additional info:

Comment 1 Fabian Deutsch 2016-04-11 11:42:22 UTC
The OS output seems to be correct:

>  Operating System: oVirt Node 4.0.0_alpha1

ID, NAME, and VERSION will be untoutched.
We only adjust the variant and variant_id fields.