SheepdogSupport


 * Launchpad Entry: NovaSpec:sheepdog-support
 * Created: 2010-11-15
 * Contributors: Kazutaka Morita, Tomonori Fujita

Summary
Add Sheepdog support to Nova instances.

Release Note
Sheepdog is a distributed block storage system for QEMU. This proposes integrating Sheepdog into OpenStack and providing highly available block volumes for VMs like Amazon EBS. The details about Sheepdog are in http://www.osrg.net/sheepdog/.

Rationale
Current implementation of volumes (iSCSI/AoE with LVM) is not fit for IaaS.
 * the architecture is not scalable in capacity and performance
 * LVM machine could become a SPOF
 * If we take many LVM snapshots, the performance of volumes becomes terrible

User stories
A hosting service provider want to provide block level storage volumes to thousands of users. However, a single LVM machine cannot achieve such a scalability, and a highend storage system is not acceptable from the point of view of cost. Sheepdog solves this problem.

Assumptions
None.

Implementation
create a new class SheepdogDriver like the following:

class SheepdogDriver(VolumeDriver): """Executes commands relating to Sheepdog Volumes"""

def check_for_setup_error(self): """Returns an error if prerequisites aren't met""" # TODO: check whether sheepdog is starting or not pass

@defer.inlineCallbacks def create_volume(self, volume): """Creates a sheepdog volume""" yield self._try_execute("qemu-img create sheepdog:%s %s" %                           (volume['name'], volume['size']))

@defer.inlineCallbacks def delete_volume(self, volume): """Deletes a logical volume""" yield self._try_execute("collie vdi delete %s" % volume['name'])

def ensure_export(self, context, volume): """Safely and synchronously recreates an export for a logical volume""" # TODO: check whether volume['name'] exists pass

@defer.inlineCallbacks def create_export(self, context, volume): """Exports the volume""" pass

@defer.inlineCallbacks def remove_export(self, context, volume): """Removes an export for a logical volume""" pass

@defer.inlineCallbacks def discover_volume(self, volume): """Discover volume on a remote host""" defer.returnValue("sheepdog:%s" % volume['name'])

@defer.inlineCallbacks def undiscover_volume(self, volume): """Undiscover volume on a remote host""" yield