Bug 1301149 - Unable to retire VMs which are provisioned using cloudforms 3.0 version
Unable to retire VMs which are provisioned using cloudforms 3.0 version
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate (Show other bugs)
5.4.0
Unspecified Unspecified
unspecified Severity urgent
: GA
: 5.5.3
Assigned To: Tina Fitzgerald
Dmitry Misharov
: ZStream
Depends On: 1300559
Blocks: 1300738
  Show dependency treegraph
 
Reported: 2016-01-22 12:47 EST by Chris Pelland
Modified: 2016-04-13 14:41 EDT (History)
11 users (show)

See Also:
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.
Story Points: ---
Clone Of: 1300559
Environment:
Last Closed: 2016-04-13 14:41:45 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: Bug
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 1 CFME Bot 2016-02-10 14:54:24 EST
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@redhat.com>
AuthorDate: Wed Feb 10 14:27:40 2016 -0500
Commit:     Greg McCullough <gmccullo@redhat.com>
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 04:20:20 EDT
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 11:37:43 EDT
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 06:56:12 EDT
Thanks Tina. Tested and verified in 5.5.3.2.20160318152106_92d2d67.
Comment 7 errata-xmlrpc 2016-04-13 14:41:45 EDT
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.