In case the match is virtual, LNST will need euid == 0 so it can connect
to qemu and configure the machines. This commit introduces a check for
that.
Signed-off-by: Radek Pazdera <rpazdera(a)redhat.com>
---
lnst/Controller/NetTestController.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/lnst/Controller/NetTestController.py b/lnst/Controller/NetTestController.py
index 078746d..62600ca 100644
--- a/lnst/Controller/NetTestController.py
+++ b/lnst/Controller/NetTestController.py
@@ -109,6 +109,12 @@ class NetTestController:
msg = "This setup cannot be provisioned with the current pool."
raise NetTestError(msg)
+ if sp.is_setup_virtual() and os.geteuid() != 0:
+ msg = "Provisioning this setup requires additional configuration
"\
+ "of the virtual machines in the pool. LNST needs root "\
+ "priviledges so it can connect to qemu."
+ raise NetTestError(msg)
+
for m_id, machine in machines.iteritems():
self._machines[m_id] = machine
--
1.7.7.6