Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Virtualbox implementation
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post will appear after it is approved by moderators
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Adrian Cole  
View profile  
 More options Jan 3 2012, 11:20 am
From: Adrian Cole <adrian.f.c...@gmail.com>
Date: Tue, 3 Jan 2012 08:20:00 -0800
Subject: Re: Virtualbox implementation

Back at ya
On Jan 3, 2012 3:45 AM, "Andrea Turli" <andrea.tu...@gmail.com> wrote:

> Thanks Adrian for the feedback. Inline my comments:

> On Sat, Dec 31, 2011 at 5:46 PM, Adrian Cole <adrian.f.c...@gmail.com>
wrote:

>> Hi, Andrea.

>> Good stuff and thanks for pinging jclouds-dev + Thoughts inline.

>> On Dec 31, 2011 2:43 AM, "Andrea Turli" <andrea.tu...@gmail.com> wrote:

>> > I'm trying to implement the functionality to find all linked clones

and delete them if necessary.

>> > The idea like in the pipe shell is to compose different small function

to solve a bigger problem.
>> Warning.. Guava advise to follow :)

>> > Starting from these 3 operations:

>> > List<IMachine> findClonesOfAMachine(VmSpec)

>> Iterable<IMachine> clones = Iterables.filter(allMachines,

IMachinePredicates.ofSpec(vmspec));

> This is a good proposal but at the moment I'm not sure we can have the

list of all the machines to be filtered using the vbox api.
Interesting.  Care to elaborate? what can be listed?  As ComputeService
needs to impl listNodes, we need to figure out some strategy for this.

>> > VmSpec IMachineToVmSpec(IMachine)

>> Iterable<VmSpec> specs = Iterables.transform(clones,

IMachines.toVmSpec());

> This is implemented and already accepted in jclouds/jclouds.
Good job on that.

>> > UnregisterMachineIfExistsAndDeleteItsMedia(VmSpec)
>> Iterable<Boolean> deletedOrDidntExist = Iterables.transform(specs,

VmSpecs.unregisterAndDeleteMediaIfExists(vboxmgr));

>> Note this could be ... Functions.compose(unregisterIfExists,deleteMedia)

which is easier to test.

> I completely agree with this. Good idea.
Cool

>> > we can have something like:

>> > findClonesOfAMachine | IMachineToVmSpec

| UnregisterMachineIfExistsAndDeleteItsMedia

>> > to delete all the linked clones of a particular machine.

>> > There are some edge cases in this approach, more specifically, this

approach is not idempotent, in fact the order of the machines deletion is
important: first the linked clones than the "master".
>> You can add an ordering step before delete.

> If I have correctly understood you are suggesting to have also a check

inside "UnregisterMachineIfExistsAndDeleteItsMedia(machine)" to recursively
find & order all the clones of the given machine.

> In fact sometimes you cannot delete a 'master' machine, if it has been

linked cloned, because its hd is shared with other clones. In that case it
is reasonable to delete all the machines "attached to that master" to
finally delete the master.

> Maybe we need to improve VmSpec domain class with the list of linked

clones. wdyt?
By ordering I mean a separate sort step, which orders children first.

VmSpec is probably best used for specs to launch and a name like Vm is
better for runtime data like current children, imho. Wdyt?

> Andrea

>> > Is it reasonable? What do you think? Any suggestions?

>> Yep.  Very sensible.

>> Sounds like you want to emulate a shell pipeline.  Here's some hints:

>> Grep = Iterables.filter
>> Sed = Iterables.transform
>> Sort = Ordering...

>> Good job on this!  Keep us posted and in the loop.

>> -A

>> > Thanks,
>> > Andrea

>> > On Thu, Dec 22, 2011 at 3:10 PM, Andrea Turli <andrea.tu...@gmail.com>
wrote:

>> >> Thx Andrew.

>> >> On Thu, Dec 22, 2011 at 3:05 PM, Andrew Phillips <
aphill...@qrmedia.com> wrote:

>> >>>> If either some other VM refers to some snapshots (linked clone), or
you
>> >>>> have some leftover diff image...
>> >>>> you need to delete all linked clones first and then the original
machine.

>> >>> If I understand your explanation correctly,

UnregisterMachineIfExistsAndDeleteItsMedia will only work if there are no
linked clones. If this is "correct" according to virtualbox I don't think
it's something that needs to be fixed immediately, especially if the
"cleanup" one needs to do - delete all linked clones - is possible using
some kind of "delete loop" in client code.

>> >> This seems to be the expected behaviour according to vbox community.

>> >>> In that case, I think it would be OK to document the behaviour and

point to a code sample of how to find all linked clones and delete them if
necessary.

>> >> Actually this is a very good idea: we will add an helper to delete

all the linked clones starting from a machine.

>> >> Andrea

>> >>> ap

>> >>> --
>> >>> You received this message because you are subscribed to the Google

Groups "jclouds-dev" group.
>> >>> To post to this group, send email to jclouds-dev@googlegroups.com.
>> >>> To unsubscribe from this group, send email to

jclouds-dev+unsubscribe@googlegroups.com.
>> >>> For more options, visit this group at

http://groups.google.com/group/jclouds-dev?hl=en.

>> > --
>> > You received this message because you are subscribed to the Google

Groups "jclouds-dev" group.
>> > To post to this group, send email to jclouds-dev@googlegroups.com.
>> > To unsubscribe from this group, send email to

jclouds-dev+unsubscribe@googlegroups.com.
>> > For more options, visit this group at

http://groups.google.com/group/jclouds-dev?hl=en.

>> --
>> You received this message because you are subscribed to the Google

Groups "jclouds-dev" group.
>> To post to this group, send email to jclouds-dev@googlegroups.com.
>> To unsubscribe from this group, send email to

jclouds-dev+unsubscribe@googlegroups.com.
>> For more options, visit this group at

http://groups.google.com/group/jclouds-dev?hl=en.

> --
> You received this message because you are subscribed to the Google Groups

"jclouds-dev" group.
> To post to this group, send email to jclouds-dev@googlegroups.com.
> To unsubscribe from this group, send email to

jclouds-dev+unsubscribe@googlegroups.com.
> For more options, visit this group at

http://groups.google.com/group/jclouds-dev?hl=en.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.