diff mbox series

[11/36] xfs_scrub_all.timer: activate after most of the system is up

Message ID 155259749738.31886.13894651790702916465.stgit@magnolia (mailing list archive)
State Accepted
Headers show
Series xfsprogs-5.0: fix various problems | expand

Commit Message

Darrick J. Wong March 14, 2019, 9:04 p.m. UTC
From: Darrick J. Wong <darrick.wong@oracle.com>

We really don't want the xfs_scrub_all timer triggering while the system
is booting up because not all the mounts will have finished, networking
might not be up for reporting, and slowing down bootup annoys people.
Therefore, delay the xfs_scrub_all service's activation until after the
system has started all the big pieces it's going to start.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 scrub/xfs_scrub_all.service.in |    1 +
 1 file changed, 1 insertion(+)

Comments

Eric Sandeen March 15, 2019, 2:56 a.m. UTC | #1
On 3/14/19 4:04 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> We really don't want the xfs_scrub_all timer triggering while the system
> is booting up because not all the mounts will have finished, networking
> might not be up for reporting, and slowing down bootup annoys people.
> Therefore, delay the xfs_scrub_all service's activation until after the
> system has started all the big pieces it's going to start.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

<mumble handwave systemd mumble>

what happens if you state an After requirement for something that doesn't
exist on the box?  Is it just ignored?

(he asks, after looking for what connman.service is and finds that it's not
ubiquitous ...)

> ---
>  scrub/xfs_scrub_all.service.in |    1 +
>  1 file changed, 1 insertion(+)
> 
> 
> diff --git a/scrub/xfs_scrub_all.service.in b/scrub/xfs_scrub_all.service.in
> index 66f82fc7..b1b80da4 100644
> --- a/scrub/xfs_scrub_all.service.in
> +++ b/scrub/xfs_scrub_all.service.in
> @@ -2,6 +2,7 @@
>  Description=Online XFS Metadata Check for All Filesystems
>  ConditionACPower=true
>  Documentation=man:xfs_scrub_all(8)
> +After=paths.target multi-user.target network.target network-online.target systemd-networkd.service NetworkManager.service connman.service
>  
>  [Service]
>  Type=oneshot
>
Darrick J. Wong March 15, 2019, 2:59 a.m. UTC | #2
On Thu, Mar 14, 2019 at 09:56:35PM -0500, Eric Sandeen wrote:
> 
> 
> On 3/14/19 4:04 PM, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> > 
> > We really don't want the xfs_scrub_all timer triggering while the system
> > is booting up because not all the mounts will have finished, networking
> > might not be up for reporting, and slowing down bootup annoys people.
> > Therefore, delay the xfs_scrub_all service's activation until after the
> > system has started all the big pieces it's going to start.
> > 
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> 
> <mumble handwave systemd mumble>
> 
> what happens if you state an After requirement for something that doesn't
> exist on the box?  Is it just ignored?

Yes, it's ignored, like everything else systemd's service file parser
doesn't understand FBOFW.

--D

> (he asks, after looking for what connman.service is and finds that it's not
> ubiquitous ...)
> 
> > ---
> >  scrub/xfs_scrub_all.service.in |    1 +
> >  1 file changed, 1 insertion(+)
> > 
> > 
> > diff --git a/scrub/xfs_scrub_all.service.in b/scrub/xfs_scrub_all.service.in
> > index 66f82fc7..b1b80da4 100644
> > --- a/scrub/xfs_scrub_all.service.in
> > +++ b/scrub/xfs_scrub_all.service.in
> > @@ -2,6 +2,7 @@
> >  Description=Online XFS Metadata Check for All Filesystems
> >  ConditionACPower=true
> >  Documentation=man:xfs_scrub_all(8)
> > +After=paths.target multi-user.target network.target network-online.target systemd-networkd.service NetworkManager.service connman.service
> >  
> >  [Service]
> >  Type=oneshot
> >
Eric Sandeen March 15, 2019, 3:02 a.m. UTC | #3
On 3/14/19 4:04 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> We really don't want the xfs_scrub_all timer triggering while the system
> is booting up because not all the mounts will have finished, networking
> might not be up for reporting, and slowing down bootup annoys people.
> Therefore, delay the xfs_scrub_all service's activation until after the
> system has started all the big pieces it's going to start.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> ---
>  scrub/xfs_scrub_all.service.in |    1 +
>  1 file changed, 1 insertion(+)
> 
> 
> diff --git a/scrub/xfs_scrub_all.service.in b/scrub/xfs_scrub_all.service.in
> index 66f82fc7..b1b80da4 100644
> --- a/scrub/xfs_scrub_all.service.in
> +++ b/scrub/xfs_scrub_all.service.in
> @@ -2,6 +2,7 @@
>  Description=Online XFS Metadata Check for All Filesystems
>  ConditionACPower=true
>  Documentation=man:xfs_scrub_all(8)
> +After=paths.target multi-user.target network.target network-online.target systemd-networkd.service NetworkManager.service connman.service
>  
>  [Service]
>  Type=oneshot
>
diff mbox series

Patch

diff --git a/scrub/xfs_scrub_all.service.in b/scrub/xfs_scrub_all.service.in
index 66f82fc7..b1b80da4 100644
--- a/scrub/xfs_scrub_all.service.in
+++ b/scrub/xfs_scrub_all.service.in
@@ -2,6 +2,7 @@ 
 Description=Online XFS Metadata Check for All Filesystems
 ConditionACPower=true
 Documentation=man:xfs_scrub_all(8)
+After=paths.target multi-user.target network.target network-online.target systemd-networkd.service NetworkManager.service connman.service
 
 [Service]
 Type=oneshot