summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJann Kleen <jann@pocketvillage.com>2011-03-29 21:30:16 +0200
committerJann Kleen <jann@pocketvillage.com>2011-03-29 21:30:16 +0200
commit578bd3b5d3ec1c4a164d0bd0e2e91c7f2511566c (patch)
tree2ef2ce515279cf76220ceafe9dbbebc679328f48
parent017558ff9359861e13abeed4ca24a1eed5d8f455 (diff)
parent1915751f2787d994360948d47ccf49245e2d5d6b (diff)
downloadboto-578bd3b5d3ec1c4a164d0bd0e2e91c7f2511566c.tar.gz
Merge branch 'boto-master'
-rw-r--r--boto/ec2/connection.py3
-rw-r--r--boto/ec2/instance.py4
-rw-r--r--boto/pyami/installers/ubuntu/ebs.py2
3 files changed, 7 insertions, 2 deletions
diff --git a/boto/ec2/connection.py b/boto/ec2/connection.py
index 2d7ab085..5ff33f21 100644
--- a/boto/ec2/connection.py
+++ b/boto/ec2/connection.py
@@ -1389,7 +1389,8 @@ class EC2Connection(AWSQueryConnection):
temp.append(t)
target_backup_times = temp
- target_backup_times.reverse() # make the oldest date first
+ target_backup_times.sort() # make the oldeest dates first, and make sure the month start and last four week's
+ # start are in the proper order
# get all the snapshots, sort them by date and time, and organize them into one array for each volume:
all_snapshots = self.get_all_snapshots(owner = 'self')
diff --git a/boto/ec2/instance.py b/boto/ec2/instance.py
index 9e8aacf2..7ea3a0b0 100644
--- a/boto/ec2/instance.py
+++ b/boto/ec2/instance.py
@@ -103,6 +103,7 @@ class Instance(TaggedEC2Object):
self.state_reason = None
self.group_name = None
self.client_token = None
+ self.groups = []
def __repr__(self):
return 'Instance:%s' % self.id
@@ -121,6 +122,9 @@ class Instance(TaggedEC2Object):
elif name == 'stateReason':
self.state_reason = StateReason()
return self.state_reason
+ elif name == 'groupSet':
+ self.groups = ResultSet([('item', Group)])
+ return self.groups
return None
def endElement(self, name, value, connection):
diff --git a/boto/pyami/installers/ubuntu/ebs.py b/boto/pyami/installers/ubuntu/ebs.py
index bd3e72e8..4b1a5397 100644
--- a/boto/pyami/installers/ubuntu/ebs.py
+++ b/boto/pyami/installers/ubuntu/ebs.py
@@ -60,7 +60,7 @@ class Backup(ScriptBase):
def main(self):
try:
ec2 = boto.connect_ec2()
- self.run("/usr/sbin/xfs_freeze -f ${mount_point}")
+ self.run("/usr/sbin/xfs_freeze -f ${mount_point}", exit_on_error = True)
snapshot = ec2.create_snapshot('${volume_id}')
boto.log.info("Snapshot created: %s " % snapshot)
except Exception, e: