Bug 1415994

Summary: Engine does not add correct rng device to the OVF file for the HE VM
Product: [oVirt] ovirt-hosted-engine-ha Reporter: Artyom <alukiano>
Component: AgentAssignee: Jenny Tokar <jtokar>
Status: CLOSED CURRENTRELEASE QA Contact: Artyom <alukiano>
Severity: urgent Docs Contact:
Priority: urgent    
Version: ---CC: bugs, jtokar
Target Milestone: ovirt-4.1.0-rcKeywords: Triaged
Target Release: 2.1.0.1Flags: rule-engine: ovirt-4.1+
rule-engine: blocker+
msivak: devel_ack+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-15 14:53:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
vdsm and agent logs none

Description Artyom 2017-01-24 10:50:49 UTC
Created attachment 1243872 [details]
vdsm and agent logs

Description of problem:
Starting HE VM with OVF that generated by the engine fails with the error:
2017-01-24 11:15:47,855 ERROR (vm/de621350) [virt.vm] (vmId='de621350-94da-435c-a67a-cd616d2fab50') The vm start process failed (vm:616)
Traceback (most recent call last):
  File "/usr/share/vdsm/virt/vm.py", line 552, in _startUnderlyingVm
    self._run()
  File "/usr/share/vdsm/virt/vm.py", line 1994, in _run
    self._connection.createXML(domxml, flags),
  File "/usr/lib/python2.7/site-packages/vdsm/libvirtconnection.py", line 123, in wrapper
    ret = f(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/vdsm/utils.py", line 941, in wrapper
    return func(inst, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 3777, in createXML
    if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self)
libvirtError: XML error: missing RNG device model

Version-Release number of selected component (if applicable):
rhevm-4.1.0.2-0.1.el7.noarch
vdsm-4.19.2-2.el7ev.x86_64
libvirt-client-2.0.0-10.el7_3.4.x86_64

How reproducible:
50% (depends if HE use initial vm.conf or one from the OVF, connect to the bug https://bugzilla.redhat.com/show_bug.cgi?id=1411783)

Steps to Reproduce:
1. Deploy HE
2. Add master storage domain to engine
3. Wait for HE OVF generation
4. Enable global maintenance
5. Run hosted-engine --vm-poweroff
6. Run hosted-engine --vm-start

Actual results:
HE VM fails to start

Expected results:
HE VM succeeds to start with correct configuration

Additional info:

Comment 1 Yaniv Kaul 2017-01-25 09:49:21 UTC
Is this a regression?
What is the workaround?

Comment 2 Martin Sivák 2017-01-25 13:33:48 UTC
This is not a regression, we did not have RNG device before. There is no workaround, we have to fix it.

Comment 3 Artyom 2017-02-05 14:50:28 UTC
Verified on ovirt-hosted-engine-ha-2.1.0.1-1.el7ev.noarch

HE VM has correct rng device:

<rng model='virtio'>
  <backend model='random'>/dev/random</backend>
  <alias name='rng0'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</rng>