Bug 1301149 - Unable to retire VMs which are provisioned using cloudforms 3.0 version
Summary: Unable to retire VMs which are provisioned using cloudforms 3.0 version
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: GA
: 5.5.3
Assignee: Tina Fitzgerald
QA Contact: Dmitry Misharov
URL:
Whiteboard:
Depends On: 1300559
Blocks: 1300738
TreeView+ depends on / blocked
 
Reported: 2016-01-22 17:47 UTC by Chris Pelland
Modified: 2019-10-10 10:58 UTC (History)
11 users (show)

Fixed In Version: 5.5.3.2
Doc Type: Bug Fix
Doc Text:
Previously, virtual machines provisioned using a version of Red Hat CloudForms 3.0 could not be retired using Automate methods. This was caused by the retirement state machine requiring either the miq_provision parameter or tags, which were not present in all versions of CloudForms 3.0 provisioned virtual machines. This has been fixed by removing the requirement for miq_provision and tags from the remove_from_provider code in the retirement state machine.
Clone Of: 1300559
Environment:
Last Closed: 2016-04-13 18:41:45 UTC
Category: Bug
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:0616 0 normal SHIPPED_LIVE CFME 5.5.3 bug fixes and enhancement update 2016-04-13 22:38:44 UTC

Comment 1 CFME Bot 2016-02-10 19:54:24 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=0b8f8d758237a37a9d29998dc48da5086410c1ea

commit 0b8f8d758237a37a9d29998dc48da5086410c1ea
Merge: e0f444e ef77751
Author:     Greg McCullough <gmccullo>
AuthorDate: Wed Feb 10 14:27:40 2016 -0500
Commit:     Greg McCullough <gmccullo>
CommitDate: Wed Feb 10 14:27:40 2016 -0500

    Merge branch 'cherry_pick_retirement_tag_fix' into '5.5.z'
    
    Automate - Retirement - Remove miq_provision and tag code
    
    from the cloud/infra remove_from_provider methods.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1301149
    
    Original:
    https://bugzilla.redhat.com/show_bug.cgi?id=1300559
    https://github.com/ManageIQ/manageiq/pull/6290
    
    Clean cherry-pick.
    
    See merge request !745

 .../Methods.class/__methods__/remove_from_provider.rb          | 10 +++-------
 .../Methods.class/__methods__/remove_from_provider.rb          | 10 +++-------
 .../unit/method_validation/remove_from_provider_spec.rb        |  1 -
 3 files changed, 6 insertions(+), 15 deletions(-)

Comment 3 Dmitry Misharov 2016-03-31 08:20:20 UTC
Tina, please help to reproduce this bug. I imported enclosed production automation_code.zip. Should I edit /ManageIQ/Infrastructure/VM/Retirement/StateMachines/Methods/RemoveFromProvider class?

Comment 4 Tina Fitzgerald 2016-03-31 15:37:43 UTC
Hi Dmitry,

To reproduce the issue:
1. Add a provider that you have provisioned a VM on from a different server.
2. Select "Refresh Relationships and Power States".
3. Select "Retire Now" on the VM that can be deleted.
4. When retirement has completed. you'll notice the VM still exists(on the provider and VMDB) and is marked as 'retired'. 

To validate the fix:
Repeat steps 1-3 above. 
You'll notice the VM has been deleted from the provider and the VMDB.
 
Let me know if you have any problems or questions. If you're having issues, provide me the IP, credentials, and VM and I'll take a look.

Regards,
Tina

Comment 5 Dmitry Misharov 2016-04-01 10:56:12 UTC
Thanks Tina. Tested and verified in 5.5.3.2.20160318152106_92d2d67.

Comment 7 errata-xmlrpc 2016-04-13 18:41:45 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:0616


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