I believe config-drive is the way to fix injection problems.  I use it and it works great.  (I just wish there was a way to use it from Horizon...)<div><br></div><div>We'll never be able to inject into every image; also some people don't want us messing with their images.</div>
<div><br></div><div>Config drive is effectively injection into a disk we create, so we pick a format that we know how to inject into.  It also seems to meet the needs of people that would prefer that we don't mess with their images.</div>
<div><br></div><div>Have you considered using config drive instead of primary disk injection?</div>
<div class="gmail_extra"><br>Justin</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 25, 2012 at 5:13 AM, Alvaro Lopez <span dir="ltr"><<a href="mailto:aloga@ifca.unican.es" target="_blank">aloga@ifca.unican.es</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear.<br>
<br>
I've run into troubles with the resize of partitions and file injection;<br>
using libvirt and raw images.<br>
<br>
According to <a href="https://bugs.launchpad.net/nova/+bug/929005" target="_blank">https://bugs.launchpad.net/nova/+bug/929005</a> file injection<br>
into images only works in the following situations:<br>
  1.- whole disk image -> inject to partition 1.<br>
  2.- separate kernel and ramdisk -> inject without partitions.<br>
<br>
In situation 1 (i.e. using whole disk images, with one partition<br>
inside) the file injection works fine, the disk is resized to the<br>
actual size, but the partition is not extended. This is because the<br>
'extend' function in 'nova/virt/disk/api.py' executes 'qemu-img',<br>
'e2fsck' and 'resize2fs' in a row, assuming that there are no<br>
partitions at all.<br>
<br>
In situation 2 (i.e. using whole disk images) if there is no kernel<br>
and ramdisk (but the file is a self-contained disk with an appropriate<br>
kernel) file injection does not work, but the resize works fine (since<br>
there are no partitions and the fsck and resize work as expected).<br>
<br>
Shouldn't the file injection be extended so as to make it work in any<br>
situation? That is, add injection without partitions and without<br>
kernel/ramdisk.<br>
<br>
Shouldn't the resize of disk take into account that it might be a disk<br>
with a (single) partition inside? This would imply dealing with the<br>
partitions (that is, delete and recreate them to the appropiate size).<br>
<br>
Regards,<br>
<span class="HOEnZb"><font color="#888888">--<br>
Álvaro López García                              <a href="mailto:aloga@ifca.unican.es">aloga@ifca.unican.es</a><br>
<br>
<br>
<br>
_______________________________________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
Post to     : <a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
More help   : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br>
</font></span></blockquote></div><br></div>