Bug 1632844

Summary: [NoMethodError]: undefined method `create_snapshot' for VM in Global Region
Product: Red Hat CloudForms Management Engine Reporter: Jared Deubel <jdeubel>
Component: ApplianceAssignee: Brandon Dunne <bdunne>
Status: CLOSED ERRATA QA Contact: Tasos Papaioannou <tpapaioa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 5.9.0CC: abellott, bdunne, obarenbo, simaishi, smallamp, tpapaioa
Target Milestone: GA   
Target Release: 5.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.10.0.17 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-07 23:03:43 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:

Description Jared Deubel 2018-09-25 16:09:38 UTC
Description of problem:
Customer is trying to invoke remote task from the global down to the remote region and it is failing with the following:

[----] I, [2018-09-24T05:19:35.391675 #5066:bdf114]  INFO -- : MIQ(Vm.invoke_api_tasks) Invoking task create_snapshot on collection vms, object 7838, with args {}
[----] E, [2018-09-24T05:19:35.392107 #5066:bdf114] ERROR -- : An error occurred while invoking remote tasks...Requeueing for 1 minute from now.
[----] E, [2018-09-24T05:19:35.399464 #5066:bdf114] ERROR -- : [NoMethodError]: undefined method `create_snapshot' for #<ManageIQ::API::Client::Resource::Vm:0x0000000012c930a8>  Method:[block in method_missing]
[----] E, [2018-09-24T05:19:35.399712 #5066:bdf114] ERROR -- : /opt/rh/cfme-gemset/gems/manageiq-api-client-0.3.0/lib/manageiq/api/client/resource.rb:48:in `method_missing'
/var/www/miq/vmdb/app/models/mixins/process_tasks_mixin.rb:119:in `block in invoke_api_tasks'
/var/www/miq/vmdb/app/models/mixins/process_tasks_mixin.rb:116:in `each'
/var/www/miq/vmdb/app/models/mixins/process_tasks_mixin.rb:116:in `invoke_api_tasks'
/var/www/miq/vmdb/app/models/mixins/process_tasks_mixin.rb:65:in `block in invoke_tasks_remote'
/var/www/miq/vmdb/app/models/mixins/process_tasks_mixin.rb:60:in `each'
/var/www/miq/vmdb/app/models/mixins/process_tasks_mixin.rb:60:in `invoke_tasks_remote'
/var/www/miq/vmdb/app/models/miq_queue.rb:449:in `block in dispatch_method'
/opt/rh/rh-ruby23/root/usr/share/ruby/timeout.rb:91:in `block in timeout'
/opt/rh/rh-ruby23/root/usr/share/ruby/timeout.rb:33:in `block in catch'
/opt/rh/rh-ruby23/root/usr/share/ruby/timeout.rb:33:in `catch'
/opt/rh/rh-ruby23/root/usr/share/ruby/timeout.rb:33:in `catch'
/opt/rh/rh-ruby23/root/usr/share/ruby/timeout.rb:106:in `timeout'
/var/www/miq/vmdb/app/models/miq_queue.rb:448:in `dispatch_method'
/var/www/miq/vmdb/app/models/miq_queue.rb:425:in `block in deliver'
/var/www/miq/vmdb/app/models/user.rb:254:in `with_user'
/var/www/miq/vmdb/app/models/user.rb:269:in `with_user_group'
/var/www/miq/vmdb/app/models/miq_queue.rb:425:in `deliver'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:104:in `deliver_queue_message'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:134:in `deliver_message'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:152:in `block in do_work'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:146:in `loop'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:146:in `do_work'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:329:in `block in do_work_loop'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:326:in `loop'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:326:in `do_work_loop'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:153:in `run'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:127:in `start'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:22:in `start_worker'
/var/www/miq/vmdb/app/models/miq_worker.rb:376:in `block in start_runner_via_fork'
/opt/rh/cfme-gemset/gems/nakayoshi_fork-0.0.3/lib/nakayoshi_fork.rb:24:in `fork'
/opt/rh/cfme-gemset/gems/nakayoshi_fork-0.0.3/lib/nakayoshi_fork.rb:24:in `fork'
/var/www/miq/vmdb/app/models/miq_worker.rb:374:in `start_runner_via_fork'
/var/www/miq/vmdb/app/models/miq_worker.rb:368:in `start_runner'
/var/www/miq/vmdb/app/models/miq_worker.rb:415:in `start'
/var/www/miq/vmdb/app/models/miq_worker.rb:266:in `start_worker'
/var/www/miq/vmdb/app/models/miq_worker.rb:153:in `block in sync_workers'
/var/www/miq/vmdb/app/models/miq_worker.rb:153:in `times'
/var/www/miq/vmdb/app/models/miq_worker.rb:153:in `sync_workers'
/var/www/miq/vmdb/app/models/miq_server/worker_management/monitor.rb:53:in `block in sync_workers'
/var/www/miq/vmdb/app/models/miq_server/worker_management/monitor.rb:50:in `each'
/var/www/miq/vmdb/app/models/miq_server/worker_management/monitor.rb:50:in `sync_workers'
/var/www/miq/vmdb/app/models/miq_server/worker_management/monitor.rb:22:in `monitor_workers'
/var/www/miq/vmdb/app/models/miq_server.rb:338:in `block in monitor'
/opt/rh/cfme-gemset/bundler/gems/cfme-gems-pending-3457c5b58220/lib/gems/pending/util/extensions/miq-benchmark.rb:11:in `realtime_store'
/opt/rh/cfme-gemset/bundler/gems/cfme-gems-pending-3457c5b58220/lib/gems/pending/util/extensions/miq-benchmark.rb:28:in `realtime_block'
/var/www/miq/vmdb/app/models/miq_server.rb:338:in `monitor'
/var/www/miq/vmdb/app/models/miq_server.rb:377:in `block (2 levels) in monitor_loop'
                                                                                                                                                                                                 

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

Comment 3 CFME Bot 2018-09-25 22:01:21 UTC
New commits detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/0af8deb433eb4dad3fb7ab05cd0cf0f1f2038e58
commit 0af8deb433eb4dad3fb7ab05cd0cf0f1f2038e58
Author:     Brandon Dunne <brandondunne>
AuthorDate: Tue Sep 25 14:17:38 2018 -0400
Commit:     Brandon Dunne <brandondunne>
CommitDate: Tue Sep 25 14:17:38 2018 -0400

    Add tests for instances and collection that do not respond to the method

    https://bugzilla.redhat.com/show_bug.cgi?id=1632844

 spec/models/mixins/process_tasks_mixin_spec.rb | 17 +
 1 file changed, 17 insertions(+)


https://github.com/ManageIQ/manageiq/commit/7d61e01bfb67734286472b3eed0f8304756730cf
commit 7d61e01bfb67734286472b3eed0f8304756730cf
Author:     Brandon Dunne <brandondunne>
AuthorDate: Mon Sep 24 17:43:59 2018 -0400
Commit:     Brandon Dunne <brandondunne>
CommitDate: Mon Sep 24 17:43:59 2018 -0400

    Rescue NoMethodError to prevent requeueing something that won't work

    https://bugzilla.redhat.com/show_bug.cgi?id=1632844

 app/models/mixins/process_tasks_mixin.rb | 12 +-
 1 file changed, 10 insertions(+), 2 deletions(-)

Comment 4 CFME Bot 2018-09-26 13:01:29 UTC
New commit detected on ManageIQ/manageiq/hammer:

https://github.com/ManageIQ/manageiq/commit/6ce2c45829616fef1ee2734655a3df42e1ef2bed
commit 6ce2c45829616fef1ee2734655a3df42e1ef2bed
Author:     Nick Carboni <ncarboni>
AuthorDate: Tue Sep 25 17:56:16 2018 -0400
Commit:     Nick Carboni <ncarboni>
CommitDate: Tue Sep 25 17:56:16 2018 -0400

    Merge pull request #18017 from bdunne/invoke_api_task_no_method

    Rescue NoMethodError to prevent requeueing something that won't work

    (cherry picked from commit 150b6ef427c9e7c28b227d96274ae892afa7025a)

    https://bugzilla.redhat.com/show_bug.cgi?id=1632844

 app/models/mixins/process_tasks_mixin.rb | 12 +-
 spec/models/mixins/process_tasks_mixin_spec.rb | 17 +
 2 files changed, 27 insertions(+), 2 deletions(-)

Comment 5 Tasos Papaioannou 2018-10-22 19:36:43 UTC
Verified on 5.10.0.20.

Comment 6 errata-xmlrpc 2019-02-07 23:03:43 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/RHSA-2019:0212