diff options
| author | Vishvananda Ishaya <vishvananda@gmail.com> | 2011-05-26 10:28:22 -0700 |
|---|---|---|
| committer | Vishvananda Ishaya <vishvananda@gmail.com> | 2011-05-26 10:28:22 -0700 |
| commit | ff75e808eef06a72c0198fe976c19c60256c6b74 (patch) | |
| tree | 88abb64211afca3a76b4eb20a49f3f8aed265cd5 /nova/image | |
| parent | e6fc2fc58d2c98f4322e92b26b1031ca362c8724 (diff) | |
| download | nova-ff75e808eef06a72c0198fe976c19c60256c6b74.tar.gz nova-ff75e808eef06a72c0198fe976c19c60256c6b74.tar.xz nova-ff75e808eef06a72c0198fe976c19c60256c6b74.zip | |
log upload errors
Diffstat (limited to 'nova/image')
| -rw-r--r-- | nova/image/s3.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/nova/image/s3.py b/nova/image/s3.py index 673cbf56f..bad04e5c0 100644 --- a/nova/image/s3.py +++ b/nova/image/s3.py @@ -31,12 +31,14 @@ import eventlet from nova import crypto from nova import exception from nova import flags +from nova import log as logging from nova import utils from nova.auth import manager from nova.image import service from nova.api.ec2 import ec2utils +LOG = logging.getLogger("nova.image.s3") FLAGS = flags.FLAGS flags.DEFINE_string('image_decryption_dir', '/tmp', 'parent dir for tempdir used for image decryption') @@ -181,6 +183,8 @@ class S3ImageService(service.BaseImageService): shutil.copyfileobj(part, combined) except Exception: + LOG.exception(_("Failed to download %(image_location)s " + "to %(image_path)s"), locals()) metadata['properties']['image_state'] = 'failed_download' self.service.update(context, image_id, metadata) raise @@ -203,6 +207,9 @@ class S3ImageService(service.BaseImageService): encrypted_iv, cloud_pk, dec_filename) except Exception: + LOG.exception(_("Failed to decrypt %(image_location)s " + "to %(image_path)s"), locals()) + LOG.exception(_("Failed to decrypt %s"), enc_filename) metadata['properties']['image_state'] = 'failed_decrypt' self.service.update(context, image_id, metadata) raise @@ -213,6 +220,8 @@ class S3ImageService(service.BaseImageService): try: unz_filename = self._untarzip_image(image_path, dec_filename) except Exception: + LOG.exception(_("Failed to untar %(image_location)s " + "to %(image_path)s"), locals()) metadata['properties']['image_state'] = 'failed_untar' self.service.update(context, image_id, metadata) raise @@ -224,6 +233,8 @@ class S3ImageService(service.BaseImageService): self.service.update(context, image_id, metadata, image_file) except Exception: + LOG.exception(_("Failed to upload %(image_location)s " + "to %(image_path)s"), locals()) metadata['properties']['image_state'] = 'failed_upload' self.service.update(context, image_id, metadata) raise |
