Code sharing between Factory and Warehouse

Ian McLeod imcleod at redhat.com
Fri May 20 18:32:41 UTC 2011


Pete,

On Fri, 2011-05-20 at 11:24 -0600, Pete Zaitcev wrote:
> Hi, guys:
> 
> I transcoded Ian's code for uploading into vSpere yesterday, because
> Warehouse is in C and he wrote it in Python... This got me thinking about
> a sharing possibility. Currently, every registration in IW is a fork/exec
> for a nicely self-contained program, with vSphere being by far the
> most volumnous. Would it make sense to provide some kind of child
> package, like iwhd-backends, which packaged them for outside use?
> 
> I suspect that Jeff himself had something like that in mind, because
> these programs are traditionally called dc-something-register, which
> I presume meant to make them a part of DeltaCloud, rather than internal
> implementation details of iwhd.
> 
> The main objective is to fix any future bugs in one place. But I don't want
> to do the work if nobody is going to use the result.
> 
> -- P

Thank you for bringing this up.

As things stand the only backend for which we intend to use the iwhd
push functionality is RHEV-M.  We do not use the existing EC2 iwhd push
functionality and we plan on supporting VMWare ESX pushes via the Python
code that I shared with you a few days ago.  

For non-upload clouds such as Rackspace and for the "snapshot" style of
builds on EC2, using the Warehouse for pushes simply isn't possible
since we use it strictly as a metadata store.

Even in that RHEV-M case, we've discussed the possibility of doing the
file move internal to the Factory and re-implementing the RHEV-M API
call in the Factory.

Our primary reason for favoring the internal implementation is similar
to one you've outlined above; error detection and reporting are easier
when we don't have to traverse a second external API.

I suppose it would be possible to move all the cloud-specific push code
to an external module that is shared between iwhd and the Factory.
However, it's not immediately clear to me how this would be structured
nor is it clear that this would be preferable to simply deciding, once
and for all, that "push functionality" should live in one place or the
other.

-Ian



More information about the iwhd-devel mailing list