Repository: spark Updated Branches: refs/heads/branch-1.2 c7bac577a -> d24971a62
[SPARK-5335] Fix deletion of security groups within a VPC Please see https://issues.apache.org/jira/browse/SPARK-5335. The fix itself is in e58a8b01a8bedcbfbbc6d04b1c1489255865cf87 commit. Two earlier commits are fixes of another VPC related bug waiting to be merged. I should have created former bug fix in own branch then this fix would not have former fixes. :( This code is released under the project's license. Author: Vladimir Grigor <vladi...@kiosked.com> Author: Vladimir Grigor <vladi...@voukka.com> Closes #4122 from voukka/SPARK-5335_delete_sg_vpc and squashes the following commits: 090dca9 [Vladimir Grigor] fixes as per review: removed printing of group_id and added comment 730ec05 [Vladimir Grigor] fix for SPARK-5335: Destroying cluster in VPC with "--delete-groups" fails to remove security groups (cherry picked from commit ada993e954e2825c0fe13326fc23b0e1a567cd55) Signed-off-by: Sean Owen <so...@cloudera.com> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/d24971a6 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/d24971a6 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/d24971a6 Branch: refs/heads/branch-1.2 Commit: d24971a625051f3c808eff9b51160bb6cb8a11ed Parents: c7bac57 Author: Vladimir Grigor <vladi...@kiosked.com> Authored: Thu Feb 12 23:26:24 2015 +0000 Committer: Sean Owen <so...@cloudera.com> Committed: Thu Feb 12 23:26:50 2015 +0000 ---------------------------------------------------------------------- ec2/spark_ec2.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/d24971a6/ec2/spark_ec2.py ---------------------------------------------------------------------- diff --git a/ec2/spark_ec2.py b/ec2/spark_ec2.py index aaddf61..b4283db 100755 --- a/ec2/spark_ec2.py +++ b/ec2/spark_ec2.py @@ -983,11 +983,12 @@ def real_main(): time.sleep(30) # Yes, it does have to be this long :-( for group in groups: try: - conn.delete_security_group(group.name) - print "Deleted security group " + group.name + # It is needed to use group_id to make it work with VPC + conn.delete_security_group(group_id=group.id) + print "Deleted security group %s" % group.name except boto.exception.EC2ResponseError: success = False - print "Failed to delete security group " + group.name + print "Failed to delete security group %s" % group.name # Unfortunately, group.revoke() returns True even if a rule was not # deleted, so this needs to be rerun if something fails --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org