[openstack-dev] Proposal for instance-level snapshots in Nova

Jon Bernard jbernard at tuxion.com
Thu Jan 16 21:28:49 UTC 2014


* Vishvananda Ishaya <vishvananda at gmail.com> wrote:
> 
> On Jan 14, 2014, at 2:10 PM, Jon Bernard <jbernard at tuxion.com> wrote:
> 
> > 
> > <snip>
> >> As you’ve defined the feature so far, it seems like most of it could
> >> be implemented client side:
> >> 
> >> * pause the instance
> >> * snapshot the instance
> >> * snapshot any attached volumes
> > 
> > For the first milestone to offer crash-consistent snapshots you are
> > correct.  We'll need some additional support from libvirt, but the
> > patchset should be straightforward.  The biggest question I have
> > surrounding initial work is whether to use an existing API call or
> > create a new one.
> > 
> 
> I think you might have missed the “client side” part of this point. I agree
> that the snapshot multiple volumes and package it up is valuable, but I was
> trying to make the point that you could do all of this stuff client side
> if you just add support for snapshotting ephemeral drives. An all-in-one
> snapshot command could be valuable, but you are talking about orchestrating
> a lot of commands between nova, glance, and cinder and it could get kind
> of messy to try to run the whole thing from nova.

If you expose each primitive required, then yes, the client could
implement the logic to call each primitive in the correct order, handle
error conditions, and exit while leaving everything in the correct
state.  But that would mean you would have to implement it twice - once
in python-novaclient and once in Horizon.  I would speculate that doing
this on the client would be even messier.

If you are concerned about the complexity of the required interactions,
we could narrow the focus in this way:

  Let's say that taking a full snapshot/backup (all volumes) operates
  only on persistent storage volumes.  Users who booted from an
  ephemeral glance image shouldn't expect this feature because, by
  definition, the boot volume is not expected to live a long life.

This should limit the communication to Nova and Cinder, while leaving
Glance out (initially).  If the user booted an instance from a cinder
volume, then we have all the volumes necessary to create an OVA and
import to Glance as a final step.  If the boot volume is an image then
I'm not sure, we could go in a few directions:

  1. No OVA is imported due to lack of boot volume
  2. A copy of the original image is included as a boot volume to create
     an OVA.
  3. Something else I am failing to see.

If [2] seems plausible, then it probably makes sense to just ask glance
for an image snapshot from nova while the guest is in a paused state.

Thoughts?

-- 
Jon



More information about the OpenStack-dev mailing list