Bug 1356126 - [RFE] Implement host disassociation command
Summary: [RFE] Implement host disassociation command
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hammer
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
medium
medium vote
Target Milestone: Released
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: 2019-10-07 17:18 UTC (History)
5 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


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:1222 None None None 2019-05-14 12:36:28 UTC
Foreman Issue Tracker 15674 None None None 2016-07-13 12:58:31 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 pm-sat@redhat.com 2018-07-09 08:14:00 UTC
Upstream bug assigned to mshira@redhat.com

Comment 4 pm-sat@redhat.com 2018-07-09 08:14:04 UTC
Upstream bug assigned to mshira@redhat.com

Comment 5 pm-sat@redhat.com 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.