Merge lp://staging/~rvb/gwacl/fix-destroydeploy2 into lp://staging/gwacl

Proposed by Raphaël Badin
Status: Merged
Approved by: Raphaël Badin
Approved revision: 166
Merged at revision: 163
Proposed branch: lp://staging/~rvb/gwacl/fix-destroydeploy2
Merge into: lp://staging/gwacl
Diff against target: 257 lines (+33/-102)
3 files modified
example/management/run.go (+4/-18)
management.go (+9/-19)
management_test.go (+20/-65)
To merge this branch: bzr merge lp://staging/~rvb/gwacl/fix-destroydeploy2
Reviewer Review Type Date Requested Status
Gavin Panella Approve
Review via email: mp+173095@code.staging.launchpad.net

Commit message

Do not attempt to stop the VMs inside DestroyDeployment.

Description of the change

I found that it's quicker a more reliable to just delete the deployment instead of trying to shutdown the VMs when destroying a deployment. When we delete the deployment object, the VMs are shut down are removed. The only thing left are the disks.

Added bonus: the testing becomes simpler as we issue less API requests.

To post a comment you must log in.
Revision history for this message
Gavin Panella (allenap) wrote :

I surprised this works, but looks good.

review: Approve
Revision history for this message
Julian Edwards (julian-edwards) wrote :

On Thursday 04 Jul 2013 22:17:24 you wrote:
> Review: Approve
>
> I surprised this works, but looks good.

Me too, it doesn't work in the UI!

Revision history for this message
Raphaël Badin (rvb) wrote :

> On Thursday 04 Jul 2013 22:17:24 you wrote:
> > Review: Approve
> >
> > I surprised this works, but looks good.

Surprisingly, it seems to be very reliable and the only long operation is removing the disk(s) (takes ~10 minutes for one disk). Can you confirm that it works fine for you too?

> Me too, it doesn't work in the UI!

Hum, AFAIK deployments are not exposed as first-class objects in the UI so how can you say that it does not work in the UI?

In the UI, when you delete a cloud service with a deployment in it, you get a popup to ask you if you want to delete the deployment as well. That's how I got the idea for this branch (this uses the API to mimic this behavior — plus the removal of the disks).

Also, the doc page for "delete hosted service" mentions that you have to delete the deployments inside the service before you can get rid of the service (http://msdn.microsoft.com/en-us/library/windowsazure/gg441305.aspx) but the doc page for "delete deployment" doesn't say you have to delete the VMs inside it (http://msdn.microsoft.com/en-us/library/windowsazure/ee460815.aspx).

Revision history for this message
Julian Edwards (julian-edwards) wrote :

On Friday 05 Jul 2013 05:57:25 you wrote:
> > On Thursday 04 Jul 2013 22:17:24 you wrote:
> > > Review: Approve
> > >
> > > I surprised this works, but looks good.
>
> Surprisingly, it seems to be very reliable and the only long operation is
> removing the disk(s) (takes ~10 minutes for one disk). Can you confirm
> that it works fine for you too?
> > Me too, it doesn't work in the UI!
>
> Hum, AFAIK deployments are not exposed as first-class objects in the UI so
> how can you say that it does not work in the UI?

I'm talking about deleting the service.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: