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 1356126 - [RFE] Implement host disassociation command
Summary: [RFE] Implement host disassociation command
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 6.5.0
Assignee: Shira Maximov
QA Contact: Jan Hutař
URL:
Whiteboard:
: 1592550 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-13 12:58 UTC by Bryan Kearney
Modified: 2022-01-26 17:49 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-14 12:36:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 15674 0 Normal Closed Implement host disassociation command 2020-11-04 16:57:49 UTC
Red Hat Issue Tracker SAT-7742 0 None None None 2022-01-26 17:49:03 UTC
Red Hat Product Errata RHSA-2019:1222 0 None None None 2019-05-14 12:36:28 UTC

Description Bryan Kearney 2016-07-13 12:58:30 UTC
We are missing this bit completely from CLI.

From our mailing list:

Anyone know of a command line option in hammer to disassociate a host from
its compute resource?  It's easily done through the GUI however I am
attempting to do this as a part of a larger workflow built in something
like Ansible and need to be able to disassociate via CLI.

Comment 1 Bryan Kearney 2016-07-13 12:58:33 UTC
Created from redmine issue http://projects.theforeman.org/issues/15674

Comment 2 Ivan Necas 2018-06-19 11:38:52 UTC
*** Bug 1592550 has been marked as a duplicate of this bug. ***

Comment 3 Satellite Program 2018-07-09 08:14:00 UTC
Upstream bug assigned to mshira

Comment 4 Satellite Program 2018-07-09 08:14:04 UTC
Upstream bug assigned to mshira

Comment 5 Satellite Program 2018-07-27 12:12:47 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/15674 has been resolved.

Comment 9 Shira Maximov 2018-11-25 08:27:22 UTC
When you create a host that is connected to a compute resource it's automatically associate to the compute resource. 
In order to find out if the host is associate, you should go the the edit host screen, and then in the upper right corner you have a button "Disassociate host", which means the host is associate.

Comment 10 Jan Hutař 2018-11-27 06:46:14 UTC
Thank you Shira!

Looks good (host in question was not installed because of bug 1653558, but created in libvirt compute resource):

[root@satellite ~]# hammer host info --name ken-tenore.nodhcp.local | grep "Compute Resource"
Compute Resource:         laptop
[root@satellite ~]# hammer host disassociate --name ken-tenore.nodhcp.local
The host has been disassociated from VM
[root@satellite ~]# hammer host info --name ken-tenore.nodhcp.local | grep "Compute Resource"
[root@satellite ~]# hammer host disassociate --name ken-tenore.nodhcp.local
The host has been disassociated from VM
[root@satellite ~]# hammer host info --name ken-tenore.nodhcp.local | grep "Compute Resource"
[root@satellite ~]#

satellite-6.5.0-5.beta.el7sat.noarch

=> VERIFIED

Comment 14 errata-xmlrpc 2019-05-14 12:36:19 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-2019:1222


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