Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1240624

Summary: /etc/os-release should get updated with RHL7.1
Product: Red Hat Enterprise Linux 7 Reporter: daniel <dmoessne>
Component: redhat-releaseAssignee: Lubos Kocman <lkocman>
Status: CLOSED DUPLICATE QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact: Petr Bokoc <pbokoc>
Priority: medium    
Version: 7.1CC: dmoessne, jstodola, pbokoc
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Known Issue
Doc Text:
The /etc/os-release file contains outdated information after system upgrade Upgrading to the next minor release (for example, from Red Hat Enterprise Linux 7.1 to 7.2) does not update the `/etc/os-release` file with the new product number. Instead, this file continues to list the previous release number, and a new file named `os-release.rpmnew` is placed in the `/etc` directory. If you require the `/etc/os-release` file to be up-to-date, replace it with `/etc/os-release.rpmnew`.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-14 11:16:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1298243, 1420851    

Description daniel 2015-07-07 11:41:21 UTC
Description of problem:

When updating RHEL7GA to RHEL7.1 /etc/os-release is not updated but /etc/os-release.rpmnew is created in case the system is subscribed which makes some applications using this file to determine current OS version failing (e.g IBM clearcase).

I understand that marking /etc/os-release as configuration file was introduced with bz#1039878 to ensure PRETTY_NAME in /etc/os-release - reflecting the actual product name according to subscription - is not overwritten.
While I understand that a proper PRETTY_NAME should be set I think that this should not prevent other options being set correctly during update e.g VERSION, CPE_NAME,...

Having a look I found even if /etc/os-release from RHEL7 is replaced by /etc/os-release.rpmnew from RHEL7.1, after rebooting the server
PRETTY_NAME is set correctly according to /var/lib/rhsm/branded_name (by brandbot.* services ). So to my understanding we shall not mark /etc/os-release but /var/lib/rhsm/branded_name as configuration file in case we want have PRETTY_NAME set correctly.

In case system is not subscribed (i.e /var/lib/rhsm/branded_name is not existant on the system)  /etc/os-release gets updated during update to RHEL7.1.


Version-Release number of selected component (if applicable):
redhat-release-server-7.1-1.el7.x86_64


How reproducible:
Always


Steps to Reproduce:
1. Install RHEL7GA
2. susbscibe system 
3. update to RHEL7.1


Actual results:
- getting /etc/os-release.rpmnew 
- /etc/os-release still showing version prior to update


[root@localhost ~]# diff -u /etc/os-release /etc/os-release.rpmnew 
--- /etc/os-release	2015-07-07 08:34:44.013260877 +0200
+++ /etc/os-release.rpmnew	2015-02-02 12:46:09.000000000 +0100
@@ -1,15 +1,15 @@
 NAME="Red Hat Enterprise Linux Server"
-VERSION="7.0 (Maipo)"
+VERSION="7.1 (Maipo)"
 ID="rhel"
 ID_LIKE="fedora"
-VERSION_ID="7.0"
-PRETTY_NAME="Employee SKU"
+VERSION_ID="7.1"
+PRETTY_NAME="Red Hat Enterprise Linux Server 7.1 (Maipo)"
 ANSI_COLOR="0;31"
-CPE_NAME="cpe:/o:redhat:enterprise_linux:7.0:GA:server"
+CPE_NAME="cpe:/o:redhat:enterprise_linux:7.1:GA:server"
 HOME_URL="https://www.redhat.com/"
 BUG_REPORT_URL="https://bugzilla.redhat.com/"
 
 REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
-REDHAT_BUGZILLA_PRODUCT_VERSION=7.0
+REDHAT_BUGZILLA_PRODUCT_VERSION=7.1
 REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
-REDHAT_SUPPORT_PRODUCT_VERSION=7.0
+REDHAT_SUPPORT_PRODUCT_VERSION="7.1"
[root@localhost ~]# 




Expected results:
/etc/os-release reflects correct VERSION,CPE_NAME,.. after updating to RHEL7.1


Additional info:
In case we do not want to change the current behavior it should be well documented

Comment 2 Lubos Kocman 2017-02-01 14:23:24 UTC
*** Bug 1240622 has been marked as a duplicate of this bug. ***

Comment 3 Lubos Kocman 2017-02-01 14:24:36 UTC
Adding dev_ack+ if this is still happening. Can QE confirm that?

Lubos

Comment 4 Lubos Kocman 2017-03-10 15:24:04 UTC
Should be pretty easy to fix, just not to treat it as config and override it each time.

Lubos

Comment 5 Jan Stodola 2017-03-13 12:14:03 UTC
(In reply to Lubos Kocman from comment #3)
> Adding dev_ack+ if this is still happening. Can QE confirm that?
> 
> Lubos

I'm no longer able to reproduce with RHEL-7.3 GA.
Looking at related bugs, this seems to be fixed in RHEL-7.2 with bug 1257142.
Current behavior is saving modified /etc/os-release as /etc/os-release.rpmsave and overwriting /etc/os-release with a new file.

Lubos, I believe no other fix is needed here.

Comment 6 Lubos Kocman 2017-03-14 11:16:02 UTC
Hello Jan,

thanks for verification. Closing as duplicate of Bug 1257142

*** This bug has been marked as a duplicate of bug 1257142 ***