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 1031490 - [brandbot] Should ignore anything except the first line of /var/lib/rhsm/branded_name while updating /etc/os-release file
Summary: [brandbot] Should ignore anything except the first line of /var/lib/rhsm/bran...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: initscripts
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: initscripts Maintenance Team
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel70 909224
TreeView+ depends on / blocked
 
Reported: 2013-11-18 05:54 UTC by Rehana
Modified: 2016-11-25 13:04 UTC (History)
5 users (show)

Fixed In Version: initscripts-9.49.12-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 12:34:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Rehana 2013-11-18 05:54:57 UTC
Description of problem:
During the test , observed the /etc/os-release file was updated with all the contents(multiple lines of data) of branded_name file,but the contents in the branded_name file was updated with
the product name after the next cert update, but /etc/os-release file
continued to display the old data as well

Version-Release number of selected component (if applicable):
 rpm -qa | grep initscripts
initscripts-9.49.7-1.el7.x86_64

subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.8.33-1
subscription-manager: 1.10.7-1.el7
python-rhsm: 1.10.6-1.el7

How reproducible:
3/3


Steps to Reproduce:
1. Manually added a new line "testing new line of data" in branded_file name
 
[root@dhcp70-124 product]# cat /var/lib/rhsm/branded_name
Awesome OS Server Bits
testing new line of data

2.[root@dhcp70-124 product]# cat /etc/os-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.0 (Maipo)"
ID="rhel"
VERSION_ID="7.0"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.0:beta:server"
 
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.0
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION=7.0
PRETTY_NAME="Awesome OS Server Bits
testing new line of data"

3. DO any cert update operations like removing subscription, add a new subscription etc

I did a cli attach to trigger the entitlement cert update, to update the branded_name file content
[root@dhcp70-124 product]# subscription-manager attach --pool 8ac6a362425a296701425a29d24507c9
Successfully attached a subscription for: RAM Limiting Package (4GB stackable)

4.the branded_name file is updated with the installed product name , the new line was removed from the branded_name file

[root@dhcp70-124 product]# cat /var/lib/rhsm/branded_name
Awesome OS Server Bits

5.But the /etc/os-release file continued to display the newline details, which wasnt there in the branded_name file after the cert update
[root@dhcp70-124 product]# cat /etc/os-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.0 (Maipo)"
ID="rhel"
VERSION_ID="7.0"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.0:beta:server"
 
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.0
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION=7.0
PRETTY_NAME="Awesome OS Server Bits"
testing new line of data"  <<<<======previous content

***here is the subscription-manger log details on branded_name update*******
2013-11-15 01:24:49,424 [DEBUG] subscription-manager @rhelentbranding.py:119 - Installed branded product: <rhsm.certificate2.Product object at 0x24d6810>
2013-11-15 01:24:49,424 [DEBUG] subscription-manager @rhelentbranding.py:122 - 1 entitlement certs with brand info found
2013-11-15 01:24:49,424 [DEBUG] subscription-manager @entbranding.py:61 - Current branded name info, if any: Awesome OS Server Bits
testing new line of data
2013-11-15 01:24:49,425 [DEBUG] subscription-manager @entbranding.py:62 - Fresh ent cert has branded product info: Awesome OS Server Bits
2013-11-15 01:24:49,425 [INFO] subscription-manager @rhelentbranding.py:43 - Updating product branding info for: Awesome OS Server Bits
2013-11-15 01:24:49,453 [INFO] subscription-manager @cache.py:168 - Checking current system info against cache: /var/lib/rhsm/cache/installed_products.json
2013-11-15 01:24:49,453 [INFO] subscription-manager @cache.py:185 - No changes.

Actual results:
Here the new line of data in the branded_name file was updated with
the product name after the cert update, but /etc/os-release file
continued to display newline data(Previous).

Expected results:
SHOULD ignore anything except the first line of /var/lib/rhsm/branded_name as per https://docspace-old.corp.redhat.com/docs/DOC-153859

Additional info:
Note:
As discussed with Bill Nottingham logging Brandbot related bugs against "initscripts" component

Comment 2 Rehana 2014-01-06 10:51:20 UTC
Retested on 

subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.9.1-1
subscription-manager: 1.10.8-1.el7
python-rhsm: 1.10.8-1.el7

rpm -qa | grep initscripts
initscripts-9.49.12-1.el7.x86_64


Observed that now only the first line of branded_name file content is updated in the /etc/os-release  file

cat /etc/os-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.0 (Maipo)"
ID="rhel"
VERSION_ID="7.0"
PRETTY_NAME="Awesome OS Server Bits"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.0:beta:server"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.0
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION=7.0

Comment 3 Ludek Smid 2014-06-13 12:34:29 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


Note You need to log in before you can comment on or make changes to this bug.