This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1478520 - VM Migrate doesn't create notifications or log messages when migrations fail.
VM Migrate doesn't create notifications or log messages when migrations fail.
Status: ON_DEV
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate (Show other bugs)
5.8.0
Unspecified Unspecified
medium Severity medium
: GA
: 5.8.3
Assigned To: William Fitzgerald
Shveta
: ZStream
Depends On: 1478462
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-04 14:12 EDT by Satoe Imaishi
Modified: 2017-10-04 14:27 EDT (History)
6 users (show)

See Also:
Fixed In Version: 5.8.2.0
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1478462
Environment:
Last Closed:
Type: ---
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)
Comment 2 CFME Bot 2017-08-04 14:18:10 EDT
New commit detected on ManageIQ/manageiq-content/fine:
https://github.com/ManageIQ/manageiq-content/commit/b8bfb5d7602baba2ae2aa11fba5a71ef180b29e6

commit b8bfb5d7602baba2ae2aa11fba5a71ef180b29e6
Author:     Madhu Kanoor <mkanoor@redhat.com>
AuthorDate: Thu Jun 29 16:50:13 2017 -0400
Commit:     Satoe Imaishi <simaishi@redhat.com>
CommitDate: Fri Aug 4 14:13:04 2017 -0400

    Merge pull request #125 from billfitzgerald0120/vm_migrate
    
    Enhanced messaging and error notification for update_migration_status method.
    (cherry picked from commit 7a789402519c390e8b21c64f0fe5566f4987ff54)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1478520

 .../__methods__/update_migration_status.rb         | 64 +++++++++++++++++----
 .../__methods__/update_migration_status_spec.rb    | 65 ++++++++++++++++++++++
 2 files changed, 119 insertions(+), 10 deletions(-)
 create mode 100644 spec/content/automate/ManageIQ/Infrastructure/VM/Migrate/StateMachines/VMMigrate.class/__methods__/update_migration_status_spec.rb
Comment 3 Shveta 2017-08-29 01:51:06 EDT
Create a Migrate VM request for a VM .
Didn't fill options for host .
Logs show error but UI shows request status - "Migrated"

Appliance : https://10.8.199.115

Logs 
==============
[----] I, [2017-08-29T01:48:54.271334 #2115:4b1130]  INFO -- : Q-task_id([vm_migrate_task_36]) <AEMethod [/ManageIQ/Infrastructure/VM/Migrate/StateMachines/VMMigrate/update_migration_status]> Ending
[----] I, [2017-08-29T01:48:54.271554 #2115:4b1130]  INFO -- : Q-task_id([vm_migrate_task_36]) Method exited with rc=MIQ_OK
[----] I, [2017-08-29T01:48:54.272239 #2115:4b1130]  INFO -- : Q-task_id([vm_migrate_task_36]) Processing State=[EmailOwner]
[----] I, [2017-08-29T01:48:54.272670 #2115:4b1130]  INFO -- : Q-task_id([vm_migrate_task_36]) Following Relationship [miqaedb:/Infrastructure/VM/Migrate/Email/VmMigrateTask_Complete?event=vm_migrated#create]
[----] I, [2017-08-29T01:48:54.324733 #2115:4b1130]  INFO -- : Q-task_id([vm_migrate_task_36]) Updated namespace [miqaedb:/Infrastructure/VM/Migrate/Email/VmMigrateTask_Complete?event=vm_migrated#create  ManageIQ/Infrastructure/VM/Migrate]
[----] I, [2017-08-29T01:48:54.389090 #2115:4b1130]  INFO -- : Q-task_id([vm_migrate_task_36]) Updated namespace [Infrastructure/VM/Migrate/Email/vmmigratetask_complete  ManageIQ/Infrastructure/VM/Migrate]
[----] I, [2017-08-29T01:48:54.403571 #2115:4b1130]  INFO -- : Q-task_id([vm_migrate_task_36]) Invoking [inline] method [/ManageIQ/Infrastructure/VM/Migrate/Email/VmMigrateTask_Complete] with inputs [{}]
[----] I, [2017-08-29T01:48:54.404906 #2115:4b1130]  INFO -- : Q-task_id([vm_migrate_task_36]) <AEMethod [/ManageIQ/Infrastructure/VM/Migrate/Email/VmMigrateTask_Complete]> Starting 
[----] I, [2017-08-29T01:48:55.116751 #2115:5938898]  INFO -- : Q-task_id([vm_migrate_task_36]) <AEMethod vmmigratetask_complete> Inspecting miq_task: #<MiqAeServiceVmMigrateTask:0x5be43d0 @object=#<VmMigrateTask id: 36, description: "VM Migrate for: nansari_report - Storage: NFS-Data...", state: "migrated", request_type: "vm_migrate", userid: "admin", options: {:src_ids=>["21"], :miq_request_dialog_name=>"vm_migrate_dialogs", :current_tab_key=>:environment, :owner_phone=>nil, :owner_country=>nil, :owner_phone_mobile=>nil, :owner_title=>nil, :owner_first_name=>nil, :owner_manager=>nil, :owner_address=>nil, :owner_company=>nil, :owner_last_name=>nil, :owner_manager_mail=>nil, :owner_city=>nil, :owner_department=>nil, :owner_load_ldap=>nil, :owner_manager_phone=>nil, :owner_state=>nil, :owner_office=>nil, :owner_zip=>nil, :owner_email=>"sshveta@redhat.com", :request_notes=>nil, :placement_cluster_name=>[nil, nil], :cluster_filter=>[nil, nil], :host_filter=>[nil, nil], :ds_filter=>[nil, nil], :placement_host_name=>[nil, nil], :placement_ds_name=>[1, "NFS-Datastore-1"], :rp_filter=>[nil, nil], :placement_rp_name=>[nil, nil], :placement_dc_name=>[nil, nil], :schedule_type=>["immediately", "Immediately on Approval"], :schedule_time=>Wed, 30 Aug 2017 00:00:00 UTC +00:00, :disk_format=>["unchanged", "Default"], :start_date=>"8/30/2017", :start_hour=>"00", :start_min=>"00", :src_vm_id=>[nil, nil], :tag_ids=>[], :requester_group=>"EvmGroup-super_administrator", :owner_group=>nil, :delivered_on=>2017-08-29 05:47:59 UTC}, created_on: "2017-08-29 05:48:00", updated_on: "2017-08-29 05:48:54", message: "Emailing Owner", status: "Ok", type: "VmMigrateTask", miq_request_id: 26, source_id: 21, source_type: "Vm", destination_id: nil, destination_type: nil, miq_request_task_id: nil, phase: nil, phase_context: {}, tenant_id: 2>, @virtual_columns=["href_slug", "region_description", "region_number"], @associations=["destination", "miq_request", "miq_request_task", "miq_request_tasks", "source", "tenant"]>
[----] I, [2017-08-29T01:48:55.132718 #2115:5938898]  INFO -- : Q-task_id([vm_migrate_task_36]) <AEMethod vmmigratetask_complete> VM Owner: nil
[----] E, [2017-08-29T01:48:55.134167 #2115:5938898] ERROR -- : Q-task_id([vm_migrate_task_36]) <AEMethod vmmigratetask_complete> The following error occurred during method evaluation:
[----] E, [2017-08-29T01:48:55.137094 #2115:5938898] ERROR -- : Q-task_id([vm_migrate_task_36]) <AEMethod vmmigratetask_complete>   NoMethodError: undefined method `email' for nil:NilClass
[----] E, [2017-08-29T01:48:55.138437 #2115:5938898] ERROR -- : Q-task_id([vm_migrate_task_36]) <AEMethod vmmigratetask_complete>   
[----] E, [2017-08-29T01:48:55.146281 #2115:5938898] ERROR -- : Q-task_id([vm_migrate_task_36]) Method STDERR: /ManageIQ/Infrastructure/VM/Migrate/Email/VmMigrateTask_Complete:30:in `<main>': undefined method `email' for nil:NilClass (NoMethodError)
[----] I, [2017-08-29T01:48:55.180660 #2115:4b1130]  INFO -- : Q-task_id([vm_migrate_task_36]) <AEMethod [/ManageIQ/Infrastructure/VM/Migrate/Email/VmMigrateTask_Complete]> Ending
[----] E, [2017-08-29T01:48:55.181573 #2115:4b1130] ERROR -- : Q-task_id([vm_migrate_task_36]) Aborting instantiation (unknown method return code) because [Method exited with rc=Unknown RC: [1]]
[----] E, [2017-08-29T01:48:55.182485 #2115:4b1130] ERROR -- : Q-task_id([vm_migrate_task_36]) State=<EmailOwner> running  raised exception: <Method exited with rc=Unknown RC: [1]>
[----] W, [2017-08-29T01:48:55.182741 #2115:4b1130]  WARN -- : Q-task_id([vm_migrate_task_36]) Error in State=[EmailOwner]
[----] I, [2017-08-29T01:48:55.183083 #2115:4b1130]  INFO -- : Q-task_id([vm_migrate_task_36]) In State=[EmailOwner], invoking [on_error] method=[update_migration_status(status => 'Error Emailing Owner')]
[----] I, [2017-08-29T01:48:55.943187 #2115:4b1130]  INFO -- : Q-task_id([vm_migrate_task_36]) Updated namespace [Infrastructure/VM/Migrate/StateMachines/VMMigrate/update_migration_status  ManageIQ/Infrastructure/VM/Migrate/StateMachines]
[----] I
Comment 4 William Fitzgerald 2017-09-19 15:41:03 EDT
Shveta,

You need this PR when it is merged.

https://github.com/ManageIQ/manageiq-content/pull/177

This fixes the Vm Migrate email error you are getting.

I will update this ticket when it is merged.

Thanks

Billy
Comment 5 William Fitzgerald 2017-09-20 11:52:57 EDT
Shveta,


The PR was merged and once it is backported, this should work.

Thanks

Billy
Comment 6 Shveta 2017-09-20 13:17:22 EDT
Will check in next 5.8 build .

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