Merge lp://qastaging/~yamahata/nova/boot-from-volume into lp://qastaging/~hudson-openstack/nova/trunk

Proposed by Isaku Yamahata
Status: Work in progress
Proposed branch: lp://qastaging/~yamahata/nova/boot-from-volume
Merge into: lp://qastaging/~hudson-openstack/nova/trunk
Diff against target: 605 lines (+246/-75)
8 files modified
nova/api/ec2/apirequest.py (+11/-5)
nova/api/ec2/cloud.py (+5/-1)
nova/api/openstack/servers.py (+50/-14)
nova/compute/api.py (+46/-20)
nova/compute/manager.py (+33/-3)
nova/virt/driver.py (+1/-1)
nova/virt/libvirt.xml.template (+33/-6)
nova/virt/libvirt_conn.py (+67/-25)
To merge this branch: bzr merge lp://qastaging/~yamahata/nova/boot-from-volume
Reviewer Review Type Date Requested Status
Dan Prince (community) Needs Fixing
Vish Ishaya (community) Needs Fixing
Review via email: mp+58021@code.qastaging.launchpad.net

Description of the change

This branch implements the first step for boot from volume.
With --block-device-mapping option for euca-run-instances, VM will boot with the specified volumes attached.
for example
 euca-run-instances ami-XXXX -k mykey -t m1.tiny -b/dev/vdb=vol-00000003::false

In fact since creating ec2 snapshot/volume from volume/snapshot isn't supported yet,
I used volume_id instead of snapshot_id.
This is first step to start discussion.

Code details.
- enhanced argument parser to interpret multi-dot separated argument
  like BlockDeviceMapping.1.DeviceName=snap-id
- pass down block device mapping id form nova-api to compute-api.
  compute-api changes volume status to in-use to tell the compute-manager which volume to attach
- compute-manager pass those infos to virt dirver and libvirt_conn driver interprets it.

TODO:
- error recovery
- ephemeral device/no device
- ami support which needs to change db schema
- suport on ec2 snapshot/clone
- native api in addition to ec2 api?

To post a comment you must log in.
994. By Yoshiaki Tamura

Fix parameter mismatch calling to_xml() from spawn() in libvirt_conn.py

995. By termie

The change to utils.execute's call style missed this call somehow, this should get libvirt snapshots working again.

Revision history for this message
Masanori Itoh (itohm) wrote :

Hi Isaku,

Great contribution!
Actually we were also discussing developing this feature internally.

BTW, this is a POC code of a not-approved-yet feature, isn't it?
New feature will not be merged into trunk till the blueprint is approved and discussed at Design Summit in the OpenStack world.
I guess that Adam Johnson of Midokura will have a session on the blueprint of this feature
at the upcoming Diablo Design Summit. So, what about holding the branch somewhere outside
the trunk for a while?

Thanks,
Masanori

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

Hi! Looks like a great contribution indeed, and I agree with Masanori's points about discussing at the summit. I wanted to add one more note, though, that we would want to see some unit tests that stress the new code paths. Let us know if you need assistance creating those tests. :)

Cheers!
jay

996. By Vish Ishaya

Fixes nova-manage image convert when the source directory is the same one that local image service uses.

997. By Jason Kölker

Change '== None' to 'is None'

998. By Mark Washenberger

Support admin password when specified in server create requests.

999. By Eldar Nugaev

Fix loggin in creation server in OpenStack API 1.0

1000. By Jason Kölker

use 'is not None' instead of '!= None'

1001. By Jason Kölker

Remove zope.interface from the requires file since it is not used anywhere.

1002. By Jason Kölker

pep8 fixes

1003. By Anne Gentle

Adding projectname username to the nova-manage project commands to fix a doc bug, plus some edits and elimination of a few doc todos.

Revision history for this message
Isaku Yamahata (yamahata) wrote :

On Mon, Apr 18, 2011 at 03:48:14PM -0000, Masanori Itoh wrote:
> Hi Isaku,
>
> Great contribution!
> Actually we were also discussing developing this feature internally.
>
> BTW, this is a POC code of a not-approved-yet feature, isn't it?
> New feature will not be merged into trunk till the blueprint is approved and discussed at Design Summit in the OpenStack world.

Yes. I just didn't know what I should do with the new code.
I'm learning new rules as a new comer... (sometimes by making mistakes)

> I guess that Adam Johnson of Midokura will have a session on the blueprint of this feature
> at the upcoming Diablo Design Summit. So, what about holding the branch somewhere outside
> the trunk for a while?

Great idea. I'm looking forward to it.

>
> Thanks,
> Masanori
>
>
> --
> https://code.launchpad.net/~yamahata/nova/boot-from-volume/+merge/58021
> You are the owner of lp:~yamahata/nova/boot-from-volume.
>

--
yamahata

1004. By Dan Prince

Implement quotas for the new v1.1 server metadata controller.

Created a new _check_metadata_properties_quota method in the compute API that is used when creating instances and when updating server metadata. In doing so I modified the compute API so that metadata is a dict (not an array) to ensure we are using unique key values for metadata (which is implied by the API specs) and makes more sense with JSON request formats anyway.

Additionally this branch enables and fixes the integration test to create servers with metadata.

1005. By Josh Kearney

Round 1 of pylint cleanup.

1006. By termie

attempts to make the docstring rules clearer

1007. By termie

Docstring cleanup and formatting. Minor style fixes as well.

1008. By Naveed Massjouni

Added an option to run_tests.sh so you can run just pep8. So now you can:
    ./run_tests.sh --just-pep8
or
    ./run_tests.sh -p

1009. By Josh Kearney

Another small round of pylint clean-up.

1013. By Yoshiaki Tamura

If volumes exist in instance, get pathes to the volumes and convert
them to the xml format to let libvirt to see them upon booting.

1014. By Yoshiaki Tamura

Extend create() to accept volume, and update DB to reserve the volume
before passing it to the manager.

1015. By Yoshiaki Tamura

Add an parameter to specify volume upon creating instances.

Revision history for this message
Vish Ishaya (vishvananda) wrote :

This is looking pretty good.

I like the direction that it is going and I think merging step-by-step is the right way. We definitely need some tests to cover this feature. Some sort of unit tests are a must. It would also be great to get a smoketest for this feature so that we can be sure that it is working against a real deployment.

review: Needs Fixing
Revision history for this message
Dan Prince (dan-prince) wrote :

This branch no longer merges cleanly w/ trunk.

Needs fixing.

review: Needs Fixing

Unmerged revisions

1015. By Yoshiaki Tamura

Add an parameter to specify volume upon creating instances.

1014. By Yoshiaki Tamura

Extend create() to accept volume, and update DB to reserve the volume
before passing it to the manager.

1013. By Yoshiaki Tamura

If volumes exist in instance, get pathes to the volumes and convert
them to the xml format to let libvirt to see them upon booting.

1012. By Isaku Yamahata

ebs boot: compute node(kvm and libvirt) support for ebs boot

this patch teaches kvm and libvirt compute node ebs boot.

1011. By Isaku Yamahata

ebs boot: add parse for ebs boot argument

This patch adds the parser of ebs boot argument and stores those
infos into Volume table for compute node.

1010. By Isaku Yamahata

api/ec2/api: teach multi dot-separated argument

nova.api.ec2.apirequest.APIRequest knows only single dot-separated
arguments.
EBS boot uses multi dot-separeted arguments like
BlockDeviceMapping.1.DeviceName=snap-id
This patch teaches the parser those argument as the preparetion for ebs boot
support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.