Bug 1300720 - remove_from_provider method does not delete from provider for VMs not provisioned by CF version 3.2
remove_from_provider method does not delete from provider for VMs not provisi...
Status: CLOSED DUPLICATE of bug 1300559
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate (Show other bugs)
5.4.0
All All
high Severity high
: GA
: 5.6.0
Assigned To: Tina Fitzgerald
Dave Johnson
: ZStream
Depends On:
Blocks: 1300738
  Show dependency treegraph
 
Reported: 2016-01-21 09:27 EST by Josh Carter
Modified: 2016-01-21 10:25 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1300738 (view as bug list)
Environment:
Last Closed: 2016-01-21 10:25:17 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Josh Carter 2016-01-21 09:27:31 EST
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 10:25:17 EST

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

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