Bug 1450049

Summary: subscription-manager rhn-migrate-classic-to-rhsm:`_rhn-migrate-classic-to-rhsm': not a valid identifier
Product: Red Hat Enterprise Linux 7 Reporter: dbodnarc
Component: subscription-managerAssignee: Kevin Howell <khowell>
Status: CLOSED ERRATA QA Contact: John Sefler <jsefler>
Severity: medium Docs Contact:
Priority: low    
Version: 7.3CC: khowell, redakkan, skallesh
Target Milestone: rcKeywords: EasyFix, Triaged
Target Release: 7.4   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: subscription-manager-1.19.15-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 19:23:41 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:

Description dbodnarc 2017-05-11 12:48:01 UTC
Description of problem:
As per customer example - rc scripts (.profile, .bashrc) which doesn't conform to POSIX mode causes issues (i.e. while using tigervnc)

According to the bash manual, names should contain letters, digits and underscores only. 

However there are files commonly used inside .bashrc that do not conform to POSIX mode.

The following script use hyphens in function names:
in /etc/bash_completion.d/: rhn-migrate-classic-to-rhsm rhsm-debug rhsm-icon

Version-Release number of selected component (if applicable):
subscription-manager-1.15.9-15.el7.x86_64

Steps to Reproduce:
1. $ bash --posix
2. $ . /etc/profile.d/bash_completion.sh

Actual results:
bash: `_rhn-migrate-classic-to-rhsm': not a valid identifier
bash: `_rhsm-debug': not a valid identifier
bash: `_rhsm-icon': not a valid identifier

Expected results:
no errors

Comment 3 Rehana 2017-05-30 07:27:30 UTC
Reproducing the failure : 
========================

[root@dhcp35-154 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.3 (Maipo)

[root@dhcp35-154 ~]# rpm -qa subscription-manager*
subscription-manager-1.17.15-1.el7.x86_64
subscription-manager-gui-1.17.15-1.el7.x86_64
subscription-manager-initial-setup-addon-1.17.15-1.el7.x86_64

[root@dhcp35-154 ~]# bash --posix
bash-4.2# source /etc/profile.d/bash_completion.sh
bash: `_itweb-settings': not a valid identifier
bash: `_rhn-migrate-classic-to-rhsm': not a valid identifier
bash: `_rhsm-debug': not a valid identifier
bash: `_rhsm-icon': not a valid identifier
bash-4.2# 
bash-4.2# exit
exit

Verifying on latest subscription-manager :
==========================================

[root@dhcp151-206 ~]# subscription-manager version
subscription management server: 0.9.51.24-1
subscription management rules: 5.15.1
subscription-manager: 1.19.16-1.el7
python-rhsm: 1.19.7-1.el7

[root@dhcp151-206 ~]# rpm -qa subscription-manager --changelog | grep 1450049
- 1450049: Replace `-` with `_` in completion functions (khowell)

[root@dhcp151-206 ~]# bash --posix
bash-4.2# source /etc/profile.d/bash_completion.sh
bash: `_itweb-settings': not a valid identifier
bash-4.2# 

^^ Observed that error from "rhn-migrate-classic-to-rhsm" , "rhsm-debug" and "rhsm-icon" NO longer appear. The "itweb-settings" failure is tracked under a different bug 1450046 . Hence moving this bug to "verified" as the subscription-manager component related issues are now fixed.

Comment 4 errata-xmlrpc 2017-08-01 19:23:41 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-2017:2083