This is a followup for #502 fix. It turns out that the autotest
scheduler won't be able to find autotest-remote on a system wide
install, therefore, it won't be possible to actually install the
autotest client on test clients. Let's fix it by figuring out
whether we have an autotest-remote installed system wide, if not,
fall back to the usual /autotest/path/server/autoserv.

Signed-off-by: Lucas Meneghel Rodrigues <[email protected]>
---
 scheduler/monitor_db.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/scheduler/monitor_db.py b/scheduler/monitor_db.py
index 0d4556a..fec018f 100644
--- a/scheduler/monitor_db.py
+++ b/scheduler/monitor_db.py
@@ -13,6 +13,7 @@ from autotest.frontend import setup_django_environment
 
 import django.db
 
+from autotest.client import os_dep
 from autotest.client.shared import global_config, logging_manager
 from autotest.client.shared import host_protections, utils
 from autotest.database import database_connection
@@ -48,7 +49,12 @@ system error on the Autotest server.  Full results may not 
be available.  Sorry.
 
 _db = None
 _shutdown = False
-_autoserv_path = os.path.join(drones.AUTOTEST_INSTALL_DIR, 'server', 
'autoserv')
+# Start autotest-remove in both scenarios, system wide install or traditional
+# single dir installation
+try:
+    _autoserv_path = os_dep.command("autotest-remote")
+except ValueError:
+    _autoserv_path = os.path.join(drones.AUTOTEST_INSTALL_DIR, 'server', 
'autoserv')
 _testing_mode = False
 _drone_manager = None
 
-- 
1.7.11.4

_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel

Reply via email to