RE: bug in /etc/init.d/ceph debian

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 9 Aug 2013, James Harper wrote:
> > > I haven't tried your patch yet, but can it ever return 0? It seems to
> > > set it to 3 initially, and then change it to 1 if it finds an error. I
> > > can't see that it ever sets it to 0 indicating that daemons are running.
> > > Easy enough to fix by setting the EXIT_STATUS=0 after the check of
> > > daemon_is_running, I think, but it still doesn't allow for the case
> > > where there are three OSD's, one is running, one is stopped, and one is
> > > failed. The EXIT_STATUS in that case appears to be based on the last
> > > daemon checked, eg basically random.
> > 
> > What should it return in that case?
> > 
> 
> I've been thinking about this some more and I'm still not sure. I think my patch says:
> if _any_ are in error then return 1
> else if any are running return 0
> else if all are stopped return 3
> 
> But I think this still won't have the desired outcome if you have 2 OSD's. The possible situations if the resource is supposed to be running are:
> . Both running => all good, pacemaker will do nothing
> . Both stopped => all good, pacemaker will start the services
> . One stopped one running => not good, pacemaker won't make any effort to start services

If one daemon si stopped and one is running, returning 'not running' seems 
ok to me, since 'start' at that point will do the right thing.

> . One in error, one running => not good. I'm not sure exactly what will happen but it won't be what you expect.

I think it's fine for this to be an error condition.

> 
> The only solution I can see is to manage the services individually, in 
> which case the init.d script with your patch + setting to 0 if running 
> does the right thing anyway.

Yeah, managing individually is probably the most robust, but if it works 
well enough in the generic configuration with no customization that is 
good.

Anyway, I'm fine with whatever variation of your original or my patch you 
think addresses this.  A comment block in the init-ceph script documenting 
what the return codes mean (similar to the above) would be nice so that 
it is clear to the next person who comes along.

Thanks!
sage
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux