public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
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 v2 27/29] xfs_scrub: integrate services with systemd
Date: Wed, 31 Jan 2018 12:52:49 -0800	[thread overview]
Message-ID: <20180131205249.GF4849@magnolia> (raw)
In-Reply-To: <a2d8f4f5-dc78-b350-bcc2-a4f00abca9ad@sandeen.net>

On Wed, Jan 31, 2018 at 02:30:22PM -0600, Eric Sandeen wrote:
> On 1/31/18 12:41 AM, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> > 
> > Create a systemd service unit so that we can run the online scrubber
> > under systemd with (somewhat) appropriate containment.
> > 
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> > ---
> > v2: fix some of the debian packaging weirdness, kudos to Nathan Scott!
> 
> Er, hang on:
> 
> checking for SYSTEMD... configure: error: Package requirements (systemd) were not met:
> 
> now systemd is a /build/ requirement for xfsprogs?  nope nope. :)
> 
> This is only used for unit file install targets, right?  If systemd
> is missing, surely those install targets should just be skipped.
> 
> Looks like the Makefile DTRT, but the stuff in m4/ should be non-fatal?
> 
> (I can't tell what makes this fatal ... I think its' fatal?

Yeah, I forgot to hoist the pkg-config bits into the if-true and
neutralize the if-not parts of the PKG_CHECK_MODULES call.

--D

> 
> > checking for SYSTEMD... configure: error: Package requirements (systemd) were not met:
> > 
> > No package 'systemd' found
> > 
> > Consider adjusting the PKG_CONFIG_PATH environment variable if you
> > installed software in a non-standard prefix.
> > 
> > Alternatively, you may set the environment variables SYSTEMD_CFLAGS
> > and SYSTEMD_LIBS to avoid the need to call pkg-config.
> > See the pkg-config man page for more details.
> > 
> > # echo $?
> > 1
> 
> looks fatal.)
> 
> ...
> 
> 
> > diff --git a/scrub/Makefile b/scrub/Makefile
> > index ca6dab0..0632794 100644
> > --- a/scrub/Makefile
> > +++ b/scrub/Makefile
> > @@ -15,6 +15,19 @@ LTCOMMAND = xfs_scrub
> >  INSTALL_SCRUB = install-scrub
> >  XFS_SCRUB_ALL_PROG = xfs_scrub_all
> >  XFS_SCRUB_ARGS = -b -n
> > +ifeq ($(HAVE_SYSTEMD),yes)
> > +INSTALL_SCRUB += install-systemd
> > +SYSTEMD_SERVICES = xfs_scrub@.service xfs_scrub_all.service xfs_scrub_all.timer xfs_scrub_fail@.service
> > +OPTIONAL_TARGETS += $(SYSTEMD_SERVICES)
> > +endif
> > +ifeq ($(HAVE_CROND),yes)
> > +INSTALL_SCRUB += install-crond
> > +CRONTABS = xfs_scrub_all.cron
> > +OPTIONAL_TARGETS += $(CRONTABS)
> > +# Don't enable the crontab by default for now
> > +CROND_DIR = $(PKG_LIB_DIR)/$(PKG_NAME)
> > +endif
> 
> Wouldn't an else if arrangement make more sense?  Why would we install both?
> I'd have expected "Install systemd if available, else install
> crond if available, else don't install anything." 
> ... and then the cron job can stop checking for systemd too:
> 
> > diff --git a/scrub/xfs_scrub_all.cron.in b/scrub/xfs_scrub_all.cron.in
> > new file mode 100644
> > index 0000000..3dea929
> > --- /dev/null
> > +++ b/scrub/xfs_scrub_all.cron.in
> > @@ -0,0 +1 @@
> > +10 3 * * 0 root test -e /run/systemd/system || @sbindir@/xfs_scrub_all
> > diff --git a/scrub/xfs_scrub_all.in b/scrub/xfs_scrub_all.in
> 
> 
> unless I'm missing something?
> 
> 
> Thanks,
> -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

  reply	other threads:[~2018-01-31 20:52 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-31  3:06 [PATCH v11.2 00/29] xfsprogs: online scrub/repair support Darrick J. Wong
2018-01-31  3:06 ` [PATCH 01/29] xfs_scrub: create online filesystem scrub program Darrick J. Wong
2018-01-31  3:06 ` [PATCH 02/29] xfs_scrub: common error handling Darrick J. Wong
2018-01-31  3:06 ` [PATCH 03/29] xfs_scrub: set up command line argument parsing Darrick J. Wong
2018-01-31  3:06 ` [PATCH 04/29] xfs_scrub: dispatch the various phases of the scrub program Darrick J. Wong
2018-01-31  3:07 ` [PATCH 05/29] xfs_scrub: figure out how many threads we're going to need Darrick J. Wong
2018-01-31  3:07 ` [PATCH 06/29] xfs_scrub: create an abstraction for a block device Darrick J. Wong
2018-01-31  3:07 ` [PATCH 07/29] xfs_scrub: find XFS filesystem geometry Darrick J. Wong
2018-01-31  3:07 ` [PATCH 08/29] xfs_scrub: add inode iteration functions Darrick J. Wong
2018-01-31  3:07 ` [PATCH 09/29] xfs_scrub: add space map " Darrick J. Wong
2018-01-31  3:07 ` [PATCH 10/29] xfs_scrub: add file " Darrick J. Wong
2018-01-31  3:07 ` [PATCH 11/29] xfs_scrub: filesystem counter collection functions Darrick J. Wong
2018-01-31  3:07 ` [PATCH 12/29] xfs_scrub: wrap the scrub ioctl Darrick J. Wong
2018-01-31  3:07 ` [PATCH 13/29] xfs_scrub: scan filesystem and AG metadata Darrick J. Wong
2018-01-31  3:08 ` [PATCH 14/29] xfs_scrub: thread-safe stats counter Darrick J. Wong
2018-01-31  3:08 ` [PATCH 15/29] xfs_scrub: scan inodes Darrick J. Wong
2018-01-31  3:08 ` [PATCH 16/29] xfs_scrub: check directory connectivity Darrick J. Wong
2018-01-31  3:08 ` [PATCH 17/29] xfs_scrub: warn about suspicious characters in directory/xattr names Darrick J. Wong
2018-01-31  3:08 ` [PATCH 18/29] xfs_scrub: warn about normalized Unicode name collisions Darrick J. Wong
2018-01-31  3:08 ` [PATCH 19/29] xfs_scrub: create a bitmap data structure Darrick J. Wong
2018-01-31  3:08 ` [PATCH 20/29] xfs_scrub: create infrastructure to read verify data blocks Darrick J. Wong
2018-01-31  3:08 ` [PATCH 21/29] xfs_scrub: scrub file " Darrick J. Wong
2018-01-31  3:09 ` [PATCH 22/29] xfs_scrub: optionally use SCSI READ VERIFY commands to scrub data blocks on disk Darrick J. Wong
2018-01-31  3:09 ` [PATCH 23/29] xfs_scrub: check summary counters Darrick J. Wong
2018-01-31  3:09 ` [PATCH 24/29] xfs_scrub: fstrim the free areas if there are no errors on the filesystem Darrick J. Wong
2018-01-31  3:09 ` [PATCH 25/29] xfs_scrub: progress indicator Darrick J. Wong
2018-01-31  3:09 ` [PATCH 26/29] xfs_scrub: create a script to scrub all xfs filesystems Darrick J. Wong
2018-01-31  6:40   ` [PATCH v2 " Darrick J. Wong
2018-01-31  3:09 ` [PATCH 27/29] xfs_scrub: integrate services with systemd Darrick J. Wong
2018-01-31  6:41   ` [PATCH v2 " Darrick J. Wong
2018-01-31 20:30     ` Eric Sandeen
2018-01-31 20:52       ` Darrick J. Wong [this message]
2018-01-31 20:54   ` [PATCH v3 " Darrick J. Wong
2018-01-31  3:09 ` [PATCH 28/29] xfs_scrub: wire up repair ioctl Darrick J. Wong
2018-01-31  3:09 ` [PATCH 29/29] xfs_scrub: schedule and manage optimizations/repairs to the filesystem Darrick J. Wong
2018-01-31 17:30 ` [PATCH 30/29] debian/control: remove nonexistent libreadline5-dev build dependency Darrick J. Wong
2018-02-01 20:33   ` [PATCH 31/29] xfs_scrub: handle scrub-only kernels more helpfully Eric Sandeen
2018-02-01 21:11     ` Darrick J. Wong
2018-02-01 21:46     ` [PATCH 31/29 v2] " Eric Sandeen
2018-02-01 21:49       ` Bill O'Donnell
2018-02-01 22:17       ` Darrick J. Wong
  -- strict thread matches above, loose matches on Subject: below --
2018-01-17 22:01 [PATCH v11.1 00/29] xfsprogs: online scrub/repair support Darrick J. Wong
2018-01-17 22:04 ` [PATCH 27/29] xfs_scrub: integrate services with systemd Darrick J. Wong
2018-01-26 18:15   ` [PATCH v2 " 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=20180131205249.GF4849@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