From: Anurag Dwivedi Date: Thu, 30 Mar 2017 13:03:25 +0000 (-0400) Subject: Detailed logs on Onboarding Failure X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F25%2F1425%2F1;p=osm%2FSO.git Detailed logs on Onboarding Failure Event Logs now display the failed upload job with the image and account information. Signed-off-by: Anurag Dwivedi --- 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 +