Code review comment for lp:~justin-fathomdb/nova/raw-disk-images

Revision history for this message
Jay Pipes (jaypipes) wrote :

> The 'mapped device not found' exception is actually tricky; it is expected if
> we can't read the partitions after loopback, which happens if we have a non-
> raw-disk-image (i.e. a 'sparse' format). The test is to try to make that case
> obvious. I'm not sure what we should do here, but currently the caller (at
> least for virtualbox) ignores errors when trying to inject the machine image.
> I've therefore left it as a raw exception.Error, but clarified the message to
> make the intent clearer.

OK, understood. I would still recommend making a new exception class in /nova/exception.py (MappedDeviceNotFound?) possibly inherited from IOError. Just makes the code a little cleaner, that's all.

> I've added the TODO. Again, there's a big picture question of what we should
> be injecting and how we should be injecting it; hopefully this will become
> clearer as we start launching more OSes and the guest agent shapes up (which
> is required for Windows, I believe)

Cool :)

> As for Cheetah, I have no particular reason to choose Cheetah vs any other
> templating system - it looked like decent syntax, the project seemed not-dead,
> and there's an Ubuntu package. I would suggest that we do need _a_ templating
> system, for complex templating or optional inclusions (here I use it so that
> the kernel and ramdisk XML elements are only output if they are needed). What
> that templating system is, I don't really care. The one datapoint I have is
> that Cheetah "works for me", but if anyone else has more experience...

Yeah, I'm not sure, which is why I asked others for opinions. I'm not familiar with Python's templating frameworks/libraries.

-jay

« Back to merge proposal