Bug 1300738

Summary: remove_from_provider method does not delete from provider for VMs not provisioned by CF version 3.2
Product: Red Hat CloudForms Management Engine Reporter: Chris Pelland <cpelland>
Component: AutomateAssignee: Tina Fitzgerald <tfitzger>
Status: CLOSED DUPLICATE QA Contact: Dave Johnson <dajohnso>
Severity: high Docs Contact:
Priority: high    
Version: 5.4.0CC: cpelland, dajohnso, gmccullo, jhardy, jocarter, mkanoor, obarenbo, tfitzger
Target Milestone: GAKeywords: ZStream
Target Release: 5.5.3   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1300720 Environment:
Last Closed: 2016-01-21 15:29:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1300559, 1300720, 1301149    
Bug Blocks:    

Description Chris Pelland 2016-01-21 15:20:12 UTC
+++ This bug was initially created as a clone of Bug #1300720 +++

Description of problem:

We noticed an error during retirement and would like some support on it.

This is a production issue.

We are using Cloudforms 3.2 and we have a retirement state machine:
[/Customer/Intuit/Retirement/StateMachines/VMRetirementLocal/Default]

This state machine has a state called "DeleteFromProvider" that calls a factory instance to delete a vm:
[/ManageIQ/Infrastructure/VM/Retirement/StateMachines/Methods/RemoveFromProvider]

OnEntry of the state "DeleteFromProvider", a special method to dump root is run:
[/Customer/Intuit/Retirement/StateMachines/VMRetirementLocal/update_retirement_status]

We find that the logs show a VM exists:
[----] I, [2016-01-19T18:51:07.597732 #32632:883239c]  INFO -- : Q-task_id([automation_task_702000000008929]) <AEMethod update_retirement_status> update_retirement_status - Root:<$evm.root> Attribute - vm_id: 702000000004926
[----] I, [2016-01-19T18:51:07.596606 #32632:883239c]  INFO -- : Q-task_id([automation_task_702000000008929]) <AEMethod update_retirement_status> update_retirement_status - Root:<$evm.root> Attribute - vm: pprdqbows40a.ie.intuit.net

In the factory method "remove_from_provider", if vm is not nil AND (vm has miq_provision OR tagged with lifecycle/retire_full), then it should retire.

But it does not retire. The (lack of) log statements show that it never enters this block.

Further investigation showed that it looks like VM objects created in CF3.0 do not have a miq_provision reference while VM objects created in CF3.2 do have a miq_provision reference.

Should 3.0 original objects have been given a "dummy" reference? Should old objects be tagged with lifecyle/retire_full manually?


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Greg McCullough 2016-01-21 15:29:05 UTC

*** This bug has been marked as a duplicate of bug 1300559 ***