On 09.03.2012 [20:35:43 -0800], Nishanth Aravamudan wrote:
> Eep, I broke the "Reinstall" button the View Host tab with this change,
> but the fix is pretty trivial (at least for now). Perhaps this indicates
> the profiles should be merged with the hosts earlier in the API.
> 
> ---
> 
> The reinstall job bypasses the profile selection, but zip() will fail to
> actually produce any results if the arrays don't match in size. So fix
> this by creating a dummy array of None values for the profile in that
> case.

And this in turn breaks the scheduler:

Only add profiles to the autoserv command-line if they are not None.

Signed-off-by: Nishanth Aravamudan <[email protected]>

diff --git a/scheduler/monitor_db.py b/scheduler/monitor_db.py
index d3d54a7..56d2308 100644
--- a/scheduler/monitor_db.py
+++ b/scheduler/monitor_db.py
@@ -1722,7 +1722,7 @@ class AbstractQueueTask(AgentTask, TaskWithJobKeyvals):
                              if not entry.is_hostless()]
         profiles = [entry.profile
                              for entry in self.queue_entries
-                             if not entry.is_hostless()]
+                             if not entry.is_hostless() and entry.profile]
 
         execution_tag = self.queue_entries[0].execution_tag()
         params = _autoserv_command_line(

-- 
Nishanth Aravamudan <[email protected]>
IBM Linux Technology Center

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to