Bug 795375

Summary: [ovirt] [vdsm] error handling when CreateVm command is passed without spec-params
Product: [Retired] oVirt Reporter: Haim <hateya>
Component: vdsmAssignee: Dan Kenigsberg <danken>
Status: CLOSED UPSTREAM QA Contact: yeylon <yeylon>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: abaron, acathrow, bazulay, hateya, iheim, mgoldboi, srevivo, yeylon, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-18 20:34:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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.