Bug 1291274 - RFE: Support Azure VM retirement
Summary: RFE: Support Azure VM retirement
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
high
high
Target Milestone: GA
: 5.5.3
Assignee: Bill Wei
QA Contact: Jeff Teehan
URL:
Whiteboard: provider:azure
Depends On: 1290908 1298193
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-14 13:43 UTC by John Prause
Modified: 2016-04-13 18:39 UTC (History)
12 users (show)

Fixed In Version: 5.5.3.2
Doc Type: Enhancement
Doc Text:
Clone Of: 1290908
Environment:
Last Closed: 2016-04-13 18:39:53 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:0616 0 normal SHIPPED_LIVE CFME 5.5.3 bug fixes and enhancement update 2016-04-13 22:38:44 UTC

Comment 5 Jeff Teehan 2016-01-20 22:41:49 UTC
I'm having some issues with this.  I created the tags, but the CF GUI and evm log have errors.  Here is a log snippet.

The CFME instance is available at https://10.16.6.21/vm_cloud/explorer if you want to check the tags and look around.

[----] E, [2016-01-20T17:32:41.709365 #12281:879998] ERROR -- : <AutomationEngine> State=<CheckPreRetirement> running  raised exception: <Method [check_pre_retirement] not found in class [ManageIQ/Cloud/VM/Retirement/StateMachines/Methods]>
[----] E, [2016-01-20T17:32:42.561300 #12281:879998] ERROR -- : MIQ(MiqAeEngine.deliver) Error delivering {:event_type=>"request_vm_retire", "VmOrTemplate::vm"=>114000000000081, :vm_id=>114000000000081, :retirement_initiator=>"user", :host=>nil, :user_id=>"admin", :type=>"ManageIQ::Providers::Azure::CloudManager::Vm", "MiqEvent::miq_event"=>114000000014188, :miq_event_id=>114000000014188, "EventStream::event_stream"=>114000000014188, :event_stream_id=>114000000014188} for object [ManageIQ::Providers::Azure::CloudManager::Vm.114000000000081] with state [] to Automate:

Comment 6 Bill Wei 2016-01-20 23:05:12 UTC
Evidently method check_pre_retirement does not exist in the namespace. There was a upstream PR that was missed from merging to the downstream build.

https://bugzilla.redhat.com/show_bug.cgi?id=1298193 is likely caused by the same problem.

Comment 7 Jeff Teehan 2016-01-21 17:12:33 UTC
Implementation is blocked as described in comment 6

Comment 8 Jeff Teehan 2016-01-24 19:51:08 UTC
I need to kick back any RFEs so that the docs aren't wrong.  This is blocked per Bill Wei as described above.

I'm sure it's fixed, but not for 5.5.2 unless we respin.

Comment 10 Tina Fitzgerald 2016-02-11 20:15:00 UTC
This issue has been resolved: http://gitlab.cloudforms.lab.eng.rdu2.redhat.com/cloudforms/cfme/merge_requests/741

Comment 12 Jeff Teehan 2016-03-22 18:30:41 UTC
This is still not working on 5.5.3.2 as the blocker is still in modified state.

I don't know if the Fixed In version needs to change or the other fix is missing, but I need to put it back ON_DEV for now.

[----] E, [2016-03-22T14:26:05.397410 #12267:1251998] ERROR -- : MIQ(MiqQueue#m_callback) Message id: [321000000023240]: undefined method `vm_destroy' for #<ManageIQ::Providers::Azure::CloudManager:0x00000013b9f7b8>
[----] E, [2016-03-22T14:26:05.397511 #12267:1251998] ERROR -- : MIQ(MiqQueue#m_callback) backtrace: /opt/rh/cfme-gemset/gems/activemodel-4.2.6/lib/active_model/attribute_methods.rb:433:in `method_missing'
[root@10-16-7-59 log]#

Comment 13 Tina Fitzgerald 2016-03-22 19:20:50 UTC
Hi Jeff,

Can I access your test environment?

Thanks,
Tina

Comment 14 Jeff Teehan 2016-03-22 19:31:51 UTC
https://10.16.7.59 - usual creds.

You'll have to hit me up privately for the azure creds if you need those.  Use the VM az-prov-01

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

commit d74e68f366d5c0baa812929d33a1ce7e78596662
Merge: f15b5c6 482169c
Author:     Greg McCullough <gmccullo>
AuthorDate: Fri Apr 1 15:51:56 2016 -0400
Commit:     Greg McCullough <gmccullo>
CommitDate: Fri Apr 1 15:51:56 2016 -0400

    Merge branch 'cherry-pick-pr5703' into '5.5.z'
    
    refactor Azure cloud manager VM operations
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1291274
    
    https://github.com/ManageIQ/manageiq/pull/5703
    
    Clean cherry-pick.
    
    See merge request !869

 app/models/manageiq/providers/azure/cloud_manager.rb     | 16 ++++++++++------
 .../providers/azure/cloud_manager/vm/operations.rb       |  6 ++++++
 .../providers/azure/cloud_manager/vm/operations/power.rb | 15 +++++++++++++++
 3 files changed, 31 insertions(+), 6 deletions(-)

Comment 17 Jeff Teehan 2016-04-06 23:15:12 UTC
This works perfectly the first time.  No tags necessary and no errors.

04/06/16 22:55:59 UTC	04/06/16 22:55:53 UTC	Finished	Task completed successfully	Test5533a: 'retire_now'

Used the standard Azure instance and a VM that was provisioned with Orchestration template.  That's pretty much end to end working.

Used 5.5.3.3 to verify on https://10.16.6.125/vm_cloud/explorer

Comment 19 errata-xmlrpc 2016-04-13 18:39:53 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.