Bug 1041185 - [RFE][nova]: Using more effective way to prepare template/base image
Summary: [RFE][nova]: Using more effective way to prepare template/base image
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: RFEs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: RHOS Maint
QA Contact:
URL: https://blueprints.launchpad.net/nova...
Whiteboard: upstream_milestone_none upstream_stat...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-12 13:52 UTC by RHOS Integration
Modified: 2015-03-19 16:55 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-19 16:55:44 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description RHOS Integration 2013-12-12 13:52:41 UTC
Cloned from launchpad blueprint https://blueprints.launchpad.net/nova/+spec/effective-template-base-image-preparing.

Description:

In current VM provisioning implementation within nova-compute, if a VM's template/base image does not been cached yet in local (in '_base' folder by default) then nova-compute need download the image to compute node local firstly, it will be cached as a reusable template/base image. After that, VM's disk/image will be created base on it.

Currently, template/base image preparing can only use downloading method, nova-compute need copy each bits of the image to local from glance store via API. The copy is not good for performance so I'd like give a option to nova-compute and allow user to ask nova-compute use an alternative way to prepare template/base image with more performance:
1. 'downloading' way, just like 'old way', nova-compute use glance API to copy each bits of the image to local.
2. 'volume-based-linking' way, this is a zero-copy way, based on glance-cinder-driver (https://blueprints.launchpad.net/glance/+spec/glance-cinder-driver) , nova-compute can attaching the volume which acted image to local directly as a 'linked' image.

For implementation plan as following:

1. Adding a option to nova.confi: "template_image_handler", allow user configure nova-compute to use which way to prepare template/base image.
2. Extract a base class, and adding two particular implementation.
       BaseTemplateImagehandler
           |-> DownloadingTemplateImagehandler: implemente above #1 way.
           |-> VolumeLinkingTemplateImagehandler: implemente above #2 way.
   The class has 3 key interface methods:
   i. init(): re-prepare base image if needed after nova-compute restarted.
   ii. fetch_image(): prepare base image.
   iii. remove_image(): remove unused base image from templement folder ('_base' by default).

Specification URL (additional information):

None


Note You need to log in before you can comment on or make changes to this bug.