This is actually a follow up solution for issue #502. Turns
out that the results dir for the scheduler continues to be
the default /usr/local/autotest/results, which is not supposed
to be writeable on a system wide install. So let's retrieve
the value from COMMON.test_output_dir if available, if not,
keep the old behavior.

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

diff --git a/scheduler/monitor_db.py b/scheduler/monitor_db.py
index 0d4556a..074d4e1 100644
--- a/scheduler/monitor_db.py
+++ b/scheduler/monitor_db.py
@@ -26,7 +26,15 @@ from autotest.scheduler import scheduler_models
 WATCHER_PID_FILE_PREFIX = 'autotest-scheduler-watcher'
 PID_FILE_PREFIX = 'autotest-scheduler'
 
-RESULTS_DIR = '.'
+_OUTPUT_DIR = global_config.global_config.get_config_value('COMMON',
+                                                           'test_output_dir',
+                                                            default="")
+
+if _OUTPUT_DIR:
+    RESULTS_DIR = _OUTPUT_DIR
+else:
+    RESULTS_DIR = '.'
+
 AUTOSERV_NICE_LEVEL = 10
 DB_CONFIG_SECTION = 'AUTOTEST_WEB'
 AUTOTEST_PATH = os.path.join(os.path.dirname(__file__), '..')
-- 
1.7.11.4

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

Reply via email to