Bug 1067064

Summary: [oVirt QoS] It's impossible to run VM with Network QOS configured on VNIC profile
Product: [Retired] oVirt Reporter: GenadiC <gcheresh>
Component: vdsmAssignee: Antoni Segura Puimedon <asegurap>
Status: CLOSED CURRENTRELEASE QA Contact: GenadiC <gcheresh>
Severity: urgent Docs Contact:
Priority: high    
Version: 3.4CC: acathrow, bazulay, gklein, iheim, masayag, mgoldboi, myakove, oblaut, s.kieske, yeylon
Target Milestone: ---Keywords: Triaged
Target Release: 3.4.1   
Hardware: x86_64   
OS: Linux   
Whiteboard: network
Fixed In Version: 3.4.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-02 13:15:17 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:
Attachments:
Description Flags
engine and vdsm log none

Description GenadiC 2014-02-19 15:30:26 UTC
Created attachment 865117 [details]
engine and vdsm log

Description of problem:
Start VM fails when on VM resides VNIC profile of the Network imported from Neutron (or created from Ovirt as external network) when for that VNIC profile is configured network QOS.
AttributeError: 'int' object has no attribute 'replace' is received on VDSM log

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


How reproducible:
Always

Steps to Reproduce:
1. Create external Network with Ovirt (or import one from Neutron)
2. Create Network QOS on DC
3. Create VNIC profile for Neutron network and configure on it QOS from previous step
4. Add that VNIC profile to VM
5. Start VM

Actual results:
Start VM fails

Expected results:
VM should be started

Comment 1 Sandro Bonazzola 2014-03-04 09:22:45 UTC
This is an automated message.
Re-targeting all non-blocker bugs still open on 3.4.0 to 3.4.1.

Comment 2 Mike Kolesnik 2014-03-09 12:49:44 UTC
From what I checked this happens also for a regular vNIC attached to a profile on the management network that has QoS.
The stacktrace suggests that QoS fields should be treated as string type in VDSM

Thread-8522::DEBUG::2014-03-09 13:56:34,054::vm::2138::vm.Vm::(_startUnderlyingVm) vmId=`eec15418-8492-4f22-a2f0-dc2d8067c58a`::_ongoingCreati
ons released
Thread-8522::ERROR::2014-03-09 13:56:34,054::vm::2164::vm.Vm::(_startUnderlyingVm) vmId=`eec15418-8492-4f22-a2f0-dc2d8067c58a`::The vm start p
rocess failed
Traceback (most recent call last):
  File "/usr/share/vdsm/vm.py", line 2124, in _startUnderlyingVm
    self._run()
  File "/usr/share/vdsm/vm.py", line 3008, in _run
    domxml = hooks.before_vm_start(self._buildCmdLine(), self.conf)
  File "/usr/share/vdsm/vm.py", line 2841, in _buildCmdLine
    self._appendDevices(domxml)
  File "/usr/share/vdsm/vm.py", line 2808, in _appendDevices
    deviceXML = dev.getXML().toxml(encoding='utf-8')
  File "/usr/lib64/python2.7/xml/dom/minidom.py", line 46, in toxml
    return self.toprettyxml("", "", encoding)
  File "/usr/lib64/python2.7/xml/dom/minidom.py", line 60, in toprettyxml
    self.writexml(writer, "", indent, newl)
  File "/usr/share/vdsm/vm.py", line 5056, in __hacked_writexml
    node.writexml(writer, indent + addindent, addindent, newl)
  File "/usr/share/vdsm/vm.py", line 5056, in __hacked_writexml
    node.writexml(writer, indent + addindent, addindent, newl)
  File "/usr/share/vdsm/vm.py", line 5044, in __hacked_writexml
    xml.dom.minidom._write_data(writer, attrs[a_name].value)
  File "/usr/lib64/python2.7/xml/dom/minidom.py", line 296, in _write_data
    data = data.replace("&", "&amp;").replace("<", "&lt;"). \
AttributeError: 'int' object has no attribute 'replace'
Thread-8522::DEBUG::2014-03-09 13:56:34,057::vm::2617::vm.Vm::(setDownStatus) vmId=`eec15418-8492-4f22-a2f0-dc2d8067c58a`::Changed state to Down: 'int' object has no attribute 'replace'

Comment 3 Dan Kenigsberg 2014-03-16 23:07:15 UTC
Vm.getXMLBandwidth() is a horrible mess (e.g oldBandwidth.getElementsByTagName) besides that issue.