Re: [PATCH 27/29] xfs_scrub: integrate services with systemd

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

 



On Thu, Jan 25, 2018 at 04:16:52PM -0600, Eric Sandeen wrote:
> 
> 
> On 1/25/18 3:44 PM, Darrick J. Wong wrote:
> >> Ok this seems batshit crazy, no offense.  I don't blame /you/ ;)  You pointed me
> >> at  http://refspecs.linuxbase.org/LSB_2.0.1/LSB-PDA/LSB-PDA/iniscrptact.html
> >> but it says that the /initscript/ should exit with specific codes, not that
> >> the application it /calls/ should do so.
> > Yes.  At the moment, the systemd service calls xfs_scrub directly, hence
> > it interprets the return code as an initscript error code.  So in theory
> > we could create a wrapper script that does all the is_service junk, but
> > now that's another weird little script to break.  On the plus side we'd
> > contain the systemd workaround crap to some random wrapper in /usr/lib.
> > 
> > Ok, I'll think about it.
> > 
> 
> does LSB even have anything to do w/ systemd behavior or have they reinvented
> all that by now?  :(

I think systemd is mostly following LSB here, though they give us the
flexibility to screw things up.

> FWIW,
> 
> https://www.freedesktop.org/software/systemd/man/systemd.service.html
> 
> says that you can define:
> 
> SuccessExitStatus=
> 
>     Takes a list of exit status definitions that, when returned by the main service process, will be considered successful termination
> 
> does that help?

No.  The xfs_scrub_fail@ service is only invoked if the service fails,
so if we use SuccessExitStatus= to remap the scrub problem error codes
to "success" then systemd considers the service to have succeeded and
won't start the _fail service.

--D

> 
> -Eric
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux