Bug 1291274 - RFE: Support Azure VM retirement
RFE: Support Azure VM retirement
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate (Show other bugs)
Unspecified Unspecified
high Severity high
: GA
: 5.5.3
Assigned To: Bill Wei
Jeff Teehan
: FutureFeature, ZStream
Depends On: 1290908 1298193
  Show dependency treegraph
Reported: 2015-12-14 08:43 EST by John Prause
Modified: 2016-04-13 14:39 EDT (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 1290908
Last Closed: 2016-04-13 14:39:53 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Comment 5 Jeff Teehan 2016-01-20 17:41:49 EST
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 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 18:05:12 EST
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 12:12:33 EST
Implementation is blocked as described in comment 6
Comment 8 Jeff Teehan 2016-01-24 14:51:08 EST
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 15:15:00 EST
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 14:30:41 EDT
This is still not working on 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 15:20:50 EDT
Hi Jeff,

Can I access your test environment?

Comment 14 Jeff Teehan 2016-03-22 15:31:51 EDT - 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 16:43:01 EDT
New commit detected on cfme/5.5.z:

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

    Merge branch 'cherry-pick-pr5703' into '5.5.z'
    refactor Azure cloud manager VM operations
    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 19:15:12 EDT
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 to verify on
Comment 19 errata-xmlrpc 2016-04-13 14:39:53 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.


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