[sheepdog] [PATCH v2 1/4] sheep: leave cluster after unpluging all disks
Liu Yuan
namei.unix at gmail.com
Fri Jun 20 11:32:28 CEST 2014
On Fri, Jun 20, 2014 at 05:16:19PM +0800, Robin Dong wrote:
> 2014-06-20 16:51 GMT+08:00 Liu Yuan <namei.unix at gmail.com>:
>
> > On Fri, Jun 20, 2014 at 04:21:27PM +0800, Robin Dong wrote:
> > > From: Robin Dong <sanbai at taobao.com>
> > >
> > > After following steps:
> > >
> > > 1. start 6 sheep cluster, every sheep has 4 data path
> > > 2. unplug 4 data path for one sheep daemon
> > >
> > > then we will see the sheep daemon which has no data path is also
> > > in the cluster by using 'dog node list'.But a sheep daemon with
> > > no data path should be a pure gateway.
> > >
> > > So we should return EIO after unpluging last disk which will cause
> > > sheep to leave cluster.
> > >
> >
> > sheep will leave cluster by EIO later when it tries to access disks. See
> > md_handle_eio().
> >
>
> > Suppose you unplug all the 4 disks for maintainance and then plug back 4
> > new
> > disks. We should allow this use case, so this patch looks wrong to me.
>
>
> > By the way, what is purpose of making a sheep as pure gateway while
> > running?
> >
>
> If all disks corrupt, the sheep daemon on this node will become a pure
> gateway, after this,
> some one 's wrong operation (such as plug a new disk) will make all nodes
> coredump.
If all disks are borken, then sheep will get EIO finally and leave cluster with
the currrent code.
Thanks
Yuan
More information about the sheepdog
mailing list