From 7f1183780652682f04e3a1749cb96f3514c8d8c1 Mon Sep 17 00:00:00 2001 From: Anurag Dwivedi Date: Thu, 30 Mar 2017 09:03:25 -0400 Subject: [PATCH] Detailed logs on Onboarding Failure Event Logs now display the failed upload job with the image and account information. Signed-off-by: Anurag Dwivedi --- .../plugins/rwimagemgr/rift/tasklets/rwimagemgr/upload.py | 2 ++ .../rwlaunchpadtasklet/rift/tasklets/rwlaunchpad/image.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/rwlaunchpad/plugins/rwimagemgr/rift/tasklets/rwimagemgr/upload.py b/rwlaunchpad/plugins/rwimagemgr/rift/tasklets/rwimagemgr/upload.py index 7ce74b22..c1716d3c 100644 --- a/rwlaunchpad/plugins/rwimagemgr/rift/tasklets/rwimagemgr/upload.py +++ b/rwlaunchpad/plugins/rwimagemgr/rift/tasklets/rwimagemgr/upload.py @@ -250,6 +250,8 @@ class ImageUploadJob(object): 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 b18e304d..7c4dfa07 100644 --- a/rwlaunchpad/plugins/rwlaunchpadtasklet/rift/tasklets/rwlaunchpad/image.py +++ b/rwlaunchpad/plugins/rwlaunchpadtasklet/rift/tasklets/rwlaunchpad/image.py @@ -71,4 +71,5 @@ class ImageUploader(object): 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 + -- 2.25.1