| |
@@ -50,6 +50,7 @@
|
| |
from koji.tasks import ( # noqa: F401
|
| |
BaseTaskHandler,
|
| |
MultiPlatformTask,
|
| |
+ RefuseTask,
|
| |
RestartTask, # handle restarted vm tasks
|
| |
RestartVerifyTask, # handle restarted vm tasks
|
| |
ServerExit,
|
| |
@@ -1084,8 +1085,8 @@
|
| |
if e.get_error_code() == libvirt.VIR_ERR_NO_DOMAIN:
|
| |
# if this builder does not have the requested VM,
|
| |
# we can't handle the task
|
| |
- self.logger.debug('VM %s not available, ignoring task %i', vm_name, task['id'])
|
| |
- return False
|
| |
+ msg = 'VM %s not available' % vm_name
|
| |
+ raise RefuseTask(msg)
|
| |
else:
|
| |
raise
|
| |
return super(VMTaskManager, self).takeTask(task)
|
| |
Chased down an issue where a host would not take a task, to find the reason hidden in a debug message. It makes more sense to use the refuse mechanism here, plus this will make it much easier to diagnose a similar problem in the future.
Fixes https://pagure.io/koji/issue/4312