Bug 1357648

Summary: Brandbot cannot be disabled
Product: Red Hat Enterprise Linux 7 Reporter: Ryan Barry <rbarry>
Component: initscriptsAssignee: David Kaspar // Dee'Kej <deekej>
Status: CLOSED ERRATA QA Contact: Daniel Rusek <drusek>
Severity: high Docs Contact:
Priority: medium    
Version: 7.2CC: alikins, cshao, deekej, drusek, fdeutsch, jsefler, jswensso, ovasik, yaniwang, ycui
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: initscripts-9.49.40-2.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1359645 (view as bug list) Environment:
Last Closed: 2018-04-10 18:24:45 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: 1395391, 1493545    
Bug Blocks: 1329957, 1359645, 1380361, 1447254, 1465901    

Description Ryan Barry 2016-07-18 18:38:14 UTC
Description of problem:
Brandbot aggressively rewrites PRETTY_NAME, and here is no way to disable brandbot's behavior other than masking systemd units.

Version-Release number of selected component (if applicable):
initscripts-9.49.30-1.el7_2.2

How reproducible:
100%

Steps to Reproduce:
1. Install any system which does not have a branded "OS", but sets PRETTY_NAME (RHV-H, for example)
2. Register to an account which has an entitlement for a branded "OS", or even "echo foobar > /var/lib/rhsm/branded_name"

Actual results:
3. PRETTY_NAME is overwritten
4. The only way to disable this is to disable/mask brandbot.[path|service]

Expected results:
There should be a way to disable brandbot. Even if this way is changing brandbot to an actual activated service, instead of one which is disabled and triggered by brandbot.path in some way.

Comment 2 Fabian Deutsch 2016-07-18 19:11:08 UTC
Another considertaion would be to make the behavior - rewrite PRETTY_NAME - configurable.

Disabling brandbot completely might be pretty invasive (not sure what else functionality brandbot is porviding).

Comment 3 Lukáš Nykrýn 2016-07-19 07:06:48 UTC
That is the only thing that brandbot is doing. TO be host, I have no idea if we want the possibility for user to "easily" disable brandbot. This goes beyond engineering. Let's try to ask someone who was behind this feature for rhel7. https://mojo.redhat.com/docs/DOC-186259

Comment 4 Adrian Likins 2016-07-22 17:21:29 UTC
> (In reply to Fabian Deutsch from comment #2)

> Disabling brandbot completely might be pretty invasive (not sure what else
> functionality brandbot is porviding).

I don't work on subscription-manager/entitlements anymore, so current team would be better to ask ('chainsaw' team, aka candleping/subscription-manager dev team https://mojo.redhat.com/docs/DOC-19860).


I doubt anyone would notice if it was disabled to be honest, but that is not really my call anymore ;->

Updating PRETTY_NAME is pretty much the only functionality provided by brandbot.
The purpose of brand bot was to provide a way to change things like /etc/issue for RHEL to reflect more specific products/subscriptions/entitlements.

ie, so if I bought 'Red Hat Enterprise Linux Server (Super Turbo Bundle Edition)', the 'bits' for RHEL are the same as every other RHEL Server (69.pem) version so the default PRETTY_NAME is "Red Hat Enterprise Linux Server", but the subscription/product wants PRETTY_NAME to be 'Red Hat Enterprise Linux Server (Super Turbo Bundle Edition)'.

That info is included in the entitlement certificate and subscription-manager/rhsmcertd will update /var/lib/rhsm/branded_name causing the brandbot.path service to trigger /usr/libexec/initscripts/brandbot that changes /etc/os-release.

AFAIK, it is for purely cosmetic purposes (in the sense that nothing really depends on the value of PRETTY_NAME, at least nothing entitlement related). If there are tools that make decisions based on PRETTY_NAME brandbot will likely confuse them.

Comment 5 Lukáš Nykrýn 2016-07-25 08:16:00 UTC
Ok, let's create a clone for redhat-release-* packages to request adding brandbot* to presets and then make it disableable.

Comment 8 David Kaspar // Dee'Kej 2017-09-20 13:31:36 UTC
Pull-request to fix BZ #1395391 submitted for review:
https://github.com/fedora-sysv/initscripts/pull/128

This pull-request also fixes this issue.

Comment 17 errata-xmlrpc 2018-04-10 18:24:45 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0983