Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3)

Issue 84470053: destroy-env should remove security groups

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years ago by abel.deuring
Modified:
10 years ago
Reviewers:
mp+214520, mue
Visibility:
Public.

Description

destroy-env should remove security groups fix for bug 1227574. The implementation is obvious, I think. As described in bug 1300755 it can happen that a security group cannot be deleted because it is used in another environment. The Nova API call fails in this case, so trying this call does not affect the other environment. Unfortunately, goose hides the original error message, so Destroy() ans StopInstance() cannot determine the exact reason of the failure. Hence only a warning is logged. https://code.launchpad.net/~adeuring/juju-core/1227574/+merge/214520 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+168 lines, -2 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M provider/openstack/local_test.go View 1 chunk +105 lines, -0 lines 1 comment Download
M provider/openstack/provider.go View 3 chunks +61 lines, -2 lines 3 comments Download

Messages

Total messages: 2
abel.deuring
Please take a look.
10 years ago (2014-04-07 12:20:36 UTC) #1
mue
10 years ago (2014-04-07 14:25:48 UTC) #2
Only minor notes, otherwise LGTM.

https://codereview.appspot.com/84470053/diff/1/provider/openstack/local_test.go
File provider/openstack/local_test.go (right):

https://codereview.appspot.com/84470053/diff/1/provider/openstack/local_test....
provider/openstack/local_test.go:452: func (s *localServerSuite)
TestDestroyEnvironmentDeletesSecurityGroupsFWModeGlobabel(c *gc.C) {
Hehe, only naming: ...FWModeGlobal. ;)

https://codereview.appspot.com/84470053/diff/1/provider/openstack/provider.go
File provider/openstack/provider.go (right):

https://codereview.appspot.com/84470053/diff/1/provider/openstack/provider.go...
provider/openstack/provider.go:879: lastDash := strings.LastIndex(openstackName,
"-")
Would call it "lastDashPos".

https://codereview.appspot.com/84470053/diff/1/provider/openstack/provider.go...
provider/openstack/provider.go:881: return fmt.Errorf("Cannot identify instance
ID in openstack server name %q", openstackName)
IMHO errors start lower-case.

https://codereview.appspot.com/84470053/diff/1/provider/openstack/provider.go...
provider/openstack/provider.go:1001: logger.Warningf("Cannot delete security
group %q. Used by another environment?", group.Name)
Same here, lower-case.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b