Raised nova.virt.hyperv.vmops IndexError on hyper-v when boot with the domain user role

Bug #1195205 reported by Xiang Hui
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Xiang Hui

Bug Description

When operating live migration on hyper-v from a domain administrator to another domain user it will raise the following exception:

  2013-05-31 20:22:16.552 5332 INFO nova.virt.hyperv.vmops [req-bb41a7b0-f0c5-4699-b605-0ea43af8e41c 96c8d050f56b4a6bbf428
542ff7e194f 648a70dd4cf441c2b743aaad6f6772d7] [instance: 53f24f00-af72-4df5-9262-ee0dc72f50cb] Spawning new instance
        1 file(s) copied.
2013-05-31 20:22:58.734 5332 ERROR nova.virt.hyperv.vmops [req-bb41a7b0-f0c5-4699-b605-0ea43af8e41c 96c8d050f56b4a6bbf42
8542ff7e194f 648a70dd4cf441c2b743aaad6f6772d7] list index out of range
2013-05-31 20:22:58.734 5332 TRACE nova.virt.hyperv.vmops Traceback (most recent call last):
2013-05-31 20:22:58.734 5332 TRACE nova.virt.hyperv.vmops File "C:\xh_live_migration\hyperv-zip\nova\nova\virt\hyperv\
vmops.py", line 169, in spawn
2013-05-31 20:22:58.734 5332 TRACE nova.virt.hyperv.vmops root_vhd_path)
2013-05-31 20:22:58.734 5332 TRACE nova.virt.hyperv.vmops File "C:\xh_live_migration\hyperv-zip\nova\nova\virt\hyperv\
vmops.py", line 190, in create_instance
2013-05-31 20:22:58.734 5332 TRACE nova.virt.hyperv.vmops CONF.hyperv.limit_cpu_features)
2013-05-31 20:22:58.734 5332 TRACE nova.virt.hyperv.vmops File "C:\xh_live_migration\hyperv-zip\nova\nova\virt\hyperv\
vmutils.py", line 155, in create_vm
2013-05-31 20:22:58.734 5332 TRACE nova.virt.hyperv.vmops vs_man_svc = self._conn.Msvm_VirtualSystemManagementServic
e()[0]
2013-05-31 20:22:58.734 5332 TRACE nova.virt.hyperv.vmops IndexError: list index out of range
2013-05-31 20:22:58.734 5332 TRACE nova.virt.hyperv.vmops
2013-05-31 20:22:58.753 5332 INFO nova.virt.hyperv.vmops [req-bb41a7b0-f0c5-4699-b605-0ea43af8e41c 96c8d050f56b4a6bbf428
542ff7e194f 648a70dd4cf441c2b743aaad6f6772d7] Got request to destroy instance: instance-00000093
2013-05-31 20:22:58.763 5332 ERROR nova.compute.manager [req-bb41a7b0-f0c5-4699-b605-0ea43af8e41c 96c8d050f56b4a6bbf4285
42ff7e194f 648a70dd4cf441c2b743aaad6f6772d7] [instance: 53f24f00-af72-4df5-9262-ee0dc72f50cb] Instance failed to spawn
2013-05-31 20:22:58.763 5332 TRACE nova.compute.manager [instance: 53f24f00-af72-4df5-9262-ee0dc72f50cb] Traceback (most
 recent call last):
2013-05-31 20:22:58.763 5332 TRACE nova.compute.manager [instance: 53f24f00-af72-4df5-9262-ee0dc72f50cb] File "C:\xh_l
ive_migration\hyperv-zip\nova\nova\compute\manager.py", line 1165, in _spawn
2013-05-31 20:22:58.763 5332 TRACE nova.compute.manager [instance: 53f24f00-af72-4df5-9262-ee0dc72f50cb] block_devic
e_info)
2013-05-31 20:22:58.763 5332 TRACE nova.compute.manager [instance: 53f24f00-af72-4df5-9262-ee0dc72f50cb] File "C:\xh_l
ive_migration\hyperv-zip\nova\nova\virt\hyperv\driver.py", line 54, in spawn
2013-05-31 20:22:58.763 5332 TRACE nova.compute.manager [instance: 53f24f00-af72-4df5-9262-ee0dc72f50cb] admin_passw
ord, network_info, block_device_info)
2013-05-31 20:22:58.763 5332 TRACE nova.compute.manager [instance: 53f24f00-af72-4df5-9262-ee0dc72f50cb] File "C:\xh_l
ive_migration\hyperv-zip\nova\nova\virt\hyperv\vmops.py", line 181, in spawn
2013-05-31 20:22:58.763 5332 TRACE nova.compute.manager [instance: 53f24f00-af72-4df5-9262-ee0dc72f50cb] raise vmuti
ls.HyperVException(_('Spawn instance failed'))
2013-05-31 20:22:58.763 5332 TRACE nova.compute.manager [instance: 53f24f00-af72-4df5-9262-ee0dc72f50cb] HyperVException
: Spawn instance failed
2013-05-31 20:22:58.763 5332 TRACE nova.compute.manager [instance: 53f24f00-af72-4df5-9262-ee0dc72f50cb]
2013-05-31 20:22:59.154 5332 AUDIT nova.compute.manager [req-bb41a7b0-f0c5-4699-b605-0ea43af8e41c 96c8d050f56b4a6bbf4285
42ff7e194f 648a70dd4cf441c2b743aaad6f6772d7] [instance: 53f24f00-af72-4df5-9262-ee0dc72f50cb] Terminating instance

Tags: hyper-v
Xiang Hui (xianghui)
description: updated
tags: added: hyper-v
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/34832

Changed in nova:
assignee: nobody → Xiang Hui (xianghui)
status: New → In Progress
Revision history for this message
Xiang Hui (xianghui) wrote :

This bug is caused by having no admin permission to create a vm on hyper-v, which is based on the operation of live-migration, so I am going to give the user an obvious clue to indicate this permission limit by raising an exception, so the user could fix it quickly.

Xiang Hui (xianghui)
Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
Thierry Carrez (ttx) wrote :

Review is still in progress

Changed in nova:
status: Fix Committed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/34832
Committed: http://github.com/openstack/nova/commit/38afca3350bd52f3441827b31c9fa6e6e31179e4
Submitter: Jenkins
Branch: master

commit 38afca3350bd52f3441827b31c9fa6e6e31179e4
Author: Xiang Hui <email address hidden>
Date: Thu Jun 27 19:11:56 2013 -0700

    Add an exception when doesn't have permissions to operate vm on hyper-v

    This commit adds a wrapper checking method when creating/operating
    vms on hyper-v, it will raise a HyperVAuthorizationException if the
    windows account running nova-compute on this Hyper-V host doesn't
    have the required permissions to create/operate the virtual machine.

    Fixes bug #1195205

    Change-Id: I2ef67a686c99dc83fcc3e9f47a71473929b01e9f

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-3 → 2013.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.