[Bug 1037567] Re: need config-drive-v2 support

Scott Moser smoser at ubuntu.com
Thu Jan 31 19:36:39 UTC 2013


** Description changed:

- We need to update the config-drive datasource to support config-drive-v2
- [1].  There is a document showing what the config-drive looks like at
- [2].
+ == Begin SRU Information ==
+ [Impact]
+ 'config-drive' is a mechanism for passing data from the hypervisor (or
+ cloud platform) to the guest (instance). config-drive-v2 was implemented
+ in Openstack Folsom release, and delivered as functional in 12.10 Ubuntu.
  
+ In order to support Ubuntu 12.04 cloud images running as a guest on
+ Openstack clouds that utilize config-drive, we need to backport this
+ function to 12.04.
+ 
+ This feature backport can be considered "hardware enablement" as it
+ enables Ubuntu images to work on new cloud platforms.
+ 
+ [Test Case]
+ Attached to this bug is an ISO that provides config-drive-v2 data.
+ Currently, if you attach the ISO to a cloud-image instance,
+ it will be ignored.
+ 
+ The new version of cloud-init enables data to be read from the disk.
+ 
+ The provided ISO file simply sets a password for the 'ubuntu' user to
+ 'ubuntu'. So, verification that the test worked is as easy as logging
+ in with 'ubuntu' and 'passw0rd', either via ssh or via the console.
+ Additionally, when the config-drive is not found, cloud-init will fall
+ back to the EC2 data source, and block boot for several minutes as it
+ waits.  When the config-drive is found, boot will occur quickly.
+ 
+ To perform this test, download a precise cloud-image from
+ http://cloud-images.ubuntu.com patch it, and boot it with kvm.
+ 
+ $ imgurl="http://cloud-images.ubuntu.com/releases/precise/release-20130124/ubuntu-12.04-server-cloudimg-amd64-disk1.img"
+ $ deburl="wget https://launchpad.net/~smoser/+archive/cloud-init-test/+files/cloud-init_0.6.3-0ubuntu1.5%7Eppa1_all.deb"
+ $ isourl="https://bugs.launchpad.net/cloud-init/+bug/1037567/+attachment/3509468/+files/disk.config.gz"
+ 
+ $ wget $url -O precise-amd64.img.dist
+ $ wget $deburl -O cloud-init.deb
+ $ wget $isourl -O cfgdisk.img.dist;
+ 
+ $ qemu-img convert -O qcow2 precise-amd64.img.dist disk1.img.dist
+ $ qemu-img create -f qcow2 -b disk1.img.dist patched.img.dist
+ 
+ $ zcat --force cfgdisk.img.dist > cfgdisk.img
+ $ chmod 600 cfgdisk.img disk1.img.dist
+ 
+ # patch the patched.img.dist with new cloud-init
+ $ bzr branch lp:~smoser/+junk/backdoor-image ./bi
+ $ sudo ./bi/mount-callback-umount patched.img.dist -- \
+     sh -ec 'mp=$1; cp cloud-init.deb $mp/tmp &&
+             LANG=C chroot $mp dpkg -i /tmp/cloud-init.deb ;
+             rm $mp/tmp/cloud-init.deb' --
+ 
+ $ qemu-img create -f qcow2 -b disk1.img.dist unpatched.img
+ $ qemu-img create -f qcow2 -b patched.img.dist patched.img
+ 
+ # boot patched and unpatched images
+ $ kvm -m 512 -drive file=unpatched.img,if=virtio -drive file=cfgdisk.img,if=virtio
+ $ kvm -m 512 -drive file=patched.img,if=virtio -drive file=cfgdisk.img,if=virtio
+ 
+ The unpatched version will take quite a long time to boot, and you'll messages
+ on the serial console like:see:
+  2013-01-31 18:53:18,185 - DataSourceEc2.py[CRITICAL]: giving up on md after 120
+ 
+ Booting a kvm instance with iso as cdrom:
+  kvm -drive disk1.img,if=virtio -cdrom lp-1077020.iso
+ Booting a kvm instance with iso as disk:
+  kvm -drive disk1.img,if=virtio -drive lp-1077020.iso,if=virtio lp-1077020.iso
+ 
+ [Regression Potential]
+ The potential for regression is low. The most likely possibility for
+ error would be in incorrectly identifying a cd-rom and its content as a
+ config-drive.
+ == End SRU Information ==
+ 
+ 
+ ## Howto launch instance with config-drive ###
+ nova keypair-add --pub-key ~/.ssh/id_rsa.pub mykey
+ nova boot --key_name=mykey --image=$IMAGE \
+    --config-drive=1 --flavor=m1.tiny \
+    --user_data=./user-data.txt cfg-drive-test
+ We need to update the config-drive datasource to support config-drive-v2 [1].  There is a document showing what the config-drive looks like at [2].
  
  [1] https://blueprints.launchpad.net/nova/+spec/config-drive-v2
  [2] http://paste.ubuntu.com/1150619/

** Description changed:

  == Begin SRU Information ==
  [Impact]
  'config-drive' is a mechanism for passing data from the hypervisor (or
  cloud platform) to the guest (instance). config-drive-v2 was implemented
  in Openstack Folsom release, and delivered as functional in 12.10 Ubuntu.
  
  In order to support Ubuntu 12.04 cloud images running as a guest on
  Openstack clouds that utilize config-drive, we need to backport this
  function to 12.04.
  
  This feature backport can be considered "hardware enablement" as it
  enables Ubuntu images to work on new cloud platforms.
  
  [Test Case]
  Attached to this bug is an ISO that provides config-drive-v2 data.
  Currently, if you attach the ISO to a cloud-image instance,
  it will be ignored.
  
  The new version of cloud-init enables data to be read from the disk.
  
  The provided ISO file simply sets a password for the 'ubuntu' user to
  'ubuntu'. So, verification that the test worked is as easy as logging
  in with 'ubuntu' and 'passw0rd', either via ssh or via the console.
  Additionally, when the config-drive is not found, cloud-init will fall
  back to the EC2 data source, and block boot for several minutes as it
  waits.  When the config-drive is found, boot will occur quickly.
  
  To perform this test, download a precise cloud-image from
  http://cloud-images.ubuntu.com patch it, and boot it with kvm.
  
  $ imgurl="http://cloud-images.ubuntu.com/releases/precise/release-20130124/ubuntu-12.04-server-cloudimg-amd64-disk1.img"
  $ deburl="wget https://launchpad.net/~smoser/+archive/cloud-init-test/+files/cloud-init_0.6.3-0ubuntu1.5%7Eppa1_all.deb"
  $ isourl="https://bugs.launchpad.net/cloud-init/+bug/1037567/+attachment/3509468/+files/disk.config.gz"
  
  $ wget $url -O precise-amd64.img.dist
  $ wget $deburl -O cloud-init.deb
  $ wget $isourl -O cfgdisk.img.dist;
  
  $ qemu-img convert -O qcow2 precise-amd64.img.dist disk1.img.dist
  $ qemu-img create -f qcow2 -b disk1.img.dist patched.img.dist
  
  $ zcat --force cfgdisk.img.dist > cfgdisk.img
  $ chmod 600 cfgdisk.img disk1.img.dist
  
  # patch the patched.img.dist with new cloud-init
  $ bzr branch lp:~smoser/+junk/backdoor-image ./bi
  $ sudo ./bi/mount-callback-umount patched.img.dist -- \
-     sh -ec 'mp=$1; cp cloud-init.deb $mp/tmp &&
-             LANG=C chroot $mp dpkg -i /tmp/cloud-init.deb ;
-             rm $mp/tmp/cloud-init.deb' --
+     sh -ec 'mp=$1; cp cloud-init.deb $mp/tmp &&
+             LANG=C chroot $mp dpkg -i /tmp/cloud-init.deb ;
+             rm $mp/tmp/cloud-init.deb' --
  
  $ qemu-img create -f qcow2 -b disk1.img.dist unpatched.img
  $ qemu-img create -f qcow2 -b patched.img.dist patched.img
  
  # boot patched and unpatched images
  $ kvm -m 512 -drive file=unpatched.img,if=virtio -drive file=cfgdisk.img,if=virtio
  $ kvm -m 512 -drive file=patched.img,if=virtio -drive file=cfgdisk.img,if=virtio
  
  The unpatched version will take quite a long time to boot, and you'll messages
  on the serial console like:see:
-  2013-01-31 18:53:18,185 - DataSourceEc2.py[CRITICAL]: giving up on md after 120
- 
- Booting a kvm instance with iso as cdrom:
-  kvm -drive disk1.img,if=virtio -cdrom lp-1077020.iso
- Booting a kvm instance with iso as disk:
-  kvm -drive disk1.img,if=virtio -drive lp-1077020.iso,if=virtio lp-1077020.iso
+  2013-01-31 18:53:18,185 - DataSourceEc2.py[CRITICAL]: giving up on md after 120
  
  [Regression Potential]
  The potential for regression is low. The most likely possibility for
  error would be in incorrectly identifying a cd-rom and its content as a
  config-drive.
  == End SRU Information ==
  
- 
  ## Howto launch instance with config-drive ###
  nova keypair-add --pub-key ~/.ssh/id_rsa.pub mykey
  nova boot --key_name=mykey --image=$IMAGE \
-    --config-drive=1 --flavor=m1.tiny \
-    --user_data=./user-data.txt cfg-drive-test
+    --config-drive=1 --flavor=m1.tiny \
+    --user_data=./user-data.txt cfg-drive-test
  We need to update the config-drive datasource to support config-drive-v2 [1].  There is a document showing what the config-drive looks like at [2].
  
  [1] https://blueprints.launchpad.net/nova/+spec/config-drive-v2
  [2] http://paste.ubuntu.com/1150619/

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/1037567

Title:
  need config-drive-v2 support

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1037567/+subscriptions



More information about the Ubuntu-server-bugs mailing list