Detailed logs on Onboarding Failure
authorAnurag Dwivedi <anurag.dwivedi@riftio.com>
Thu, 30 Mar 2017 13:03:25 +0000 (09:03 -0400)
committerAnurag Dwivedi <anurag.dwivedi@riftio.com>
Thu, 30 Mar 2017 13:03:25 +0000 (09:03 -0400)
Event Logs now display the failed upload job with the
image and account information.

Signed-off-by: Anurag Dwivedi <anurag.dwivedi@riftio.com>
rwlaunchpad/plugins/rwimagemgr/rift/tasklets/rwimagemgr/upload.py
rwlaunchpad/plugins/rwlaunchpadtasklet/rift/tasklets/rwlaunchpad/image.py

index 7ce74b2..c1716d3 100644 (file)
@@ -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))
index b18e304..7c4dfa0 100644 (file)
@@ -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
+