From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Dillaman Subject: Re: Snapshots of consistency groups Date: Tue, 1 Nov 2016 11:01:45 -0400 Message-ID: References: <20160819124813.GB17630@gmail.com> <20160820162713.GA5997@gmail.com> Reply-To: dillaman@redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from mail-lf0-f44.google.com ([209.85.215.44]:33231 "EHLO mail-lf0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966636AbcKAPBr (ORCPT ); Tue, 1 Nov 2016 11:01:47 -0400 Received: by mail-lf0-f44.google.com with SMTP id c13so21658462lfg.0 for ; Tue, 01 Nov 2016 08:01:47 -0700 (PDT) In-Reply-To: Sender: ceph-devel-owner@vger.kernel.org List-ID: To: dillaman Cc: Victor Denisov , Mykola Golub , ceph-devel I chatted with Xing on IRC this morning re: Cinder generic groups. It sounds like RBD will need to support preserving the image's consistency group snapshots even if the image is removed from the group. In the OpenStack case, you won't have to worry about the image being deleted while it still has associated group snapshots. We will also want to support being able to clone child images from a group snapshot to ensure that we can thin provision new groups volumes when creating a new group from a group snapshot. This means that the group snapshots should be able to be protected/unprotected just like standard user snapshots. On Mon, Oct 31, 2016 at 9:07 AM, Jason Dillaman wrote: > Looking at the Cinder codebase, I don't see any such restriction that > would prevent you from removing a volume from a consistency group that > has associated snapshots. I would double-check on the OpenStack > development mailing list if this is correct and is the intent. Worst > case, the RBD driver could raise an exception if there are still > consistency group snapshots associated to the image. > > > On Fri, Oct 28, 2016 at 6:41 PM, Victor Denisov wrote: >> Another thing that bothers me. When we remove an image from a consistency group. >> Should we remove all snapshots of this image that were created as part >> of a consistency group snapshot? >> >> The easiest solution would be to remove all snapshots that are in >> GroupSnapshotNamespace and reference this consistency group. >> I looked into cinder docs for this feature: >> http://docs.openstack.org/admin-guide/blockstorage-consistency-groups.html >> >> But it's not clear to me which behavior cinder expects. >> >> Thanks, >> V. >> >> On Wed, Oct 26, 2016 at 6:16 AM, Jason Dillaman wrote: >>> In a perfect world, it would be nice to add a new optional to "rbd >>> snap ls" to show all snapshots (with a new column to indicate the >>> associated namespace). >>> >>> On Tue, Oct 25, 2016 at 11:07 PM, Victor Denisov wrote: >>>> Question. When we print out snapshots of an image, should the group >>>> snapshots be listed, or should they be marked as special snapshots? >>>> >>>> Thanks, >>>> V. >>>> >>>> On Mon, Oct 10, 2016 at 3:14 PM, Victor Denisov wrote: >>>>> Ok. I didn't have any intention to throw exceptions. >>>>> I was more concerned about whether it's ok to allocate and delete >>>>> objects or I should use smart pointers. >>>>> >>>>> On Mon, Oct 10, 2016 at 7:18 AM, Jason Dillaman wrote: >>>>>> The only place exceptions are routinely used is within the "::decode" >>>>>> functions. I would prefer to see the code not throwing new exceptions >>>>>> on purpose. >>>>>> >>>>>> On Fri, Oct 7, 2016 at 2:26 PM, Victor Denisov wrote: >>>>>>> Are any exceptions used in librbd code? Should the code be exception safe? >>>>>>> >>>>>>> Thanks, >>>>>>> V. >>>>>>> >>>>>>> On Fri, Sep 16, 2016 at 10:37 AM, Jason Dillaman wrote: >>>>>>>> On Thu, Sep 15, 2016 at 7:17 PM, Victor Denisov wrote: >>>>>>>>> if (struct_v >= 5) { >>>>>>>>> ::decode(snapshot_namespace, p); >>>>>>>>> } else { >>>>>>>>> snapshot_namespace = cls::rbd::UserSnapshotNamespace(); >>>>>>>>> } >>>>>>>>> >>>>>>>>> then code for ::encode function of cls_rbd_snap would change accordingly: >>>>>>>>> >>>>>>>>> instead of >>>>>>>>> >>>>>>>>> boost::apply_visitor(cls::rbd::EncodeSnapshotTypeVisitor(bl), >>>>>>>>> snapshot_namespace); >>>>>>>>> >>>>>>>>> I would do: >>>>>>>>> ::encode(snapshot_namespace, bl); >>>>>>>> >>>>>>>> >>>>>>>> +1 -- looks good to me >>>>>>>> >>>>>>>> -- >>>>>>>> Jason >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Jason >>> >>> >>> >>> -- >>> Jason > > > > -- > Jason -- Jason