You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Ioan Eugen Stan <st...@gmail.com> on 2013/01/16 22:59:07 UTC

force expunge

Hello,

I'm working on the CloudStack driver for Axembrl Provisionr [1] and
I'm having some issues with expunge. I can't delete a network before
all VM's that use it are destroyed and expunged. Expunging takes
forever and the delete network API call is executed before so I end
not cleaning up ok.

In a live test [2], I'm creating via jclouds API a network, register a
ssh key and create a VM. Then I destroy them in reverse, but I don't
wait for the VM to be expunged and this makes impossible the network
deletion. I'm leaking networks, which is not nice. Instructions to run
the live tests are here [3]

What is the best strategy in this case? Is there any way that I can
speed up/force expunging - API call, cloud configuration?

Thanks,

[1] https://github.com/axemblr/axemblr-provisionr/
[2] https://github.com/ieugen/axemblr-provisionr/blob/run-instance/providers/cloudstack/src/test/java/com/axemblr/provisionr/cloudstack/activities/CreateGatewayLiveTest.java
[3] end of README: https://github.com/ieugen/axemblr-provisionr
-- 
Ioan Eugen Stan / CTO / http://axemblr.com

Re: force expunge

Posted by Ioan Eugen Stan <st...@gmail.com>.
Hello Nik,

On Fri, Jan 18, 2013 at 4:55 PM, Nik Martin <ni...@nfinausa.com> wrote:
> On 01/18/2013 04:41 AM, Ioan Eugen Stan wrote:
>>
>> Hello Nik, Ahamad,
>>
>> I've asked on the list what API implementation to use [1] . From my
>> experience, when working with API's you end up writing a client. So if
>> one is already provided I choose to use that. It tends to be tested
>> and makes development easy and the code maintainable. Nobody wants
>> code that's hard to maintain. I could add a few more arguments but
>> it's not the point.
>
> I guess my point of asking is you really don't need an API client to talk to
> the CS API, it is drop dead simple.
>

Yep, it seems we don't have a choice for now.

>> Regarding the expunge time, I've tested with a cloud that kept
>> machines in 'Destroyed' state for as long as 20 minutes or more. I
>> never stayed so long as to see how long, but the idea is that I can't
>> clean up networks and maybe other stuff in that time. This is not
>> something that you would like when you wish to automate stuff around
>> CloudStack.  You NEED to be able clean on demand.
>
> Have you found the TWO parameters that affect expunge time? they are 1800
> secs by default: expunge.delay and expunge.interval.  Also, expunge.workers
> is how many expunge threads to run at a time. If you set both of those to 10
> and have sufficient expunge workers, the vms will be expunged.

We don't administrate the cloud. We are building an application that
consumes CloudStack. We can't change the settings ourselves but we may
ask for saner values.

> Unfortunately, you may need to adopt Cloudstack's "lazy" way of cleaning up,
> which is to create a scheduled task that goes through and cleans up every
> hour or so.  The lack of VMs in an account is not a reason to delete the
> network, unless you are also trying to delete the account along with it.

I don't think you understand what we are trying to achieve so please
let me explain:

We wish to create and destroy pools of virtual machines with a defined
configuration (hardware, OS, installed packages and network access).
This should be done automatic and reliable. Having networks as
leftovers is not an option because next time we might not be able to
create a new network (exceeded resource limits). Not being able to
delete everything is a a limitation from our point of view.
Let's hope we might achieve something by creating everything under a
new account and deleting the account at the end.

Thanks for the support so far,

Cheers,

>>
>> Ahamad: I'm using [2] fot documentation. I have tests that create and
>> delete[3] networks and work fine [4]. The network does not get deleted
>> when there are VM's associated with it. The delete network operation
>> fails, the VM's can be destroyed, or expunging, it doesn't matter.
>>
>> Cheers,
>>
>> [1] http://markmail.org/message/eeobo37hyqilya6g
>> [2] http://download.cloud.com/releases/3.0.0/api_3.0.0/TOC_User.html
>> [3]
>> https://github.com/ieugen/axemblr-provisionr/blob/run-instance/providers/cloudstack/src/main/java/com/axemblr/provisionr/cloudstack/activities/DeleteNetwork.java
>> [4]
>> https://github.com/ieugen/axemblr-provisionr/blob/run-instance/providers/cloudstack/src/test/java/com/axemblr/provisionr/cloudstack/activities/EnsureNetworkExistsLiveTest.java
>>
>>
>
>
> --
>
> Regards,
>
> Nik
>
> Nik Martin
> nfina Technologies, Inc.
> +1.251.243.0043 x1003
> http://nfinausa.com
> Relentless Reliability



-- 
Ioan Eugen Stan / CTO / http://axemblr.com

Re: force expunge

Posted by Nik Martin <ni...@nfinausa.com>.
On 01/18/2013 04:41 AM, Ioan Eugen Stan wrote:
> Hello Nik, Ahamad,
>
> I've asked on the list what API implementation to use [1] . From my
> experience, when working with API's you end up writing a client. So if
> one is already provided I choose to use that. It tends to be tested
> and makes development easy and the code maintainable. Nobody wants
> code that's hard to maintain. I could add a few more arguments but
> it's not the point.
I guess my point of asking is you really don't need an API client to 
talk to the CS API, it is drop dead simple.

> Regarding the expunge time, I've tested with a cloud that kept
> machines in 'Destroyed' state for as long as 20 minutes or more. I
> never stayed so long as to see how long, but the idea is that I can't
> clean up networks and maybe other stuff in that time. This is not
> something that you would like when you wish to automate stuff around
> CloudStack.  You NEED to be able clean on demand.
Have you found the TWO parameters that affect expunge time? they are 
1800 secs by default: expunge.delay and expunge.interval.  Also, 
expunge.workers is how many expunge threads to run at a time. If you set 
both of those to 10 and have sufficient expunge workers, the vms will be 
expunged.

Unfortunately, you may need to adopt Cloudstack's "lazy" way of cleaning 
up, which is to create a scheduled task that goes through and cleans up 
every hour or so.  The lack of VMs in an account is not a reason to 
delete the network, unless you are also trying to delete the account 
along with it.
>
> Ahamad: I'm using [2] fot documentation. I have tests that create and
> delete[3] networks and work fine [4]. The network does not get deleted
> when there are VM's associated with it. The delete network operation
> fails, the VM's can be destroyed, or expunging, it doesn't matter.
>
> Cheers,
>
> [1] http://markmail.org/message/eeobo37hyqilya6g
> [2] http://download.cloud.com/releases/3.0.0/api_3.0.0/TOC_User.html
> [3] https://github.com/ieugen/axemblr-provisionr/blob/run-instance/providers/cloudstack/src/main/java/com/axemblr/provisionr/cloudstack/activities/DeleteNetwork.java
> [4] https://github.com/ieugen/axemblr-provisionr/blob/run-instance/providers/cloudstack/src/test/java/com/axemblr/provisionr/cloudstack/activities/EnsureNetworkExistsLiveTest.java
>
>


-- 

Regards,

Nik

Nik Martin
nfina Technologies, Inc.
+1.251.243.0043 x1003
http://nfinausa.com
Relentless Reliability

Re: force expunge

Posted by Ioan Eugen Stan <st...@gmail.com>.
Hello Nik, Ahamad,

I've asked on the list what API implementation to use [1] . From my
experience, when working with API's you end up writing a client. So if
one is already provided I choose to use that. It tends to be tested
and makes development easy and the code maintainable. Nobody wants
code that's hard to maintain. I could add a few more arguments but
it's not the point.

Regarding the expunge time, I've tested with a cloud that kept
machines in 'Destroyed' state for as long as 20 minutes or more. I
never stayed so long as to see how long, but the idea is that I can't
clean up networks and maybe other stuff in that time. This is not
something that you would like when you wish to automate stuff around
CloudStack.  You NEED to be able clean on demand.

Ahamad: I'm using [2] fot documentation. I have tests that create and
delete[3] networks and work fine [4]. The network does not get deleted
when there are VM's associated with it. The delete network operation
fails, the VM's can be destroyed, or expunging, it doesn't matter.

Cheers,

[1] http://markmail.org/message/eeobo37hyqilya6g
[2] http://download.cloud.com/releases/3.0.0/api_3.0.0/TOC_User.html
[3] https://github.com/ieugen/axemblr-provisionr/blob/run-instance/providers/cloudstack/src/main/java/com/axemblr/provisionr/cloudstack/activities/DeleteNetwork.java
[4] https://github.com/ieugen/axemblr-provisionr/blob/run-instance/providers/cloudstack/src/test/java/com/axemblr/provisionr/cloudstack/activities/EnsureNetworkExistsLiveTest.java


-- 
Ioan Eugen Stan / CTO / http://axemblr.com

Re: force expunge

Posted by Ahmad Emneina <Ah...@citrix.com>.
On 1/17/13 8:35 AM, "Nik Martin" <ni...@nfinausa.com> wrote:

>On 01/17/2013 07:57 AM, Ioan Eugen Stan wrote:
>> Hello,
>>
>> Saliaja: I'm afraid not. jclouds support for CloudStack API is at
>> version 2.x+ and for what it does, it works great and it's clean.
>>
>> Nik: Not an option. It will be a mess mixing Java with JavaScript. You
>> would not wish to maintain such a software.
>>
>Went and checked out your site a bit, so now I'm curious. Why are you
>using jclouds at all?  Do you need to interface to multiple cloud APIs?
>  Interfacing directly with CS's API is trivial.
>
>> It seems that the expunge time vary greatly. My query heuristics is
>> also not that reliable so for now the only choice I have is to do the
>> best I can in most situations and accepts the fact that we may leak
>> resources.
>Expunge time is a scheduled event, so depending on when you call delete
>vm, you could be one second into the expunge schedule, or only have one
>second left, so worst case is expunge.time - 1, best case is
>expunge.time - expunge.time + 1
>
>>
>> Thanks for the support.
>>
>> Cheers,
>>
>
>
>-- 
>
>Regards,
>
>Nik
>
>Nik Martin
>nfina Technologies, Inc.
>+1.251.243.0043 x1003
>http://nfinausa.com
>Relentless Reliability
>

Above and beyond vm expunge times is the network.gc.* global params. This
will run a cleanup process when no vm's are using this network.

Have you experimented with the delete network api[1]?

[1] 
https://incubator.apache.org/cloudstack/docs/api/apidocs-4.0.0/user/deleteN
etwork.html
-- 
Æ




Re: force expunge

Posted by Nik Martin <ni...@nfinausa.com>.
On 01/17/2013 07:57 AM, Ioan Eugen Stan wrote:
> Hello,
>
> Saliaja: I'm afraid not. jclouds support for CloudStack API is at
> version 2.x+ and for what it does, it works great and it's clean.
>
> Nik: Not an option. It will be a mess mixing Java with JavaScript. You
> would not wish to maintain such a software.
>
Went and checked out your site a bit, so now I'm curious. Why are you 
using jclouds at all?  Do you need to interface to multiple cloud APIs? 
  Interfacing directly with CS's API is trivial.

> It seems that the expunge time vary greatly. My query heuristics is
> also not that reliable so for now the only choice I have is to do the
> best I can in most situations and accepts the fact that we may leak
> resources.
Expunge time is a scheduled event, so depending on when you call delete 
vm, you could be one second into the expunge schedule, or only have one 
second left, so worst case is expunge.time - 1, best case is 
expunge.time - expunge.time + 1

>
> Thanks for the support.
>
> Cheers,
>


-- 

Regards,

Nik

Nik Martin
nfina Technologies, Inc.
+1.251.243.0043 x1003
http://nfinausa.com
Relentless Reliability

Re: force expunge

Posted by Ioan Eugen Stan <st...@gmail.com>.
Hello,

Saliaja: I'm afraid not. jclouds support for CloudStack API is at
version 2.x+ and for what it does, it works great and it's clean.

Nik: Not an option. It will be a mess mixing Java with JavaScript. You
would not wish to maintain such a software.

It seems that the expunge time vary greatly. My query heuristics is
also not that reliable so for now the only choice I have is to do the
best I can in most situations and accepts the fact that we may leak
resources.

Thanks for the support.

Cheers,
-- 
Ioan Eugen Stan / CTO / http://axemblr.com

RE: force expunge

Posted by Sailaja Mada <sa...@citrix.com>.
Hi,

I guess we can achieve force expunge by deleting the account.  Does Jcloud - Cloudstack support Delete Account ?

Thanks ,
Sailaja.M

-----Original Message-----
From: Ioan Eugen Stan [mailto:stan.ieugen@gmail.com] 
Sent: Thursday, January 17, 2013 3:28 PM
To: cloudstack-users@incubator.apache.org
Subject: Re: force expunge

Thank you Chris,

Please accept my sincerest apologies for this mistake. My eyes fooled me.

Best regards,

On Thu, Jan 17, 2013 at 11:55 AM, Ioan Eugen Stan <st...@gmail.com> wrote:
> Hello Nick,
>
> Thanks for the advice. I think it might work. There is a problem 
> though, jclouds does not support Projects API yet as it lacks support 
> for some CloudStack 3.x features. I'll go for a hack and sleep until 
> the machines are expunged and look for a way to bump jclouds 
> CloudStack support. I would love to work on jclouds support for 
> CloudStack.
>
> Cheers,
>
> On Thu, Jan 17, 2013 at 2:22 AM, Chris Sears <ch...@sungard.com> wrote:
>> I'm not sure if this would work, but you could try creating the VMs 
>> and networks as part of a project, and then deleting the project.
>>
>>
>> On Wed, Jan 16, 2013 at 5:16 PM, Ioan Eugen Stan <st...@gmail.com>wrote:
>>
>>> Hello Nick,
>>>
>>> Thanks for the quick answer. I was hoping for a miracle :) but I 
>>> guess there is no forceExpunge flag that I can set. So the only 
>>> thing left to do is wait for the expunge job to finish. I wonder if 
>>> there are any plans to implement such a feature.
>>>
>>> Cheers,
>>>
>>> On Thu, Jan 17, 2013 at 12:07 AM, Nik Martin 
>>> <ni...@nfinausa.com>
>>> wrote:
>>> > There is a global setting in the CS UI that sets the time for the 
>>> > expunge task to run. it runs on a schedule. Set the VM expunge 
>>> > timeout to 60 and
>>> it
>>> > will rn once a minute.
>>> >
>>> > Regards,
>>> >
>>> > Nik
>>> >
>>> > Nik Martin
>>> > +1.251.243.0043 x1003
>>> > Relentless Reliability
>>> >
>>> >
>>> >
>>> > On Wed, 16 Jan 2013, Ioan Eugen Stan wrote:
>>> >
>>> >> Hello,
>>> >>
>>> >> I'm working on the CloudStack driver for Axembrl Provisionr [1] 
>>> >> and I'm having some issues with expunge. I can't delete a network 
>>> >> before all VM's that use it are destroyed and expunged. Expunging 
>>> >> takes forever and the delete network API call is executed before 
>>> >> so I end not cleaning up ok.
>>> >>
>>> >> In a live test [2], I'm creating via jclouds API a network, 
>>> >> register a ssh key and create a VM. Then I destroy them in 
>>> >> reverse, but I don't wait for the VM to be expunged and this 
>>> >> makes impossible the network deletion. I'm leaking networks, 
>>> >> which is not nice. Instructions to run the live tests are here 
>>> >> [3]
>>> >>
>>> >> What is the best strategy in this case? Is there any way that I 
>>> >> can speed up/force expunging - API call, cloud configuration?
>>> >>
>>> >> Thanks,
>>> >>
>>> >> [1] https://github.com/axemblr/axemblr-provisionr/
>>> >> [2]
>>> >>
>>> https://github.com/ieugen/axemblr-provisionr/blob/run-instance/provi
>>> ders/cloudstack/src/test/java/com/axemblr/provisionr/cloudstack/acti
>>> vities/CreateGatewayLiveTest.java
>>> >> [3] end of README: https://github.com/ieugen/axemblr-provisionr
>>> >> --
>>> >> Ioan Eugen Stan / CTO / http://axemblr.com
>>> >>
>>> >
>>>
>>>
>>>
>>> --
>>> Ioan Eugen Stan / CTO / http://axemblr.com
>>>
>>>
>
>
>
> --
> Ioan Eugen Stan / CTO / http://axemblr.com



--
Ioan Eugen Stan / CTO / http://axemblr.com

Re: force expunge

Posted by Nik Martin <ni...@nfinausa.com>.
I'm not familiar with jclouds, but there is a node.js api client that handles any and all cloudstack commands. It's on github. 




Ioan Eugen Stan <st...@gmail.com> wrote:

>Thank you Chris,
>
>Please accept my sincerest apologies for this mistake. My eyes fooled
>me.
>
>Best regards,
>
>On Thu, Jan 17, 2013 at 11:55 AM, Ioan Eugen Stan
><st...@gmail.com> wrote:
>> Hello Nick,
>>
>> Thanks for the advice. I think it might work. There is a problem
>> though, jclouds does not support Projects API yet as it lacks support
>> for some CloudStack 3.x features. I'll go for a hack and sleep until
>> the machines are expunged and look for a way to bump jclouds
>> CloudStack support. I would love to work on jclouds support for
>> CloudStack.
>>
>> Cheers,
>>
>> On Thu, Jan 17, 2013 at 2:22 AM, Chris Sears
><ch...@sungard.com> wrote:
>>> I'm not sure if this would work, but you could try creating the VMs
>and
>>> networks as part of a project, and then deleting the project.
>>>
>>>
>>> On Wed, Jan 16, 2013 at 5:16 PM, Ioan Eugen Stan
><st...@gmail.com>wrote:
>>>
>>>> Hello Nick,
>>>>
>>>> Thanks for the quick answer. I was hoping for a miracle :) but I
>guess
>>>> there is no forceExpunge flag that I can set. So the only thing
>left
>>>> to do is wait for the expunge job to finish. I wonder if there are
>any
>>>> plans to implement such a feature.
>>>>
>>>> Cheers,
>>>>
>>>> On Thu, Jan 17, 2013 at 12:07 AM, Nik Martin
><ni...@nfinausa.com>
>>>> wrote:
>>>> > There is a global setting in the CS UI that sets the time for the
>expunge
>>>> > task to run. it runs on a schedule. Set the VM expunge timeout to
>60 and
>>>> it
>>>> > will rn once a minute.
>>>> >
>>>> > Regards,
>>>> >
>>>> > Nik
>>>> >
>>>> > Nik Martin
>>>> > +1.251.243.0043 x1003
>>>> > Relentless Reliability
>>>> >
>>>> >
>>>> >
>>>> > On Wed, 16 Jan 2013, Ioan Eugen Stan wrote:
>>>> >
>>>> >> Hello,
>>>> >>
>>>> >> I'm working on the CloudStack driver for Axembrl Provisionr [1]
>and
>>>> >> I'm having some issues with expunge. I can't delete a network
>before
>>>> >> all VM's that use it are destroyed and expunged. Expunging takes
>>>> >> forever and the delete network API call is executed before so I
>end
>>>> >> not cleaning up ok.
>>>> >>
>>>> >> In a live test [2], I'm creating via jclouds API a network,
>register a
>>>> >> ssh key and create a VM. Then I destroy them in reverse, but I
>don't
>>>> >> wait for the VM to be expunged and this makes impossible the
>network
>>>> >> deletion. I'm leaking networks, which is not nice. Instructions
>to run
>>>> >> the live tests are here [3]
>>>> >>
>>>> >> What is the best strategy in this case? Is there any way that I
>can
>>>> >> speed up/force expunging - API call, cloud configuration?
>>>> >>
>>>> >> Thanks,
>>>> >>
>>>> >> [1] https://github.com/axemblr/axemblr-provisionr/
>>>> >> [2]
>>>> >>
>>>>
>https://github.com/ieugen/axemblr-provisionr/blob/run-instance/providers/cloudstack/src/test/java/com/axemblr/provisionr/cloudstack/activities/CreateGatewayLiveTest.java
>>>> >> [3] end of README: https://github.com/ieugen/axemblr-provisionr
>>>> >> --
>>>> >> Ioan Eugen Stan / CTO / http://axemblr.com
>>>> >>
>>>> >
>>>>
>>>>
>>>>
>>>> --
>>>> Ioan Eugen Stan / CTO / http://axemblr.com
>>>>
>>>>
>>
>>
>>
>> --
>> Ioan Eugen Stan / CTO / http://axemblr.com
>
>
>
>-- 
>Ioan Eugen Stan / CTO / http://axemblr.com

-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

Re: force expunge

Posted by Ioan Eugen Stan <st...@gmail.com>.
Thank you Chris,

Please accept my sincerest apologies for this mistake. My eyes fooled me.

Best regards,

On Thu, Jan 17, 2013 at 11:55 AM, Ioan Eugen Stan <st...@gmail.com> wrote:
> Hello Nick,
>
> Thanks for the advice. I think it might work. There is a problem
> though, jclouds does not support Projects API yet as it lacks support
> for some CloudStack 3.x features. I'll go for a hack and sleep until
> the machines are expunged and look for a way to bump jclouds
> CloudStack support. I would love to work on jclouds support for
> CloudStack.
>
> Cheers,
>
> On Thu, Jan 17, 2013 at 2:22 AM, Chris Sears <ch...@sungard.com> wrote:
>> I'm not sure if this would work, but you could try creating the VMs and
>> networks as part of a project, and then deleting the project.
>>
>>
>> On Wed, Jan 16, 2013 at 5:16 PM, Ioan Eugen Stan <st...@gmail.com>wrote:
>>
>>> Hello Nick,
>>>
>>> Thanks for the quick answer. I was hoping for a miracle :) but I guess
>>> there is no forceExpunge flag that I can set. So the only thing left
>>> to do is wait for the expunge job to finish. I wonder if there are any
>>> plans to implement such a feature.
>>>
>>> Cheers,
>>>
>>> On Thu, Jan 17, 2013 at 12:07 AM, Nik Martin <ni...@nfinausa.com>
>>> wrote:
>>> > There is a global setting in the CS UI that sets the time for the expunge
>>> > task to run. it runs on a schedule. Set the VM expunge timeout to 60 and
>>> it
>>> > will rn once a minute.
>>> >
>>> > Regards,
>>> >
>>> > Nik
>>> >
>>> > Nik Martin
>>> > +1.251.243.0043 x1003
>>> > Relentless Reliability
>>> >
>>> >
>>> >
>>> > On Wed, 16 Jan 2013, Ioan Eugen Stan wrote:
>>> >
>>> >> Hello,
>>> >>
>>> >> I'm working on the CloudStack driver for Axembrl Provisionr [1] and
>>> >> I'm having some issues with expunge. I can't delete a network before
>>> >> all VM's that use it are destroyed and expunged. Expunging takes
>>> >> forever and the delete network API call is executed before so I end
>>> >> not cleaning up ok.
>>> >>
>>> >> In a live test [2], I'm creating via jclouds API a network, register a
>>> >> ssh key and create a VM. Then I destroy them in reverse, but I don't
>>> >> wait for the VM to be expunged and this makes impossible the network
>>> >> deletion. I'm leaking networks, which is not nice. Instructions to run
>>> >> the live tests are here [3]
>>> >>
>>> >> What is the best strategy in this case? Is there any way that I can
>>> >> speed up/force expunging - API call, cloud configuration?
>>> >>
>>> >> Thanks,
>>> >>
>>> >> [1] https://github.com/axemblr/axemblr-provisionr/
>>> >> [2]
>>> >>
>>> https://github.com/ieugen/axemblr-provisionr/blob/run-instance/providers/cloudstack/src/test/java/com/axemblr/provisionr/cloudstack/activities/CreateGatewayLiveTest.java
>>> >> [3] end of README: https://github.com/ieugen/axemblr-provisionr
>>> >> --
>>> >> Ioan Eugen Stan / CTO / http://axemblr.com
>>> >>
>>> >
>>>
>>>
>>>
>>> --
>>> Ioan Eugen Stan / CTO / http://axemblr.com
>>>
>>>
>
>
>
> --
> Ioan Eugen Stan / CTO / http://axemblr.com



-- 
Ioan Eugen Stan / CTO / http://axemblr.com

Re: force expunge

Posted by Ioan Eugen Stan <st...@gmail.com>.
Hello Nick,

Thanks for the advice. I think it might work. There is a problem
though, jclouds does not support Projects API yet as it lacks support
for some CloudStack 3.x features. I'll go for a hack and sleep until
the machines are expunged and look for a way to bump jclouds
CloudStack support. I would love to work on jclouds support for
CloudStack.

Cheers,

On Thu, Jan 17, 2013 at 2:22 AM, Chris Sears <ch...@sungard.com> wrote:
> I'm not sure if this would work, but you could try creating the VMs and
> networks as part of a project, and then deleting the project.
>
>
> On Wed, Jan 16, 2013 at 5:16 PM, Ioan Eugen Stan <st...@gmail.com>wrote:
>
>> Hello Nick,
>>
>> Thanks for the quick answer. I was hoping for a miracle :) but I guess
>> there is no forceExpunge flag that I can set. So the only thing left
>> to do is wait for the expunge job to finish. I wonder if there are any
>> plans to implement such a feature.
>>
>> Cheers,
>>
>> On Thu, Jan 17, 2013 at 12:07 AM, Nik Martin <ni...@nfinausa.com>
>> wrote:
>> > There is a global setting in the CS UI that sets the time for the expunge
>> > task to run. it runs on a schedule. Set the VM expunge timeout to 60 and
>> it
>> > will rn once a minute.
>> >
>> > Regards,
>> >
>> > Nik
>> >
>> > Nik Martin
>> > +1.251.243.0043 x1003
>> > Relentless Reliability
>> >
>> >
>> >
>> > On Wed, 16 Jan 2013, Ioan Eugen Stan wrote:
>> >
>> >> Hello,
>> >>
>> >> I'm working on the CloudStack driver for Axembrl Provisionr [1] and
>> >> I'm having some issues with expunge. I can't delete a network before
>> >> all VM's that use it are destroyed and expunged. Expunging takes
>> >> forever and the delete network API call is executed before so I end
>> >> not cleaning up ok.
>> >>
>> >> In a live test [2], I'm creating via jclouds API a network, register a
>> >> ssh key and create a VM. Then I destroy them in reverse, but I don't
>> >> wait for the VM to be expunged and this makes impossible the network
>> >> deletion. I'm leaking networks, which is not nice. Instructions to run
>> >> the live tests are here [3]
>> >>
>> >> What is the best strategy in this case? Is there any way that I can
>> >> speed up/force expunging - API call, cloud configuration?
>> >>
>> >> Thanks,
>> >>
>> >> [1] https://github.com/axemblr/axemblr-provisionr/
>> >> [2]
>> >>
>> https://github.com/ieugen/axemblr-provisionr/blob/run-instance/providers/cloudstack/src/test/java/com/axemblr/provisionr/cloudstack/activities/CreateGatewayLiveTest.java
>> >> [3] end of README: https://github.com/ieugen/axemblr-provisionr
>> >> --
>> >> Ioan Eugen Stan / CTO / http://axemblr.com
>> >>
>> >
>>
>>
>>
>> --
>> Ioan Eugen Stan / CTO / http://axemblr.com
>>
>>



-- 
Ioan Eugen Stan / CTO / http://axemblr.com

Re: force expunge

Posted by Chris Sears <ch...@sungard.com>.
I'm not sure if this would work, but you could try creating the VMs and
networks as part of a project, and then deleting the project.


On Wed, Jan 16, 2013 at 5:16 PM, Ioan Eugen Stan <st...@gmail.com>wrote:

> Hello Nick,
>
> Thanks for the quick answer. I was hoping for a miracle :) but I guess
> there is no forceExpunge flag that I can set. So the only thing left
> to do is wait for the expunge job to finish. I wonder if there are any
> plans to implement such a feature.
>
> Cheers,
>
> On Thu, Jan 17, 2013 at 12:07 AM, Nik Martin <ni...@nfinausa.com>
> wrote:
> > There is a global setting in the CS UI that sets the time for the expunge
> > task to run. it runs on a schedule. Set the VM expunge timeout to 60 and
> it
> > will rn once a minute.
> >
> > Regards,
> >
> > Nik
> >
> > Nik Martin
> > +1.251.243.0043 x1003
> > Relentless Reliability
> >
> >
> >
> > On Wed, 16 Jan 2013, Ioan Eugen Stan wrote:
> >
> >> Hello,
> >>
> >> I'm working on the CloudStack driver for Axembrl Provisionr [1] and
> >> I'm having some issues with expunge. I can't delete a network before
> >> all VM's that use it are destroyed and expunged. Expunging takes
> >> forever and the delete network API call is executed before so I end
> >> not cleaning up ok.
> >>
> >> In a live test [2], I'm creating via jclouds API a network, register a
> >> ssh key and create a VM. Then I destroy them in reverse, but I don't
> >> wait for the VM to be expunged and this makes impossible the network
> >> deletion. I'm leaking networks, which is not nice. Instructions to run
> >> the live tests are here [3]
> >>
> >> What is the best strategy in this case? Is there any way that I can
> >> speed up/force expunging - API call, cloud configuration?
> >>
> >> Thanks,
> >>
> >> [1] https://github.com/axemblr/axemblr-provisionr/
> >> [2]
> >>
> https://github.com/ieugen/axemblr-provisionr/blob/run-instance/providers/cloudstack/src/test/java/com/axemblr/provisionr/cloudstack/activities/CreateGatewayLiveTest.java
> >> [3] end of README: https://github.com/ieugen/axemblr-provisionr
> >> --
> >> Ioan Eugen Stan / CTO / http://axemblr.com
> >>
> >
>
>
>
> --
> Ioan Eugen Stan / CTO / http://axemblr.com
>
>

Re: force expunge

Posted by Nik Martin <ni...@nfinausa.com>.
Yes, I don't think anything will force an expunge.  The destroyVM command 
is async, so you get back a jobid that you can then query to check when it 
is deleted, but I don't think this job includes the expunge, it just 
includes the tasks that actually remove the VM. Your best bet is just a 
low expunge interval.

Regards,

Nik

Nik Martin
+1.251.243.0043 x1003
Relentless Reliability


On Thu, 17 Jan 2013, Ioan Eugen Stan wrote:

> Hello Nick,
>
> Thanks for the quick answer. I was hoping for a miracle :) but I guess
> there is no forceExpunge flag that I can set. So the only thing left
> to do is wait for the expunge job to finish. I wonder if there are any
> plans to implement such a feature.
>
> Cheers,
>
> On Thu, Jan 17, 2013 at 12:07 AM, Nik Martin <ni...@nfinausa.com> wrote:
>> There is a global setting in the CS UI that sets the time for the expunge
>> task to run. it runs on a schedule. Set the VM expunge timeout to 60 and it
>> will rn once a minute.
>>
>> Regards,
>>
>> Nik
>>
>> Nik Martin
>> +1.251.243.0043 x1003
>> Relentless Reliability
>>
>>
>>
>> On Wed, 16 Jan 2013, Ioan Eugen Stan wrote:
>>
>>> Hello,
>>>
>>> I'm working on the CloudStack driver for Axembrl Provisionr [1] and
>>> I'm having some issues with expunge. I can't delete a network before
>>> all VM's that use it are destroyed and expunged. Expunging takes
>>> forever and the delete network API call is executed before so I end
>>> not cleaning up ok.
>>>
>>> In a live test [2], I'm creating via jclouds API a network, register a
>>> ssh key and create a VM. Then I destroy them in reverse, but I don't
>>> wait for the VM to be expunged and this makes impossible the network
>>> deletion. I'm leaking networks, which is not nice. Instructions to run
>>> the live tests are here [3]
>>>
>>> What is the best strategy in this case? Is there any way that I can
>>> speed up/force expunging - API call, cloud configuration?
>>>
>>> Thanks,
>>>
>>> [1] https://github.com/axemblr/axemblr-provisionr/
>>> [2]
>>> https://github.com/ieugen/axemblr-provisionr/blob/run-instance/providers/cloudstack/src/test/java/com/axemblr/provisionr/cloudstack/activities/CreateGatewayLiveTest.java
>>> [3] end of README: https://github.com/ieugen/axemblr-provisionr
>>> --
>>> Ioan Eugen Stan / CTO / http://axemblr.com
>>>
>>
>
>
>
> -- 
> Ioan Eugen Stan / CTO / http://axemblr.com
>

Re: force expunge

Posted by Ioan Eugen Stan <st...@gmail.com>.
Hello Nick,

Thanks for the quick answer. I was hoping for a miracle :) but I guess
there is no forceExpunge flag that I can set. So the only thing left
to do is wait for the expunge job to finish. I wonder if there are any
plans to implement such a feature.

Cheers,

On Thu, Jan 17, 2013 at 12:07 AM, Nik Martin <ni...@nfinausa.com> wrote:
> There is a global setting in the CS UI that sets the time for the expunge
> task to run. it runs on a schedule. Set the VM expunge timeout to 60 and it
> will rn once a minute.
>
> Regards,
>
> Nik
>
> Nik Martin
> +1.251.243.0043 x1003
> Relentless Reliability
>
>
>
> On Wed, 16 Jan 2013, Ioan Eugen Stan wrote:
>
>> Hello,
>>
>> I'm working on the CloudStack driver for Axembrl Provisionr [1] and
>> I'm having some issues with expunge. I can't delete a network before
>> all VM's that use it are destroyed and expunged. Expunging takes
>> forever and the delete network API call is executed before so I end
>> not cleaning up ok.
>>
>> In a live test [2], I'm creating via jclouds API a network, register a
>> ssh key and create a VM. Then I destroy them in reverse, but I don't
>> wait for the VM to be expunged and this makes impossible the network
>> deletion. I'm leaking networks, which is not nice. Instructions to run
>> the live tests are here [3]
>>
>> What is the best strategy in this case? Is there any way that I can
>> speed up/force expunging - API call, cloud configuration?
>>
>> Thanks,
>>
>> [1] https://github.com/axemblr/axemblr-provisionr/
>> [2]
>> https://github.com/ieugen/axemblr-provisionr/blob/run-instance/providers/cloudstack/src/test/java/com/axemblr/provisionr/cloudstack/activities/CreateGatewayLiveTest.java
>> [3] end of README: https://github.com/ieugen/axemblr-provisionr
>> --
>> Ioan Eugen Stan / CTO / http://axemblr.com
>>
>



-- 
Ioan Eugen Stan / CTO / http://axemblr.com

Re: force expunge

Posted by Nik Martin <ni...@nfinausa.com>.
There is a global setting in the CS UI that sets the time for the expunge 
task to run. it runs on a schedule. Set the VM expunge timeout to 60 and 
it will rn once a minute.

Regards,

Nik

Nik Martin
+1.251.243.0043 x1003
Relentless Reliability


On Wed, 16 Jan 2013, Ioan Eugen Stan wrote:

> Hello,
>
> I'm working on the CloudStack driver for Axembrl Provisionr [1] and
> I'm having some issues with expunge. I can't delete a network before
> all VM's that use it are destroyed and expunged. Expunging takes
> forever and the delete network API call is executed before so I end
> not cleaning up ok.
>
> In a live test [2], I'm creating via jclouds API a network, register a
> ssh key and create a VM. Then I destroy them in reverse, but I don't
> wait for the VM to be expunged and this makes impossible the network
> deletion. I'm leaking networks, which is not nice. Instructions to run
> the live tests are here [3]
>
> What is the best strategy in this case? Is there any way that I can
> speed up/force expunging - API call, cloud configuration?
>
> Thanks,
>
> [1] https://github.com/axemblr/axemblr-provisionr/
> [2] https://github.com/ieugen/axemblr-provisionr/blob/run-instance/providers/cloudstack/src/test/java/com/axemblr/provisionr/cloudstack/activities/CreateGatewayLiveTest.java
> [3] end of README: https://github.com/ieugen/axemblr-provisionr
> -- 
> Ioan Eugen Stan / CTO / http://axemblr.com
>