[sheepdog-users] n copies > n nodes
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Mon Mar 18 08:34:57 CET 2013
At Fri, 15 Mar 2013 15:58:58 +0800,
Liu Yuan wrote:
>
> On 03/15/2013 02:56 PM, MORITA Kazutaka wrote:
> > Then other functions that call write_object() have the same problem.
> > I wonder if we should change get_req_copy_number() so that it returns
> > a smaller number only when cluster mode is unsafe.
>
> get_req_copy_number just tries hard to get the correct copies to work on. I think we shouldn't rely on the failure of write to backend to check if this operation is valid. If we are failed, we can't easily remove the objects that are partially written to backend store. This is two deep in the write path, we'd better exclude this write as early as possible.
>
> The point of nohalt or quorum is to let cluster keep running for a short period for the crash events that make the number of nodes in the cluster is less than nr_copies. Allow creating VDI with required copies larger than alive nodes is nonsense. How about following patch:
>
> f8770d90579f026c7881f974a5f8 Mon Sep 17 00:00:00 2001
> From: Liu Yuan <tailai.ly at taobao.com>
> Date: Fri, 15 Mar 2013 15:57:53 +0800
> Subject: [PATCH v2] collie: don't create VDI when there are not enough nodes
>
> If we have less nodes than required copies, just error return.
>
> Reported-by: Valerio Pachera <sirio81 at gmail.com>
> Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
> ---
> collie/vdi.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
Applied, thanks!
Kazutaka
More information about the sheepdog-users
mailing list