Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
DescriptionGennadii Altukhov
2017-02-24 15:27:28 UTC
Description of problem:
We're using the subscription-manager in a script to enable repositories. If enabling is failed there is nothing in /var/log/rhsm/rhsm.log
Version-Release number of selected component (if applicable):
subscription-manager-1.16.8-8.el6.x86_64
How reproducible:
always
Steps to Reproduce:
1. [root@ibm-x3650m4-03-vm09 mnt]# /usr/bin/subscription-manager repos --enable='rhel-?-dummy-repo'
Error: rhel-?-dummy-repo is not a valid repository ID. Use --list option to see valid repositories.
Actual results:
nothing about the error in a /var/log/rhsm/rhsm.log
Expected results:
error message with reason why it's failed
Let's ensure that there is a warning level log message describing why the repo was not enabled (in this case that the id given was invalid).
We should also return a non-zero exit code in this case.
Preliminary Verification:
[root@hp-moonshot-01-c05 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.2.2-1
subscription management rules: 5.26
subscription-manager: 1.20.10-2.el6
[root@hp-moonshot-01-c05 ~]# subscription-manager register --serverurl subscription.rhsm.stage.redhat.com
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: shwetha_tier1_test
Password:
The system has been registered with ID: 6d76960b-731d-4ee9-9dc6-7c9183b87aa1
The registered system name is: hp-moonshot-01-c05.ml3.eng.bos.redhat.com
Error updating system data on the server, see /var/log/rhsm/rhsm.log for more details.
[root@hp-moonshot-01-c05 ~]# /usr/bin/subscription-manager repos --enable='rhel-?-dummy-repo'
Error: 'rhel-?-dummy-repo' does not match a valid repository ID. Use "subscription-manager repos --list" to see valid repositories.
[root@hp-moonshot-01-c05 ~]# echo $?
1
[root@hp-moonshot-01-c05 ~]# tail -f /var/log/rhsm/rhsm.log | grep "rhel-?-dummy-repo"
2018-03-15 04:37:21,423 [WARNING] subscription-manager:8167:MainThread @managercli.py:2078 - 'rhel-?-dummy-repo' does not match a valid repository ID.