Bug 1390619 - When running bootstrap with the --force option, it deletes the host AND if it is associated to a virtual machine via a compute resource, the virtual machine also.
Summary: When running bootstrap with the --force option, it deletes the host AND if it...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Bootstrap
Version: 6.2.3
Hardware: Unspecified
OS: Unspecified
high
high vote
Target Milestone: Unspecified
Assignee: Rich Jerrido
QA Contact: Jitendra Yejare
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-01 14:16 UTC by Rich Jerrido
Modified: 2020-01-17 16:06 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:54:37 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Rich Jerrido 2016-11-01 14:16:29 UTC
Description of problem:
When running bootstrap with the --force option, it deletes the host AND if it is associated to a virtual machine via a compute resource, the virtual machine also. 

Version-Release number of selected component (if applicable):
katello-client-bootstrap-1.1.0-2.el7sat.noarch

How reproducible:
100%

Steps to reproduce:

- create a host
- associate it with a virtual machine
- register it via bootstrap.py using --force

Actual results
virtual machine is deleted (as bootstrap deletes the foreman host) 

Expected results. 

virtual machine is not deleted and it is disassociated from the foreman host first.

Comment 1 Rich Jerrido 2016-11-01 14:18:27 UTC
This was addressed in upstream commit (https://github.com/Katello/katello-client-bootstrap/commit/dab153ed587f805db8bc82cad75815315d342221). moving to POST

Comment 3 Jitendra Yejare 2017-12-15 07:38:33 UTC
As per discussion with Zhenech on steps to verify this bug:
```
<jyejare> Zhenech, Looking for steps
<Zhenech> jyejare: you'd need a sat6 with a configured compute resource, and a vm running on that said CR
<jyejare> Zhenech, i have internal libvirt running a VM
<Zhenech> jyejare: now if you open the VM in satellite, it should list it as running on the CR (= sat knows where it runs).
<Zhenech> jyejare: now you run bootstrap with --force (because the VM is already registered), before the patch sat6 would actually also delete the VM itself from libvirt
<Zhenech> jyejare: after the patch, only the host in satellite is deleted and re-created
```


AS per above steps:
1. I created VM on internal libvirt CR
2. The VM was registered to satellite using AK
3. I ran bootstrap on VM(content host) with force option


Observation:
1. The host was re-registered but VM was not deleted as expected.

Changing the state to Verified !

Comment 4 Satellite 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


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