Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1374216

Summary: engine doesn't accept RNG sources other than random and hwrng
Product: [oVirt] ovirt-engine Reporter: Martin Polednik <mpoledni>
Component: Backend.CoreAssignee: Shahar Havivi <shavivi>
Status: CLOSED CURRENTRELEASE QA Contact: Nisim Simsolo <nsimsolo>
Severity: low Docs Contact:
Priority: high    
Version: 4.0.0CC: bugs, nsimsolo, tjelinek
Target Milestone: ovirt-4.1.0-alphaFlags: rule-engine: ovirt-4.1+
rule-engine: planning_ack+
rule-engine: devel_ack+
mavital: testing_ack+
Target Release: 4.1.0.2   
Hardware: Unspecified   
OS: Unspecified   
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:49:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Martin Polednik 2016-09-08 09:27:58 UTC
Description of problem:
Engine is currently unable to consume new RNG sources. The problem with current approach is that, unless sources reported by VDSM match those known to engine the host cannot be activated. It doesn't make sense to fail host activation in such case.

This bug does not block 1347669, but requires ugly code workaround in VDSM and in communication protocol.

Version-Release number of selected component (if applicable):
Since RNG release (3.6), only relevant for future releases.

How reproducible:
100%

Steps to Reproduce:
1. edit VDSM lib/vdsm/host/rngsources.py
2. add new RNG source
3. save & restart VDSM

Actual results:
2016-09-08 05:11:40,662 ERROR [org.ovirt.engine.core.vdsbroker.VdsManager] (DefaultQuartzScheduler3) [12d7db24] Exception: java.lang.IllegalArgumentException: No enum constant org.ovirt.engine.core.common.businessentities.VmRngDevice.Source.URANDOM
        at java.lang.Enum.valueOf(Enum.java:238) [rt.jar:1.8.0_101]
        at org.ovirt.engine.core.common.businessentities.VmRngDevice$Source.valueOf(VmRngDevice.java:29) [common.jar:]
        at org.ovirt.engine.core.common.businessentities.VmRngDevice.csvToSourcesSet(VmRngDevice.java:39) [common.jar:]
        at org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.setRngSupportedSourcesToVds(VdsBrokerObjectsBuilder.java:945) [vdsbroker.jar:]
        at org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.updateVDSDynamicData(VdsBrokerObjectsBuilder.java:897) [vdsbroker.jar:]
        at org.ovirt.engine.core.vdsbroker.vdsbroker.GetCapabilitiesVDSCommand.executeVdsBrokerCommand(GetCapabilitiesVDSCommand.java:17) [vdsbroker.jar:]
        at org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerCommand.executeVDSCommand(VdsBrokerCommand.java:110) [vdsbroker.jar:]
        at org.ovirt.engine.core.vdsbroker.VDSCommandBase.executeCommand(VDSCommandBase.java:73) [vdsbroker.jar:]
        at org.ovirt.engine.core.dal.VdcCommandBase.execute(VdcCommandBase.java:33) [dal.jar:]
        at org.ovirt.engine.core.vdsbroker.vdsbroker.DefaultVdsCommandExecutor.execute(DefaultVdsCommandExecutor.java:14) [vdsbroker.jar:]
        at org.ovirt.engine.core.vdsbroker.ResourceManager.runVdsCommand(ResourceManager.java:431) [vdsbroker.jar:]
        at org.ovirt.engine.core.vdsbroker.VdsManager.refreshCapabilities(VdsManager.java:652) [vdsbroker.jar:]
        at org.ovirt.engine.core.vdsbroker.monitoring.HostMonitoring.refreshVdsRunTimeInfo(HostMonitoring.java:121) [vdsbroker.jar:]
        at org.ovirt.engine.core.vdsbroker.monitoring.HostMonitoring.refresh(HostMonitoring.java:85) [vdsbroker.jar:]
        at org.ovirt.engine.core.vdsbroker.VdsManager.onTimer(VdsManager.java:238) [vdsbroker.jar:]
        at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source) [:1.8.0_101]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_101]
        at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_101]
        at org.ovirt.engine.core.utils.timer.JobWrapper.invokeMethod(JobWrapper.java:77) [scheduler.jar:]
        at org.ovirt.engine.core.utils.timer.JobWrapper.execute(JobWrapper.java:51) [scheduler.jar:]
        at org.quartz.core.JobRunShell.run(JobRunShell.java:213) [quartz.jar:]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_101]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_101]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_101]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_101]
        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_101]

Expected results:
VM in UP status.


Additional info:

Comment 1 Sandro Bonazzola 2016-12-12 13:54:53 UTC
The fix for this issue should be included in oVirt 4.1.0 beta 1 released on December 1st. If not included please move back to modified.

Comment 2 Nisim Simsolo 2017-02-13 08:52:39 UTC
Verification build:
ovirt-engine-4.1.1-0.1.el7
libvirt-client-2.0.0-10.el7_3.4.x86_64
qemu-kvm-rhev-2.6.0-28.el7_3.5.x86_64
vdsm-4.19.5-1.el7ev.x86_64

Verification scenario:
1. Edit host /usr/lib/python2.7/site-packages/vdsm/host/rngsources.py file and add another rng source
2. Save and restart vdsm
3. Verify vdsm restarted and host is in "up" status.
4. Run VM with RNG source (urandom)
5. Verify VM is running properly with RNG source.