Bug 1204194

Summary: /etc/os-release on Atomic is modified by subman (disable brandbot.[path|service] ?)
Product: Red Hat Enterprise Linux 7 Reporter: Micah Abbott <miabbott>
Component: rhel-server-atomicAssignee: Colin Walters <walters>
Status: CLOSED CURRENTRELEASE QA Contact: atomic-bugs <atomic-bugs>
Severity: low Docs Contact: Yoana Ruseva <yruseva>
Priority: unspecified    
Version: 7.1CC: alikins, dlah, dornelas, ghelleks, initscripts-maint-list, jkrieger, ljozsa, sct, walters, wcordis
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Known Issue
Doc Text:
The "brandbot.path" service may cause subscription-manager to change the /etc/os-release file in 7.1 installations The `/etc/os-release` file may still specify the 7.1 version even after Atomic Host has been upgraded to 7.2 using the `atomic host upgrade` command. This occurs because the underlying ostree tool preserves modified files in `/etc`. As a workaround, after upgrading to 7.2, run the following command: `cp /usr/etc/os-release /etc`. This way, the `/etc/os-release` file will return to an unmodified state, and because _brandbot.path_ is masked in 7.2.0, it will not be modified in the future by subscription-manager, and future upgrades will show the correct version.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-07 19:29:11 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: 1121117, 1186913, 1211379    

Description Micah Abbott 2015-03-20 14:54:48 UTC
Description of problem:
After upgrading from GA using stage, the grub menuentry drops any mention of 'Atomic Host'

Version-Release number of selected component (if applicable):

* 2015-03-20 12:49:39     7.1.1     42a948cec4     rhel-atomic-host     rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard     

How reproducible:

All the time

Steps to Reproduce:
1.  Boot RHELAH GA image
2.  Subscribe to stage via subman
3.  Use 'atomic host upgrade'
4.  Examine '/boot/grub/grub2.cfg'

Actual results:

The grub menuentry line is changed from:

menuentry 'Red Hat Enterprise Linux Atomic Host 7.1 7.1.0 (ostree)'....

...to:

menuentry 'Red Hat Enterprise Linux 7.1.1 (ostree)'....

and

menuentry 'Red Hat Enterprise Linux 7.1.0 (ostree)'....


Expected results:

I expected to have the menuentry lines to include 'Atomic Host' in the name, like:

menuentry 'Red Hat Enterprise Linux Atomic Host 7.1.1 (ostree)'....

menuentry 'Red Hat Enterprise Linux Atomic Host 7.1.0 (ostree)'....


Additional info:

Comment 2 Colin Walters 2015-03-20 15:23:46 UTC
Indeed...actually for me it looks like *both* entries drop the "Atomic Host" part.

Comment 3 Colin Walters 2015-03-20 15:57:53 UTC
This is subscription-manager changing /etc/os-release.

# diff -u /etc/os-release /usr/etc/os-release
--- /etc/os-release	2015-03-20 15:55:40.858917461 +0000
+++ /usr/etc/os-release	1970-01-01 00:00:00.000000000 +0000
@@ -3,7 +3,7 @@
 ID="rhel"
 ID_LIKE="fedora"
 VERSION_ID="7.1"
-PRETTY_NAME="Red Hat Enterprise Linux"
+PRETTY_NAME="Red Hat Enterprise Linux Atomic Host 7.1"
 ANSI_COLOR="0;31"
 CPE_NAME="cpe:/o:redhat:enterprise_linux:7.1:GA:atomic-host"
 HOME_URL="https://www.redhat.com/"

Is this some metadata in candlepin that needs to be changed?  Why is subman changing `PRETTY_NAME` regardless?

Comment 8 Colin Walters 2015-04-02 15:12:30 UTC
*** Bug 1207650 has been marked as a duplicate of this bug. ***

Comment 15 Colin Walters 2015-11-11 19:24:11 UTC
If this becomes a frequently reported issue, we could investigate adding a systemd unit file to fix it on boot.

Comment 17 Derrick Ornelas 2019-03-07 19:29:11 UTC
Fixed in Red Hat Enterprise Linux Atomic Host 7.2.0