1. Proposed title of this feature request
Avoid the accidental Virtual Machines deletion from the compute resources when associated Host profile is deleted in Sat6 by setting a global configurable flag.
3. What is the nature and description of the request?
When a VM from a compute resource is registered into satellite, is linked to his host profile.
In consequence of that, if that host is deleted from Satellite, is deleted from the compute resource as well.
The request is to have a flag to avoid this behavior, but to maintain association, in order to be able to work and edit the host configuration (like puppet modules and so on).
4. Why does the customer need this? (List the business requirements here)
This feature is needed in order to avoid to have to de-associate VMs to prevent accidental VMs deletion.
5. How would the customer like to achieve this? (List the functional requirements here)
An option in foreman like:
by default could be kept to true, to maintain the usual behaviour, but optionally this could be set to false, and change the behaviour.
6. For each functional requirement listed in question 5, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.
a) activate the flag
b) delete and host profile
c) ensure the VM remain active and existent
8. Does the customer have any specific timeline dependencies?
The sooner the better: currently the UX of the customer with the product is highly impacted by this.
9. Is the sales team involved in this request and do they have any additional input?
11. Would the customer be able to assist in testing this functionality if implemented?
Created redmine issue http://projects.theforeman.org/issues/22737 from this bug
Marking bz1634114 as a dupe of this BZ. There are two use-cases we need to solve for:
1 - As a user, if I interactively delete a host record, I should (have the option to) be prompted if it is associated with a virtual machine.
2 - As a user, if I delete a host record via hammer/API, I should have the option to be force deletion of both the host record and virtual machine.
*** Bug 1634114 has been marked as a duplicate of this bug. ***
Upstream bug assigned to firstname.lastname@example.org
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/22737 has been resolved.
*** Bug 1650680 has been marked as a duplicate of this bug. ***
I don't think the description in settings makes sense:
"Destroy associated VM on host delete. When enabled, VMs linked to Hosts will be deleted on Compute Resource, meaning they can be re-associated or imported back to Satellite again. This does not automatically power off the VM"
This may have been caused by changing "Disassociate VMs before Host deletion" to "Destroy associated VM on host delete" which has opposite meaning and uncarefully editing the description.
When deleting a host with the flag set to true, a confirmation dialogue informing about VM deletion is correctly displayed. However, when bulk-deleting hosts, the confirmation dialogue is NOT displayed and the VMs are deleted immediately.
The finding in comment 33 is IMHO out of the scope for this bug. The scope was described in comment 17. This is not regression introduced by this change AFAIK. Given you can select multiple hosts that are virtual or not, the message would have to be too generic. Lukáš, if you want this to be changed, please open a separate RFE, it should not block this BZ.
Marek, do we want this warning to also appear in Hammer? I suppose not but asking just to be sure we only want this in WebUI.
If you had interactive confirmation in mind, that would feel inconsistent with other destructive operations. I'd say yes to make it part of help output, but only in generic form, hammer shouldn't change help based on server configuration I think. If you'd like to see that, I'd track under separate RFE, to no longer block this feature.
VERIFIED this on Sat 6.5 snap 11.
Deleting a host (even in bulk operation) that has a VM associated now warns that it will delete the VM, too, and points to the settings where this behavior can be changed. When it is changed, the warning changes, saying it will not delete the VM.
*** Bug 1504267 has been marked as a duplicate of this bug. ***
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.