All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Dillaman <jdillama@redhat.com>
To: Victor Denisov <vdenisov@mirantis.com>
Cc: ceph-devel <ceph-devel@vger.kernel.org>,
	Josh Durgin <jdurgin@redhat.com>,
	Mykola Golub <mgolub@mirantis.com>
Subject: Re: Snapshots of consistency groups
Date: Tue, 16 Aug 2016 09:26:21 -0400	[thread overview]
Message-ID: <CA+aFP1BAw7yzPYT5z6D6Wq6tPvd-Y9meDxfgqcVi0GBg0eR3+g@mail.gmail.com> (raw)
In-Reply-To: <CA+hcxJS8sbBUjYieM3+86XG5KX9ouP8dO+9iFwtsHoO+v=9KWA@mail.gmail.com>

Way back in April when we had the CDM, I was originally thinking we
should implement option 3. Essentially, you have a prepare group
snapshot RPC message that extends a "paused IO" lease to the caller.
When that lease expires, IO would automatically be resumed even if the
group snapshot hasn't been created yet.  This would also require
commit/abort group snapshot RPC messages.

However, thinking about this last night, here is another potential option:

Option 4 - require images to have the exclusive lock feature before
they can be added to a consistency group (and prevent disabling of
exclusive-lock while they are part of a group). Then librbd, via the
rbd CLI (or client application of the rbd consistency group snap
create API), can co-operatively acquire the lock from all active image
clients within the group (i.e. all IO has been flushed and paused) and
can proceed with snapshot creation. If the rbd CLI dies, the normal
exclusive lock handling process will automatically take care of
re-acquiring the lock from the dead client and resuming IO.

This option not only re-uses existing code, it would also eliminate
the need to add/update the RPC messages for prepare/commit/abort
snapshot creation to support group snapshots (since it could all be
handled internally).

On Mon, Aug 15, 2016 at 7:46 PM, Victor Denisov <vdenisov@mirantis.com> wrote:
> Gentlemen,
>
> I'm writing to you to ask for your opinion regarding quiescing writes.
>
> Here is the situation. In order to take snapshots of all images in a
> consistency group,
> we first need to quiesce all the image writers in the consistency group.
> Let me call
> group client - a client which requests a consistency group to take a snapshot.
> Image client - the client that writes to an image.
> Let's say group client starts sending notify_quiesce to all image
> clients that write to the images in the group. After quiescing half of
> the image clients the group client can die.
>
> It presents us with a dilemma - what should we do with those quiesced
> image clients.
>
> Option 1 - is to wait till someone manually runs recover for that
> consistency group.
> We can show warning next to those unfinished groups when user runs
> group list command.
> There will be a command like group recover, which allows users to
> rollback unsuccessful snapshots
> or continue them using create snapshot command.
>
> Option 2 - is to establish some heart beats between group client and
> image client. If group client fails to heart beat then image client
> unquiesces itself and continues normal operation.
>
> Option 3 - is to have a timeout for each image client. If group client
> fails to make a group snapshot within this timeout then we resume our
> normal operation informing group client of the fact.
>
> Which of these options do you prefer? Probably there are other options
> that I miss.
>
> Thanks,
> Victor.



-- 
Jason

  reply	other threads:[~2016-08-16 13:26 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-15 23:46 Snapshots of consistency groups Victor Denisov
2016-08-16 13:26 ` Jason Dillaman [this message]
2016-08-16 13:29   ` Jason Dillaman
2016-08-18 23:26     ` Victor Denisov
     [not found]       ` <CA+aFP1BMK1=daZpUFdNDJ+i8+nfQt42ahCXVaxy9fWdAY-kXwA@mail.gmail.com>
2016-08-19  4:20         ` Victor Denisov
2016-08-19 12:48           ` Mykola Golub
2016-08-20  0:36             ` Victor Denisov
2016-08-20 16:27               ` Mykola Golub
2016-08-26 21:05                 ` Victor Denisov
2016-08-29  0:37                   ` Jason Dillaman
2016-08-29 21:10                     ` Victor Denisov
2016-09-09 22:41                       ` Victor Denisov
2016-09-10 18:37                         ` Jason Dillaman
2016-09-11  1:46                           ` Victor Denisov
2016-09-12 13:18                             ` Jason Dillaman
2016-09-12 22:52                               ` Victor Denisov
2016-09-12 23:06                                 ` Victor Denisov
2016-09-12 23:09                                   ` Victor Denisov
2016-09-13 12:33                                     ` Jason Dillaman
2016-09-13 23:41                                       ` Victor Denisov
2016-09-15 23:17                                         ` Victor Denisov
2016-09-16 17:37                                           ` Jason Dillaman
2016-10-07 18:26                                             ` Victor Denisov
2016-10-10 14:18                                               ` Jason Dillaman
2016-10-10 22:14                                                 ` Victor Denisov
2016-10-26  3:07                                                   ` Victor Denisov
2016-10-26 13:16                                                     ` Jason Dillaman
2016-10-28 22:41                                                       ` Victor Denisov
2016-10-31 13:07                                                         ` Jason Dillaman
2016-11-01 15:01                                                           ` Jason Dillaman
2016-12-14  1:03                                                             ` Victor Denisov
2016-12-15 15:10                                                               ` Jason Dillaman
2016-12-16  0:05                                                                 ` Victor Denisov
2016-12-16 14:53                                                                   ` Jason Dillaman
2017-01-04  0:40                                                                     ` Victor Denisov
2017-01-04  2:56                                                                       ` Jason Dillaman
2017-01-04 18:29                                                                         ` Victor Denisov
2017-01-04 18:34                                                                           ` Jason Dillaman
2017-01-04 18:39                                                                             ` Victor Denisov
2017-01-12  0:14                                                                               ` Victor Denisov
2017-01-12  0:18                                                                                 ` Jason Dillaman
2017-01-12  1:10                                                                                   ` Victor Denisov
2017-01-12  1:36                                                                                     ` Jason Dillaman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+aFP1BAw7yzPYT5z6D6Wq6tPvd-Y9meDxfgqcVi0GBg0eR3+g@mail.gmail.com \
    --to=jdillama@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=dillaman@redhat.com \
    --cc=jdurgin@redhat.com \
    --cc=mgolub@mirantis.com \
    --cc=vdenisov@mirantis.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.