Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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 1559302 - Not able to attach a subscription to a host with hammer
Summary: Not able to attach a subscription to a host with hammer
Keywords:
Status: CLOSED DUPLICATE of bug 1558885
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Jitendra Yejare
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-22 08:56 UTC by Anand Agrawal
Modified: 2022-03-13 14:47 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-22 09:03:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 22981 0 None None None 2018-03-22 08:59:42 UTC

Description Anand Agrawal 2018-03-22 08:56:52 UTC
Description

~~
hammer host subscription --attach --subscription-id $id --quantity 1
~~

While attaching subscription to host via above hammer command, it fails with below error message
~~
Failed to attach subscriptions to the host:
Task a5c8d982-3c25-4d21-b8e9-0ba3feae435d: ArgumentError: comparison of String with 0 failed
~~

Same thing happens, with API when quantity is passed as "1"



Version-Release number of selected component (if applicable):
6.3.0


How reproducible:
Always, when quantity is passed via hammer

Steps to Reproduce:
1. hammer host subscription --attach --subscription-id $id --quantity 1

Actual results:
Failed to attach subscriptions to the host:
Task a5c8d982-3c25-4d21-b8e9-0ba3feae435d: ArgumentError: comparison of String with 0 failed

Expected results:
Subscription should be attached successfully.

Additional info:

If quantity is not passed, by default it takes quantity as 1 and this works.

Comment 1 Anand Agrawal 2018-03-22 09:03:42 UTC

*** This bug has been marked as a duplicate of bug 1558885 ***


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