<div dir="ltr"><div class="gmail_default" style="font-family:courier new,monospace"><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jul 1, 2013 at 11:14 AM, Vishvananda Ishaya <span dir="ltr"><<a href="mailto:vishvananda@gmail.com" target="_blank">vishvananda@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><div class="im"><div>On Jul 1, 2013, at 3:35 AM, Sheng Bo Hou <<a href="mailto:sbhou@cn.ibm.com" target="_blank">sbhou@cn.ibm.com</a>> wrote:</div>

<br><blockquote type="cite"><font face="sans-serif">Hi Mate,</font>
<br>
<br><font face="sans-serif">First, thanks for answering.</font>
<br><font face="sans-serif">I was trying to find the way to prepare
the bootable volume.</font>
<br><font face="sans-serif">Take the default image downloaded by
devstack, there are three images: cirros-0.3.0-x86_64-uec, cirros-0.3.0-x86_64-uec-kernel
and cirros-0.3.0-x86_64-uec-ramdisk.</font>
<br><font face="sans-serif">cirros-0.3.0-x86_64-uec-kernel is referred
as the kernel image and cirros-0.3.0-x86_64-uec-ramdisk is referred as
the ramdisk image.</font>
<br>
<br><font face="sans-serif"><b>Issue:</b> If only the image(cirros-0.3.0-x86_64-uec)
is copied to the volume when creating a volume) from an image, this volume
is unable to boot an instance without the references to the kernel and
the ramdisk images. The current cinder only copies the image cirros-0.3.0-x86_64-uec
to one targeted volume(<b>Vol-1</b>), which is marked as bootable but unable
to do a successful boot with the current nova code, even if image-id is
removed in the parameter.</font>
<br>
<br><font face="sans-serif"><b>Possible solutions:</b> There are
two ways in my mind to resolve it. One is we just need the code change
in Nova to let it find the reference images for the bootable volume(<b>Vol-1</b>)
and there is no need to change anything in cinder, since the kernel and
ramdisk id are saved in the volume_glance_metadata, where the references
point to the images(kernel and ramdisk) for the volume(<b>Vol-1</b>). </font>
<br>
<br></blockquote><div><br></div></div>You should be able to create an image in glance that references the volume in block device mapping but also has a kernel_id and ramdisk_id parameter so it can boot properly. I know this is kind of an odd way to do things, but this seems like an edge case and I think it is a valid workaround.</div>

<div><br></div><div>Vish</div><div><div class="h5"><div><br><blockquote type="cite"><font face="sans-serif">The other is that if we need multiple
images to boot an instance, we need a new way to create the bootable volume.
For example, we can create three separate volumes for three of the images
and set the new references in volume_glance_metadata with the kernel_volume_id
and ramdisk_volume_id. The benefit of this approach is that the volume
can live independent of the existence of the original images. Even the
images get lost accidentally, the volumes are still sufficient to boot
an instance, because all the information have been copied to Cinder part.</font>
<br>
<br><font face="sans-serif">I am trying to looking for the "</font><tt><font>another
way to prepare your bootable volume" as you mentioned and asking for
the suggestions. </font></tt>
<br><tt><font>And I think the second approach could be one way.
Do you think it is a good approach?</font></tt>
<br>
<br><font face="sans-serif">Best wishes,<br>
Vincent Hou (侯胜博)<br>
<br>
Staff Software Engineer, Open Standards and Open Source Team, Emerging
Technology Institute, IBM China Software Development Lab<br>
<br>
Tel: 86-10-82450778 Fax: 86-10-82453660<br>
Notes ID: Sheng Bo Hou/China/IBM@IBMCN    E-mail: <a href="mailto:sbhou@cn.ibm.com" target="_blank">sbhou@cn.ibm.com</a>
<br>
Address:3F Ring, Building 28 Zhongguancun Software Park, 8 Dongbeiwang
West Road, Haidian District, Beijing, P.R.C.100193<br>
地址:北京市海淀区东北旺西路8号中关村软件园28号楼环宇大厦3层
邮编:100193</font>
<br>
<br>
<br>
<table width="100%">
<tbody><tr valign="top">
<td width="40%"><font size="1" face="sans-serif"><b>Mate Lakat <<a href="mailto:mate.lakat@citrix.com" target="_blank">mate.lakat@citrix.com</a>></b>
</font><p><font size="1" face="sans-serif">2013/07/01 04:18</font>
</p><table border="">
<tbody><tr valign="top">
<td bgcolor="white">
<div align="center"><font size="1" face="sans-serif">Please respond to<br>
OpenStack Development Mailing List <<a href="mailto:openstack-dev@lists.openstack.org" target="_blank">openstack-dev@lists.openstack.org</a>></font></div></td></tr></tbody></table>
<br>
<p></p></td><td width="59%">
<table width="100%">
<tbody><tr valign="top">
<td>
<div align="right"><font size="1" face="sans-serif">To</font></div>
</td><td><font size="1" face="sans-serif">OpenStack Development Mailing List <<a href="mailto:openstack-dev@lists.openstack.org" target="_blank">openstack-dev@lists.openstack.org</a>>,
</font>
</td></tr><tr valign="top">
<td>
<div align="right"><font size="1" face="sans-serif">cc</font></div>
</td><td><font size="1" face="sans-serif"><a href="mailto:jsbryant@us.ibm.com" target="_blank">jsbryant@us.ibm.com</a>, "Duncan Thomas
<<a href="mailto:duncan.thomas@gmail.com" target="_blank">duncan.thomas@gmail.com</a>> John Griffith" <<a href="mailto:duncan.thomas@gmail.comduncan.thomas" target="_blank">duncan.thomas@gmail.comduncan.thomas</a>></font>
</td></tr><tr valign="top">
<td>
<div align="right"><font size="1" face="sans-serif">Subject</font></div>
</td><td><font size="1" face="sans-serif">Re: [openstack-dev] [cinder] Propose
to add copying the reference images when creating a volume</font></td></tr></tbody></table>
<br>
<table>
<tbody><tr valign="top">
<td>
</td><td></td></tr></tbody></table>
<br></td></tr></tbody></table>
<br>
<br>
<br><tt><font>Hi,<br>
<br>
I just proposed a patch for the boot_from_volume_exercise.sh to get rid<br>
of --image. To be honest, I did not look at the various execution paths.<br>
My initial thought is that boot from volume means you boot from volume.<br>
If you only have a kernel + ramdisk image, I simply assumed that you<br>
can't do it. <br>
<br>
I would not do any magic. Boot from volume should boot from volume. If<br>
you only have 3 part images, you need to find another way to prepare<br>
your bootable volume.<br>
<br>
btw, here is my change:<br>
<br>
</font></tt><a href="https://review.openstack.org/34761" target="_blank"><tt><font>https://review.openstack.org/34761</font></tt></a><tt><font><br>
<br>
Cheers,<br>
Mate<br>
<br>
On Mon, Jul 01, 2013 at 01:25:23AM -0400, Sheng Bo Hou wrote:<br>
> Hi Cinder folks,<br>
> <br>
> I am currently fixing the bugs related to booting the instance from
the <br>
> volume. I found there are bugs both in Nova and <br>
> Cinder.<br>
> <br>
> Cinder: </font></tt><a href="https://bugs.launchpad.net/cinder/+bug/1159824" target="_blank"><tt><font>https://bugs.launchpad.net/cinder/+bug/1159824</font></tt></a><tt><font><br>
> Nova: </font></tt><a href="https://bugs.launchpad.net/nova/+bug/1191069" target="_blank"><tt><font>https://bugs.launchpad.net/nova/+bug/1191069</font></tt></a><tt><font><br>
> <br>
> For the volumes created from the image, I propose to copy the reference
<br>
> image during the creation of<br>
> the main image. For example, an image may refer to a kernel image
and a <br>
> ramdisk image. When we create a volume<br>
> from this image, we only copied this one to the volume. The kernel
and <br>
> ramdisk images are still in glance, and<br>
> the volume still refers to the kernel and ramdisk images.<br>
> <br>
> I think if an image has other reference images, the reference images
also <br>
> need to be copied to the volumes(kernel volume and ramdisk volume),<br>
> and then set the volume referring to the kernel volume and the ramdisk
<br>
> volume. This feature will make booting from<br>
> a volume completely independent of the existence of the glance image.<br>
> <br>
> Do you think we can firstly add this feature to cinder? Do folks have
any <br>
> comments on it?<br>
> <br>
> Thanks.<br>
> <br>
> Best wishes,<br>
> Vincent Hou (侯胜博)<br>
> <br>
> Staff Software Engineer, Open Standards and Open Source Team, Emerging
<br>
> Technology Institute, IBM China Software Development Lab<br>
> <br>
> Tel: 86-10-82450778 Fax: 86-10-82453660<br>
> Notes ID: Sheng Bo Hou/China/IBM@IBMCN    E-mail: <a href="mailto:sbhou@cn.ibm.com" target="_blank">sbhou@cn.ibm.com</a>
<br>
> Address:3F Ring, Building 28 Zhongguancun Software Park, 8 Dongbeiwang
<br>
> West Road, Haidian District, Beijing, P.R.C.100193<br>
> 地址:北京市海淀区东北旺西路8号中关村软件园28号楼环宇大厦3层
邮编:100193<br>
<br>
> _______________________________________________<br>
> OpenStack-dev mailing list<br>
> <a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a><br>
> </font></tt><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank"><tt><font>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</font></tt></a><tt><font><br>
<br>
<br>
-- <br>
Mate Lakat<br>
<br>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a><br>
</font></tt><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank"><tt><font>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</font></tt></a><tt><font><br>
</font></tt>
<br>
_______________________________________________<br>OpenStack-dev mailing list<br><a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a><br><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>

</blockquote></div><br></div></div></div><br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div><div class="gmail_extra"><div class="gmail_default" style="font-family:'courier new',monospace">While I like the idea of having Nova inspect the image data on the volume and doing what it needs, we don't expose that level of info to Nova on boot currently and I think there would be a good deal of overhead just for these specific cases.  </div>

<div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">The option of multiple cinder volumes for boot from volume I don't quite follow how that would work and it seems like it would be confusing to a user.  Would you just automatically create the other two volumes when a user requested 'create --image-id 123' if 123 was one of the image types requiring the additional volumes? The other question is how would that be interpreted and put back together on the nova side?</div>

<div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">Anyway, it seems like the suggestion made by Vish is the best place to start.  We can build off of that if there's feed-back that warrants it.</div>

<br></div></div>