From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: sandeen@redhat.com, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 27/29] xfs_scrub: integrate services with systemd
Date: Thu, 25 Jan 2018 14:36:39 -0800 [thread overview]
Message-ID: <20180125223639.GQ9068@magnolia> (raw)
In-Reply-To: <0a9006ce-05ea-1bc8-751e-6a49aa0db32a@sandeen.net>
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@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2018-01-25 22:36 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-17 22:01 [PATCH v11.1 00/29] xfsprogs: online scrub/repair support Darrick J. Wong
2018-01-17 22:01 ` [PATCH 01/29] xfs_scrub: create online filesystem scrub program Darrick J. Wong
2018-01-17 22:02 ` [PATCH 02/29] xfs_scrub: common error handling Darrick J. Wong
2018-01-17 22:02 ` [PATCH 03/29] xfs_scrub: set up command line argument parsing Darrick J. Wong
2018-01-17 22:02 ` [PATCH 04/29] xfs_scrub: dispatch the various phases of the scrub program Darrick J. Wong
2018-01-17 22:02 ` [PATCH 05/29] xfs_scrub: figure out how many threads we're going to need Darrick J. Wong
2018-01-17 22:02 ` [PATCH 06/29] xfs_scrub: create an abstraction for a block device Darrick J. Wong
2018-01-17 22:02 ` [PATCH 07/29] xfs_scrub: find XFS filesystem geometry Darrick J. Wong
2018-01-17 22:02 ` [PATCH 08/29] xfs_scrub: add inode iteration functions Darrick J. Wong
2018-01-17 22:02 ` [PATCH 09/29] xfs_scrub: add space map " Darrick J. Wong
2018-01-17 22:02 ` [PATCH 10/29] xfs_scrub: add file " Darrick J. Wong
2018-01-17 22:03 ` [PATCH 11/29] xfs_scrub: filesystem counter collection functions Darrick J. Wong
2018-01-17 22:03 ` [PATCH 12/29] xfs_scrub: wrap the scrub ioctl Darrick J. Wong
2018-01-17 22:03 ` [PATCH 13/29] xfs_scrub: scan filesystem and AG metadata Darrick J. Wong
2018-01-17 22:03 ` [PATCH 14/29] xfs_scrub: thread-safe stats counter Darrick J. Wong
2018-01-17 22:03 ` [PATCH 15/29] xfs_scrub: scan inodes Darrick J. Wong
2018-01-17 22:03 ` [PATCH 16/29] xfs_scrub: check directory connectivity Darrick J. Wong
2018-01-17 22:03 ` [PATCH 17/29] xfs_scrub: warn about suspicious characters in directory/xattr names Darrick J. Wong
2018-01-17 22:03 ` [PATCH 18/29] xfs_scrub: warn about normalized Unicode name collisions Darrick J. Wong
2018-01-17 22:03 ` [PATCH 19/29] xfs_scrub: create a bitmap data structure Darrick J. Wong
2018-01-17 22:03 ` [PATCH 20/29] xfs_scrub: create infrastructure to read verify data blocks Darrick J. Wong
2018-01-17 22:04 ` [PATCH 21/29] xfs_scrub: scrub file " Darrick J. Wong
2018-01-17 22:04 ` [PATCH 22/29] xfs_scrub: optionally use SCSI READ VERIFY commands to scrub data blocks on disk Darrick J. Wong
2018-01-17 22:04 ` [PATCH 23/29] xfs_scrub: check summary counters Darrick J. Wong
2018-01-17 22:04 ` [PATCH 24/29] xfs_scrub: fstrim the free areas if there are no errors on the filesystem Darrick J. Wong
2018-01-17 22:04 ` [PATCH 25/29] xfs_scrub: progress indicator Darrick J. Wong
2018-01-17 22:04 ` [PATCH 26/29] xfs_scrub: create a script to scrub all xfs filesystems Darrick J. Wong
2018-01-17 22:04 ` [PATCH 27/29] xfs_scrub: integrate services with systemd Darrick J. Wong
2018-01-25 21:21 ` Eric Sandeen
2018-01-25 21:44 ` Darrick J. Wong
2018-01-25 22:16 ` Eric Sandeen
2018-01-25 22:36 ` Darrick J. Wong [this message]
2018-01-25 23:10 ` Darrick J. Wong
2018-01-26 18:15 ` [PATCH v2 " Darrick J. Wong
2018-01-17 22:04 ` [PATCH 28/29] xfs_scrub: wire up repair ioctl Darrick J. Wong
2018-01-17 22:04 ` [PATCH 29/29] xfs_scrub: schedule and manage optimizations/repairs to the filesystem Darrick J. Wong
-- strict thread matches above, loose matches on Subject: below --
2018-01-31 3:06 [PATCH v11.2 00/29] xfsprogs: online scrub/repair support Darrick J. Wong
2018-01-31 3:09 ` [PATCH 27/29] xfs_scrub: integrate services with systemd Darrick J. Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180125223639.GQ9068@magnolia \
--to=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@redhat.com \
--cc=sandeen@sandeen.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox