[pkg-eucalyptus-commits] [SCM] managing cloud instances for Eucalyptus branch, master, updated. 3.0.0-alpha3-257-g1da8e3a
Garrett Holmstrom
gholms at fedoraproject.org
Sun Jun 16 02:31:03 UTC 2013
The following commit has been merged in the master branch:
commit 95ea28105867748f754bad6a1f6cdc5a3271e151
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date: Tue Apr 16 14:31:23 2013 -0700
Warn when bundles are too big for EC2
diff --git a/euca2ools/commands/bundle/bundle.py b/euca2ools/commands/bundle/bundle.py
index 16d86cb..77656a6 100644
--- a/euca2ools/commands/bundle/bundle.py
+++ b/euca2ools/commands/bundle/bundle.py
@@ -44,7 +44,8 @@ import time
class Bundle(object):
- DEFAULT_PART_SIZE = 10 * 1024 * 1024
+ DEFAULT_PART_SIZE = 10 * 1024 * 1024 # 10M
+ EC2_IMAGE_SIZE_LIMIT = 10 * 1024 * 1024 * 1024 # 10G
def __init__(self):
self.digest = None
@@ -77,6 +78,10 @@ class Bundle(object):
with self._lock:
self.image_filename = image_filename
self.image_size = os.path.getsize(image_filename)
+ if self.image_size > self.EC2_IMAGE_SIZE_LIMIT:
+ msg = "this image is larger than EC2's size limit"
+ self.log.warn(msg)
+ print >> sys.stderr, 'warning:', msg
# pipe for getting the digest from sha1sum
digest_pipe_out, digest_pipe_in = multiprocessing.Pipe(duplex=False)
# pipe for tar --> sha1sum
--
managing cloud instances for Eucalyptus
More information about the pkg-eucalyptus-commits
mailing list