You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.3 KiB
37 lines
1.3 KiB
3 years ago
|
From 74c34cec10efe19fc591fc0cdc4d2132e31e8b2d Mon Sep 17 00:00:00 2001
|
||
|
From: Adam Williamson <awilliam@redhat.com>
|
||
|
Date: Wed, 20 Jul 2022 16:04:08 -0700
|
||
|
Subject: [PATCH] Don't crash in _checkImageState if there's no image.os_plugin
|
||
|
|
||
|
We've seen some tasks lately where Koji crashed trying to do
|
||
|
`image.os_plugin.abort()`, e.g.:
|
||
|
|
||
|
https://koji.fedoraproject.org/koji/taskinfo?taskID=89750587
|
||
|
https://koji.fedoraproject.org/koji/taskinfo?taskID=89671944
|
||
|
|
||
|
The fix seems fairly simple: only try and abort if os_plugin
|
||
|
actually exists.
|
||
|
|
||
|
Signed-off-by: Adam Williamson <awilliam@redhat.com>
|
||
|
---
|
||
|
builder/kojid | 3 ++-
|
||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/builder/kojid b/builder/kojid
|
||
|
index e7ba1888..de6859dd 100755
|
||
|
--- a/builder/kojid
|
||
|
+++ b/builder/kojid
|
||
|
@@ -4164,7 +4164,8 @@ class BaseImageTask(OzImageTask):
|
||
|
if scrnshot:
|
||
|
ext = scrnshot[-3:]
|
||
|
self.uploadFile(scrnshot, remoteName='screenshot.%s' % ext)
|
||
|
- image.os_plugin.abort() # forcibly tear down the VM
|
||
|
+ if image.os_plugin:
|
||
|
+ image.os_plugin.abort() # forcibly tear down the VM
|
||
|
# TODO abort when a task is CANCELLED
|
||
|
if not self.session.checkUpload('', os.path.basename(self.ozlog)):
|
||
|
self.tlog.removeHandler(self.fhandler)
|
||
|
--
|
||
|
2.37.1
|
||
|
|