Detailed logs on Onboarding Failure
Event Logs now display the failed upload job with the
image and account information.
Signed-off-by: Anurag Dwivedi <anurag.dwivedi@riftio.com>
diff --git a/rwlaunchpad/plugins/rwimagemgr/rift/tasklets/rwimagemgr/upload.py b/rwlaunchpad/plugins/rwimagemgr/rift/tasklets/rwimagemgr/upload.py
index 7ce74b2..c1716d3 100644
--- a/rwlaunchpad/plugins/rwimagemgr/rift/tasklets/rwimagemgr/upload.py
+++ b/rwlaunchpad/plugins/rwimagemgr/rift/tasklets/rwimagemgr/upload.py
@@ -250,6 +250,8 @@
if failed_tasks:
self._log.error("%s had %s FAILED tasks.", self, len(failed_tasks))
+ for ftask in failed_tasks:
+ self._log.error("%s : Failed to upload image : %s to cloud_account : %s", self, ftask.image_name, ftask.cloud_account)
self.state = "FAILED"
else:
self._log.debug("%s tasks completed successfully", len(self._upload_tasks))
diff --git a/rwlaunchpad/plugins/rwlaunchpadtasklet/rift/tasklets/rwlaunchpad/image.py b/rwlaunchpad/plugins/rwlaunchpadtasklet/rift/tasklets/rwlaunchpad/image.py
index b18e304..7c4dfa0 100644
--- a/rwlaunchpad/plugins/rwlaunchpadtasklet/rift/tasklets/rwlaunchpad/image.py
+++ b/rwlaunchpad/plugins/rwlaunchpadtasklet/rift/tasklets/rwlaunchpad/image.py
@@ -71,4 +71,5 @@
try:
upload_job.wait_until_complete_threadsafe()
except client.UploadJobError as e:
- raise ImageUploadError("Failed to upload image (image_name) to cloud accounts") from e
+ raise ImageUploadError("Failed to upload image " + image_name + " to cloud accounts") from e
+