Bug 1209653 - Rhev PXE provision error with monitoring power states
Summary: Rhev PXE provision error with monitoring power states
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Provisioning
Version: 5.3.0
Hardware: All
OS: All
high
medium
Target Milestone: GA
: 5.3.5
Assignee: Brandon Dunne
QA Contact: Aziza Karol
URL:
Whiteboard:
: 1239126 (view as bug list)
Depends On: 1202816
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-07 22:32 UTC by Brandon Dunne
Modified: 2019-07-11 08:54 UTC (History)
14 users (show)

Fixed In Version: 5.3.5.3
Doc Type: Bug Fix
Doc Text:
In the previous version of CloudForms Management Engine, virtual machine provisioning with PXE could fail with a RHEVM API error. This happened when the virtual machine's state in VMDB was stale. This was fixed by updating the code to verify that the destination virtual machine was turned off in the provider before queuing a refresh. PXE provisioning for virtual machines now completes successfully in the new version of CloudForms Management Engine.
Clone Of: 1202816
Environment:
Last Closed: 2015-07-15 12:55:10 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-2015:1223 0 normal SHIPPED_LIVE cfme (5.3.5) bug fix and enhancement update 2015-07-15 16:54:20 UTC

Comment 2 Aziza Karol 2015-07-02 10:52:42 UTC
VM PXE provision fails with the following error:

evm.log:
[----] E, [2015-07-02T10:35:49.401785 #28900:f0e808] ERROR -- : Q-task_id([miq_provision_26]) MIQ(MiqProvisionRedhatViaPxe#provision_error) [[NoMethodError]: undefined method `status' for #<RhevmVm:0x0000000a8631c0>] encountered during phase [poll_destination_powered_off_in_provider]
[----] E, [2015-07-02T10:35:49.402088 #28900:f0e808] ERROR -- : Q-task_id([miq_provision_26]) /var/www/miq/lib/RedHatEnterpriseVirtualizationManagerAPI/rhevm_object.rb:265:in `method_missing'
/var/www/miq/vmdb/app/models/mixins/provider_object_mixin.rb:16:in `block in with_provider_object'
/var/www/miq/vmdb/app/models/ems_redhat.rb:53:in `with_provider_connection'
/var/www/miq/vmdb/app/models/mixins/provider_object_mixin.rb:13:in `with_provider_object'
/var/www/miq/vmdb/app/models/miq_provision_redhat/state_machine.rb:62:in `powered_off_in_provider?'
/var/www/miq/vmdb/app/models/miq_provision_redhat/state_machine.rb:52:in `poll_destination_powered_off_in_provider'
/var/www/miq/vmdb/app/models/miq_request_task/state_machine.rb:26:in `signal'
/var/www/miq/vmdb/app/models/miq_provision_redhat_via_pxe/state_machine.rb:34:in `boot_from_network'
/var/www/miq/vmdb/app/models/miq_request_task/state_machine.rb:26:in `signal'
/var/www/miq/vmdb/app/models/miq_provision_redhat_via_pxe/state_machine.rb:17:in `create_pxe_configuration_file'
/var/www/miq/vmdb/app/models/miq_request_task/state_machine.rb:26:in `signal'
/var/www/miq/vmdb/app/models/miq_provision_redhat_via_pxe/state_machine.rb:8:in `customize_destination'
/var/www/miq/vmdb/app/models/miq_request_task/state_machine.rb:26:in `signal'
/var/www/miq/vmdb/app/models/miq_provision/state_machine.rb:26:in `poll_destination_in_vmdb'
/var/www/miq/vmdb/app/models/miq_queue.rb:361:in `block in deliver'
/opt/rh/ruby193/root/usr/share/ruby/timeout.rb:69:in `timeout'
/var/www/miq/vmdb/app/models/miq_queue.rb:357:in `deliver'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:107:in `deliver_queue_message'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:135:in `deliver_message'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:152:in `block in do_work'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:146:in `loop'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:146:in `do_work'
/var/www/miq/vmdb/lib/workers/worker_base.rb:317:in `block in do_work_loop'
/var/www/miq/vmdb/lib/workers/worker_base.rb:314:in `loop'
/var/www/miq/vmdb/lib/workers/worker_base.rb:314:in `do_work_loop'
/var/www/miq/vmdb/lib/workers/worker_base.rb:135:in `run'
/var/www/miq/vmdb/lib/workers/worker_base.rb:123:in `start'
/var/www/miq/vmdb/lib/workers/worker_base.rb:23:in `start_worker'
/var/www/miq/vmdb/lib/workers/bin/worker.rb:5:in `<top (required)>'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/commands/runner.rb:52:in `eval'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/commands/runner.rb:52:in `<top (required)>'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/commands.rb:64:in `require'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/commands.rb:64:in `<top (required)>'
script/rails:6:in `require'
script/rails:6:in `<main>'
[----] I, [2015-07-02T10:35:49.436870 #26596:de0814

version:5.3.5.1.20150630091250_5515226

Comment 4 Greg McCullough 2015-07-06 14:29:48 UTC
*** Bug 1239126 has been marked as a duplicate of this bug. ***

Comment 5 CFME Bot 2015-07-06 18:17:19 UTC
New commit detected on cfme/5.3.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=6fe52e6278df5b6981570f196b6e9e848ee82d29

commit 6fe52e6278df5b6981570f196b6e9e848ee82d29
Merge: 2ba67db dc358e7
Author:     Greg McCullough <gmccullo>
AuthorDate: Mon Jul 6 14:16:35 2015 -0400
Commit:     Greg McCullough <gmccullo>
CommitDate: Mon Jul 6 14:16:35 2015 -0400

    Merge branch '53z_fix_power_status_on_rhevm_vm' into '5.3.z'
    
    Status method doesn't exist on RHEVM vm, use hash accessor
    
    Status method doesn't exist on RHEVM vm, use hash accessor
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1209653
    
    See merge request !153

 vmdb/app/models/miq_provision_redhat/state_machine.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 6 CFME Bot 2015-07-06 18:17:24 UTC
New commit detected on cfme/5.3.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=dc358e72a065a25c8d9e6dd21b0d71fdc5616451

commit dc358e72a065a25c8d9e6dd21b0d71fdc5616451
Author:     Brandon Dunne <bdunne>
AuthorDate: Mon Jul 6 10:25:29 2015 -0400
Commit:     Brandon Dunne <bdunne>
CommitDate: Mon Jul 6 10:25:29 2015 -0400

    status method doesn't exist on RHEVM vm, use hash accessor
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1209653

 vmdb/app/models/miq_provision_redhat/state_machine.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 7 CFME Bot 2015-07-06 18:31:39 UTC
New commit detected on cfme/5.3.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=dc358e72a065a25c8d9e6dd21b0d71fdc5616451

commit dc358e72a065a25c8d9e6dd21b0d71fdc5616451
Author:     Brandon Dunne <bdunne>
AuthorDate: Mon Jul 6 10:25:29 2015 -0400
Commit:     Brandon Dunne <bdunne>
CommitDate: Mon Jul 6 10:25:29 2015 -0400

    status method doesn't exist on RHEVM vm, use hash accessor
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1209653

 vmdb/app/models/miq_provision_redhat/state_machine.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 8 CFME Bot 2015-07-06 18:31:44 UTC
New commit detected on cfme/5.3.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=6fe52e6278df5b6981570f196b6e9e848ee82d29

commit 6fe52e6278df5b6981570f196b6e9e848ee82d29
Merge: 2ba67db dc358e7
Author:     Greg McCullough <gmccullo>
AuthorDate: Mon Jul 6 14:16:35 2015 -0400
Commit:     Greg McCullough <gmccullo>
CommitDate: Mon Jul 6 14:16:35 2015 -0400

    Merge branch '53z_fix_power_status_on_rhevm_vm' into '5.3.z'
    
    Status method doesn't exist on RHEVM vm, use hash accessor
    
    Status method doesn't exist on RHEVM vm, use hash accessor
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1209653
    
    See merge request !153

 vmdb/app/models/miq_provision_redhat/state_machine.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 9 CFME Bot 2015-07-06 21:45:56 UTC
New commit detected on cfme/5.3.5:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=b618961205bc4b79b87c3d2afc4879406cfafa4d

commit b618961205bc4b79b87c3d2afc4879406cfafa4d
Author:     Brandon Dunne <bdunne>
AuthorDate: Mon Jul 6 10:25:29 2015 -0400
Commit:     Brandon Dunne <bdunne>
CommitDate: Mon Jul 6 14:38:56 2015 -0400

    status method doesn't exist on RHEVM vm, use hash accessor
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1209653

 vmdb/app/models/miq_provision_redhat/state_machine.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 10 CFME Bot 2015-07-06 21:46:05 UTC
New commit detected on cfme/5.3.5:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=619d1f82625a9b05d26714d77ffcb7adf23fea5e

commit 619d1f82625a9b05d26714d77ffcb7adf23fea5e
Merge: e8bf359 b618961
Author:     Greg McCullough <gmccullo>
AuthorDate: Mon Jul 6 17:20:40 2015 -0400
Commit:     Greg McCullough <gmccullo>
CommitDate: Mon Jul 6 17:20:40 2015 -0400

    Merge branch '53z_fix_power_status_on_rhevm_vm' into '5.3.5'
    
    status method doesn't exist on RHEVM vm, use hash accessor
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1209653
    
    Cleancherry-pick from http://gitlab.cloudforms.lab.eng.rdu2.redhat.com/cloudforms/cfme/merge_requests/153
    
    See merge request !156

 vmdb/app/models/miq_provision_redhat/state_machine.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 11 Aziza Karol 2015-07-09 09:30:22 UTC
VM PXE provision fails with the following error:

evm.log:
sis_5405_hEZHterX] id: [342] location: [f2b09cc7-80a2-4a3d-b8e4-209daa5a6c53.ovf] storage id: [13] uid_ems: [f2b09cc7-80a2-4a3d-b8e4-209daa5a6c53] ems_ref: [/api/vms/f2b09cc7-80a2-4a3d-b8e4-209daa5a6c53]
[----] E, [2015-07-09T08:49:29.877985 #52611:e7480c] ERROR -- : Q-task_id([miq_provision_3]) MIQ(MiqProvisionRedhatViaPxe#provision_error) [[NoMethodError]: undefined method `description' for nil:NilClass] encountered during phase [create_pxe_configuration_file]
[----] E, [2015-07-09T08:49:29.878239 #52611:e7480c] ERROR -- : Q-task_id([miq_provision_3]) /var/www/miq/vmdb/app/models/pxe_server.rb:185:in `create_provisioning_files'
/var/www/miq/vmdb/app/models/miq_provision/pxe.rb:65:in `create_pxe_files'
/var/www/miq/vmdb/app/models/miq_provision_redhat_via_pxe/state_machine.rb:15:in `create_pxe_configuration_file'
/var/www/miq/vmdb/app/models/miq_request_task/state_machine.rb:26:in `signal'
/var/www/miq/vmdb/app/models/miq_provision_redhat_via_pxe/state_machine.rb:8:in `customize_destination'
/var/www/miq/vmdb/app/models/miq_request_task/state_machine.rb:26:in `signal'
/var/www/miq/vmdb/app/models/miq_provision/state_machine.rb:26:in `poll_destination_in_vmdb'
/var/www/miq/vmdb/app/models/miq_queue.rb:361:in `block in deliver'
/opt/rh/ruby193/root/usr/share/ruby/timeout.rb:69:in `timeout'
/var/www/miq/vmdb/app/models/miq_queue.rb:357:in `deliver'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:107:in `deliver_queue_message'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:135:in `deliver_message'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:152:in `block in do_work'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:146:in `loop'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:146:in `do_work'
/var/www/miq/vmdb/lib/workers/worker_base.rb:317:in `block in do_work_loop'
/var/www/miq/vmdb/lib/workers/worker_base.rb:314:in `loop'
/var/www/miq/vmdb/lib/workers/worker_base.rb:314:in `do_work_loop'
/var/www/miq/vmdb/lib/workers/worker_base.rb:135:in `run'
/var/www/miq/vmdb/lib/workers/worker_base.rb:123:in `start'
/var/www/miq/vmdb/lib/workers/worker_base.rb:23:in `start_worker'
/var/www/miq/vmdb/lib/workers/bin/worker.rb:5:in `<top (required)>'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/commands/runner.rb:52:in `eval'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/commands/runner.rb:52:in `<top (required)>'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/commands.rb:64:in `require'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/commands.rb:64:in `<top (required)>'
script/rails:6:in `require'
script/rails:6:in `<main>'


version:5.3.5.3.20150708141502_b69b688

Comment 12 Brandon Dunne 2015-07-09 13:53:41 UTC
Hi Aziza,

The error you submitted indicates that the PxeImage is nil.  Was one selected in the dialog?

Comment 13 Pete Savage 2015-07-09 18:30:29 UTC
5.3.5.3.20150708141502 Verified

Ran through a PXE provision and all appeared to go well, automated test passed and got validation from CFME too that the machine was successfully provisioned.

Comment 14 Aziza Karol 2015-07-10 11:09:02 UTC
Brandon,

You are right. The dialog didn't had any pxe image which was selected.I have logged a separate bz to track this issue https://bugzilla.redhat.com/show_bug.cgi?id=1241890


~Thanks,
Aziza

Comment 16 errata-xmlrpc 2015-07-15 12:55:10 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://rhn.redhat.com/errata/RHBA-2015-1223.html


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