Change in vdsm[master]: caps: disable rng if no packages are reported

fromani at redhat.com fromani at redhat.com
Tue Apr 5 12:11:59 UTC 2016


Francesco Romani has uploaded a new change for review.

Change subject: caps: disable rng if no packages are reported
......................................................................

caps: disable rng if no packages are reported

Vdsm used to not report rngSource if it could not detect
the libvirt version. This means Vdsm was installed from source
on an unsupported platform (not fedora/rhel/centos, nor debian).

To preserve backward compatibility we reintroduce this check.

Change-Id: I3bac741eaabcf3c672276d4f62118c8565607440
Signed-off-by: Francesco Romani <fromani at redhat.com>
---
M vdsm/caps.py
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/88/55688/1

diff --git a/vdsm/caps.py b/vdsm/caps.py
index 66eb245..55cfc81 100644
--- a/vdsm/caps.py
+++ b/vdsm/caps.py
@@ -187,7 +187,10 @@
                               config.getint('vars', 'extra_mem_reserve'))
     caps['guestOverhead'] = config.get('vars', 'guest_ram_overhead')
 
-    caps['rngSources'] = vmdevices.core.Rng.available_sources()
+    if 'libvirt' not in caps['packages2']:
+        logging.debug('VirtioRNG DISABLED: unknown libvirt version')
+    else:
+        caps['rngSources'] = vmdevices.core.Rng.available_sources()
 
     caps['numaNodes'] = dict(numa.topology())
     caps['numaNodeDistance'] = dict(numa.distances())


-- 
To view, visit https://gerrit.ovirt.org/55688
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3bac741eaabcf3c672276d4f62118c8565607440
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>


More information about the vdsm-patches mailing list