[sheepdog-users] Impossible to run vdi check with 1 node

MORITA Kazutaka morita.kazutaka at gmail.com
Fri Jan 25 00:46:39 CET 2013


At Fri, 25 Jan 2013 00:06:11 +0100,
Arnold Krille wrote:
> 
> On Thu, 24 Jan 2013 22:32:48 +0900 MORITA Kazutaka
> <morita.kazutaka at gmail.com> wrote:
> > At Thu, 24 Jan 2013 18:55:02 +0800,
> > Liu Yuan wrote:
> > > 
> > > On 01/24/2013 06:22 PM, MORITA Kazutaka wrote:
> > > > Panic is not appropriate here.  We should exit with an user
> > > > friendly message.
> > > 
> > > Makes sense, there is the patch
> > > 
> > > From b2ba8f9ef3d0929ff001f4ae1e2c60625880eeeb Mon Sep 17 00:00:00
> > > 2001 From: Liu Yuan <tailai.ly at taobao.com>
> > > Date: Thu, 24 Jan 2013 18:53:58 +0800
> > > Subject: [PATCH] collie: give more user friendly error message for
> > > 'vdi check'
> > > 
> > > Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
> > > ---
> > >  collie/vdi.c |    4 ++++
> > >  1 file changed, 4 insertions(+)
> > > 
> > > diff --git a/collie/vdi.c b/collie/vdi.c
> > > index b5af7a9..5f2a889 100644
> > > --- a/collie/vdi.c
> > > +++ b/collie/vdi.c
> > > @@ -1506,6 +1506,10 @@ static int vdi_check(int argc, char **argv)
> > >  		fprintf(stderr, "FATAL: no inode objects\n");
> > >  		goto out;
> > >  	}
> > > +	if (sd_nodes_nr < inode->nr_copies){
> > > +		fprintf(stderr, "FATAL: do not have enough
> > > nodes\n");
> > 
> > FATAL should be used when something serious problem happens on
> > Sheepdog cluster.  I think this is a wrong usage of 'collie vdi
> > check', so how about notifying the user that there is not enough nodes
> > and objects are not fully replicated obviously?
> 
> What about "ABORT: Not enough active nodes for consistency-check"?

Looks good to me.

Thanks,

Kazutaka



More information about the sheepdog-users mailing list