Bug 1450049 - subscription-manager rhn-migrate-classic-to-rhsm:`_rhn-migrate-classic-to-rhsm': not a valid identifier
Summary: subscription-manager rhn-migrate-classic-to-rhsm:`_rhn-migrate-classic-to-rhs...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.3
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: 7.4
Assignee: Kevin Howell
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-11 12:48 UTC by dbodnarc
Modified: 2020-06-11 13:48 UTC (History)
3 users (show)

Fixed In Version: subscription-manager-1.19.15-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 19:23:41 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github candlepin subscription-manager pull 1628 None None None 2017-05-15 21:05:49 UTC
Red Hat Knowledge Base (Solution) 3061911 None None None 2018-02-19 15:14:14 UTC
Red Hat Product Errata RHBA-2017:2083 normal SHIPPED_LIVE python-rhsm and subscription-manager bug fix and enhancement update 2017-08-01 18:14:19 UTC

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@redhat.com)

[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


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