Bug 795375 - [ovirt] [vdsm] error handling when CreateVm command is passed without spec-params
Summary: [ovirt] [vdsm] error handling when CreateVm command is passed without spec-pa...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: oVirt
Classification: Retired
Component: vdsm
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Dan Kenigsberg
QA Contact: yeylon@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-20 11:27 UTC by Haim
Modified: 2016-04-18 06:43 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-18 20:34:33 UTC
oVirt Team: ---


Attachments (Terms of Use)

Description Haim 2012-02-20 11:27:24 UTC
Description of problem:

please catch the following exception and propagate an appropriate error message

Thread-91::ERROR::2012-02-20 12:15:54,322::vm::594::vm.Vm::(_startUnderlyingVm) vmId=`1c6b7313-e57f-4883-a66f-3a1f5dee7990`::The vm start process failed
Traceback (most recent call last):
  File "/usr/share/vdsm/vm.py", line 560, in _startUnderlyingVm
    self._run()
  File "/usr/share/vdsm/libvirtvm.py", line 1280, in _run
    domxml = hooks.before_vm_start(self._buildCmdLine(), self.conf)
  File "/usr/share/vdsm/libvirtvm.py", line 1165, in _buildCmdLine
    devElem = dev.getXML()
  File "/usr/share/vdsm/libvirtvm.py", line 872, in getXML
    m.setAttribute('vram', self.specParams['vram'])vdsm
KeyError: 'vram'

in this case, engine send CreateVm command without spec-param for one of the devices. 
I suggest to put this flow in try except (specific) and propagate nice error message.


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