* fix a bug with restricted drone users config parsing
* display allowed users in the status server
* ensure drone users reparse correctly
* fix a bug in max_runnable_processes introduced by user restrictions (could pass empty set to max())
Signed-off-by: Steve Howard <showard@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@4121 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/scheduler/status_server.py b/scheduler/status_server.py
index 3d618dc..a35ed6b 100644
--- a/scheduler/status_server.py
+++ b/scheduler/status_server.py
@@ -50,8 +50,13 @@
def _write_drone(self, drone):
- line = '%s %s/%s processes' % (drone.hostname, drone.active_processes,
- drone.max_processes)
+ if drone.allowed_users:
+ allowed_users = ', '.join(drone.allowed_users)
+ else:
+ allowed_users = 'all'
+ line = ('%s: %s/%s processes, users: %s'
+ % (drone.hostname, drone.active_processes, drone.max_processes,
+ allowed_users))
if not drone.enabled:
line += ' (disabled)'
self._write_line(line)