Bug 1321127 - Orchestration Provision to Azure destroys existing Resource Group and all it's contents
Summary: Orchestration Provision to Azure destroys existing Resource Group and all it'...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.5.0
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: GA
: 5.6.0
Assignee: Bill Wei
QA Contact: Jeff Teehan
URL:
Whiteboard: provider:azure:orchestration
Depends On:
Blocks: 1322082
TreeView+ depends on / blocked
 
Reported: 2016-03-24 17:55 UTC by Jeff Teehan
Modified: 2019-10-10 11:40 UTC (History)
9 users (show)

Fixed In Version: 5.6.0.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1322082 (view as bug list)
Environment:
Last Closed: 2016-06-29 15:44:46 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1348 0 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 18:50:04 UTC

Description Jeff Teehan 2016-03-24 17:55:45 UTC
Description of problem:
When I use the Orchestration Template to provision a VM, and I select an existing Resource Group, we're nuking the entire resource group and all of it's contents and recreating the resource group with only the new VM.

This is really bad unless I'm missing something.

Version-Release number of selected component (if applicable):
5.5.2
5.5.3

How reproducible:
Most if not all of the time.

Steps to Reproduce:
1.  Create an Azure resource group with some VMs and storage, etc.
2.  Create an Orchestration catalog item based on the default Azure template.
3.  Order the item.

Actual results:
Everything associated with the existing Azure Resources Group is destroyed and a new Resource Group is created with the same name but only the new VM.

Expected results:
Leave all the existing items intact.

Additional info:

Comment 2 Jeff Teehan 2016-03-24 19:46:01 UTC
Also, depending on the timing of the subsequent request, if the Template Image was in the Storage account associated with the Resource Group, then both the Storage Account and the Image are probably also gone, which would explain something I saw yesterday but didn't understand at the time.

Comment 6 Bill Wei 2016-03-29 21:00:36 UTC
This is NOT a bug. When a user select Complete mode to deploy the template, all resources not defined in the template will be deleted. This is documented in Microsoft Azure API:

Specifies the mode that is used to deploy resources. This value could be either Incremental or Complete. In Incremental mode, resources are deployed without deleting existing resources that are not included in the template. In complete mode resources are deployed and existing resources in the resource group not included in the template are deleted.

Comment 7 Bill Wei 2016-03-29 21:10:03 UTC
Here is the original document from Microsoft
https://msdn.microsoft.com/en-us/library/azure/dn790564.aspx

Comment 9 Jeff Teehan 2016-03-29 22:02:50 UTC
I'm not closing this.  Although you make a technically correct observation, the fact is somewhere down the line a user is going to have the entirety of their Azure system irreversibly deleted and I want to be on the record as having objected.

Comment 10 Greg McCullough 2016-03-29 22:46:23 UTC
John - Can you comment on this issue?  

The feature is working as designed as per Microsoft.  Do you think this option should be removed from the UI to protect users?  

Here are a couple of ideas:
1) If the default is "Incremental" the field could be removed from the dialog and still allow the back-end code to support the option which would require the user to add the field back into the dialog.

2) Enhancing the dialogs to include more information about this field.  Hover-text is supported but I do not think it would be sufficient.  The other currently available option is to add a new read-only text field to the dialog to explain the settings.  This would be a little odd as it would get passed around as dialog data like any other text box value, meaning it would show up as parameters passed to automate.

3) A new option to show the description text on the dialog all the time (instead of as hover-text) which would need to be implemented on both the Ops and Self-service UI.

Comment 11 Bill Wei 2016-03-29 22:57:48 UTC
Or simply append to the selection text such as

-------------------------------------------------
|Incremental                                    |
-------------------------------------------------
|Complete (Delete other resources in the group) |
-------------------------------------------------

Comment 12 Greg McCullough 2016-03-30 13:09:20 UTC
Bill - Your proposal seems prefect.

Jeff - If you agree we can implement that simple text change.

Comment 13 Jeff Teehan 2016-03-30 15:07:33 UTC
Let's do it.

The inclusion of the word delete should at least get people asking what is being deleted and why.  Perhaps even adding Default will guide most people who don't entirely know what this field means.

-------------------------------------------------
|Incremental (Default)                          |
-------------------------------------------------
|Complete (Delete other resources in the group) |
-------------------------------------------------

I appreciate the extra work involved.

Comment 15 CFME Bot 2016-03-31 21:40:44 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/c7c9ae88a04b9f00db7938086b96f59b77b96240

commit c7c9ae88a04b9f00db7938086b96f59b77b96240
Author:     Bill Wei <bilwei>
AuthorDate: Thu Mar 31 15:42:53 2016 -0400
Commit:     Bill Wei <bilwei>
CommitDate: Thu Mar 31 16:27:50 2016 -0400

    Add warnings to deploy Azure stack in complete mode
    
    Complete mode will delete all resources in the same group but not defined in the template. Reminding text is added to the provisioning dialog so that the user may know the consequence of the selection
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1321127

 .../orchestration_template_dialog_service.rb       | 29 +++++++++++++---------
 .../azure-single-vm-from-user-image.yml            |  8 +++---
 .../orchestration_template_dialog_service_spec.rb  |  5 +++-
 3 files changed, 26 insertions(+), 16 deletions(-)

Comment 16 CFME Bot 2016-04-01 20:42:42 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=6ad1dce0cc893a82bbbc9cfe92db7aff8145c3fd

commit 6ad1dce0cc893a82bbbc9cfe92db7aff8145c3fd
Author:     Bill Wei <bilwei>
AuthorDate: Thu Mar 31 15:42:53 2016 -0400
Commit:     Bill Wei <bilwei>
CommitDate: Fri Apr 1 09:17:44 2016 -0400

    Add warnings to deploy Azure stack in complete mode
    
    Complete mode will delete all resources in the same group but not defined in the template. Reminding text is added to the provisioning dialog so that the user may know the consequence of the selection
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1321127

 .../orchestration_template_dialog_service.rb       | 29 +++++++++++++---------
 .../azure-single-vm-from-user-image.yml            |  8 +++---
 .../orchestration_template_dialog_service_spec.rb  |  5 +++-
 3 files changed, 26 insertions(+), 16 deletions(-)

Comment 17 CFME Bot 2016-04-01 20:42:55 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=f15b5c646198645706b254c31f3b517872d995b4

commit f15b5c646198645706b254c31f3b517872d995b4
Merge: 7b0d5fe 6ad1dce
Author:     Greg McCullough <gmccullo>
AuthorDate: Fri Apr 1 15:50:24 2016 -0400
Commit:     Greg McCullough <gmccullo>
CommitDate: Fri Apr 1 15:50:24 2016 -0400

    Merge branch '5.5.z_azure_warning' into '5.5.z'
    
    Add warnings to deploy Azure stack in complete mode
    
    Complete mode will delete all resources in the same group but not defined in the template. Reminding text is added to the provisioning dialog so that the user may know the consequence of the selection
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1321127
    
    Original PR: https://github.com/ManageIQ/manageiq/pull/7622
    5.5.3 BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1322082
    
    Cherry-pick is clean
    
    See merge request !880

 .../orchestration_template_dialog_service.rb       | 29 +++++++++++++---------
 .../azure-single-vm-from-user-image.yml            |  8 +++---
 .../orchestration_template_dialog_service_spec.rb  |  5 +++-
 3 files changed, 26 insertions(+), 16 deletions(-)

Comment 19 Jeff Teehan 2016-04-18 16:30:07 UTC
Thanks so much for this fix.  Should save a lot of problems down the road.

Moving to verified.  Tested on 5.6.0.1 Beta 2 using https://10.16.7.174/vm_cloud/explorer

Comment 21 errata-xmlrpc 2016-06-29 15:44:46 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/RHBA-2016:1348


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