Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
<pre>
hammer subscription attach --content-host-id $id --subscription-id $id
-or-
hammer content-host subscription --attach --subscription-id $id
</pre>
Although subscriptions are normally added to content hosts by running subscription-manager directly on the host itself, there are cases where being able to do it via scripting w/ hammer is better.
This would move towards parity between hammer and the UI
FAILQA on tfm-rubygem-hammer_cli-0.8.0-1
These commands return error:
> hammer host subscription attach --host hostname.redhat.com --subscription-id 1
Failed to attach subscriptions to the host:
Task 98c9592e-9cee-46e2-af87-f9e49a416ef4: NoMethodError: undefined method `[]' for nil:NilClass
> hammer host subscription attach --host-id 2 --subscription-id 1
Failed to attach subscriptions to the host:
Task a90acd79-8792-4507-8d5a-49928d8b5bf2: NoMethodError: undefined method `[]' for nil:NilClass
When we try to remove subscription via WebUI, we get this error message. Maybe it is the same problem.
An error occurred removing the subscriptions.Task 86ec0287-8d8b-43e5-a3ff-aff3c4844195: NoMethodError: undefined method `[]' for nil:NilClass
DOC:
In help, there are missing description for "remove" subcommand.
> hammer host subscription --help
Usage:
hammer host subscription [OPTIONS] SUBCOMMAND [ARG] ...
Parameters:
SUBCOMMAND subcommand
[ARG] ... subcommand arguments
Subcommands:
attach Add a subscription to a host
auto-attach Trigger an auto-attach of subscriptions
register Register a host with subscription and information.
remove
unregister Unregister the host as a subscription consumer
Options:
-h, --help print help
I think, we should have a method for getting of current subscription for host.
Information, which we can see in host-info are insufficient.
> hammer host info --id 2
...
Subscription Information:
UUID: a861796e-1e17-4a83-9a17-e60b1ae1ed9e
Last Checkin: 2016-10-19 11:59:38 UTC
Service Level:
Release Version:
Autoheal: true
Registered At: 2016-10-19 11:59:39 UTC
Verified on tfm-rubygem-hammer_cli-0.11.0.1-1
The problem with error is gone.
As was mentioned above, the description for "remove" is still missing.
Comment 20Satellite Program
2018-02-21 16:54:37 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/RHSA-2018:0336