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 1194906 - rhsm-debug system --no-subscriptions --subscriptions should throw a usage error
Summary: rhsm-debug system --no-subscriptions --subscriptions should throw a usage error
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.7
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: candlepin-bugs
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel68
TreeView+ depends on / blocked
 
Reported: 2015-02-20 22:03 UTC by John Sefler
Modified: 2015-10-09 17:41 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-09 17:41:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1246680 0 unspecified CLOSED rhsm-debug system --subscriptions fails to collect subscriptions.json against candlepin-2.0 2021-02-22 00:41:40 UTC

Internal Links: 1246680

Description John Sefler 2015-02-20 22:03:03 UTC
Description of problem:
As a result of the following commit 029f786999f5b1cd1d9614976fb4544ca6541b3b...

    1114117: Stop collecting subs info by default.
    
    Add a '--subscriptions' cli option now, and make '--no-subscriptions'
    the default behaviour. For orgs with lots of subscriptions
    available, the candlepin api request getSubscriptionsList can
    be very slow.

There are now two options --no-subscriptions and --subscriptions that instruct the rhsm-debug tool to do opposite tasks.  I realize that if both are specified on the command line then the last one specified wins.  Unfortunately, this is not obvious to all users.  For usability sake, it would be better to throw an error similar to other subscription manager commands, for example:
  [root@jsefler-os6 ~]# subscription-manager repo-override --list --remove-all
  Error: You may not use --list with --remove-all
  [root@jsefler-os6 ~]# echo $?
  64


Version-Release number of selected component (if applicable):
[root@jsefler-os6 ~]# rpm -q subscription-manager
subscription-manager-1.14.1-1.git.16.8bd8008.el6.x86_64


How reproducible:


Steps to Reproduce:
[root@jsefler-os6 ~]# rhsm-debug system --no-subscriptions --subscriptions
Wrote: /tmp/rhsm-debug-system-20150220-694959.tar.gz


Actual results:
shown above
if --subscriptions is specified last, then subscriptions.json is written
if --no-subscriptions is specified last, then subscriptions.json is not written

Expected results:
[root@jsefler-os6 ~]# rhsm-debug system --no-subscriptions --subscriptions
Error: You may not use --subscriptions with --no-subscriptions
[root@jsefler-os6 ~]# echo $?
64    <====== exit code for EX_USAGE

Comment 2 RHEL Program Management 2015-02-23 20:56:27 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.

Comment 5 John Sefler 2015-09-29 20:19:12 UTC
Note: This bug is no longer an issue now that options --no-subscriptions and --subscriptions are ignored.  See bug 1246680

This is now the expected behavior in subscription-manager-1.15.9-12 and newer...

[root@jsefler-7 ~]# rhsm-debug system --subscriptions --no-subscriptions
Wrote: /tmp/rhsm-debug-system-20150929-850365.tar.gz

[root@jsefler-7 ~]# tail -f /var/log/rhsm/rhsm.log
2015-09-29 15:58:20,957 [INFO] rhsm-debug:5008 @debug_commands.py:98 - The rhsm-debug options '--subscriptions' and '--no-subscriptions' have no effect now.


VERIFIED: The options --subscriptions and --no-subscriptions are ignored.  Otherwise the call would have failed with rhsm-debug: error: no such option: --subscriptions.  Moreover an INFO log was written to rhsm.log

Comment 6 Barnaby Court 2015-10-09 17:41:01 UTC
Since comment 5 says this is no longer an issue, closing as next release.


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