[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-ext4
Subject:    Re: How to package e2scrub
From:       Andreas Dilger <adilger () dilger ! ca>
Date:       2019-05-31 21:43:53
Message-ID: FDA5DE5F-41AE-4B56-9BD7-462E344ECD1A () dilger ! ca
[Download RAW message or body]

On May 31, 2019, at 8:10 AM, Theodore Ts'o <tytso@mit.edu> wrote:
> 
> On Fri, May 31, 2019 at 12:07:13PM +0200, Jan Kara wrote:
>> On Thu 30-05-19 09:51:55, Theodore Ts'o wrote:
>>> On Thu, May 30, 2019 at 11:59:07AM +0200, Jan Kara wrote:
>>>> Yeah, my plan is to just not package cron bits at all since openSUSE / SLES
>>>> support only systemd init anyway these days (and in fact our distro people
>>>> want to deprecate cron in favor of systemd). I guess I'll split off the
>>>> scrub bits into a separate sub-package (likely e2fsprogs will suggest
>>>> installation of this sub-package) and the service will be disabled by
>>>> default.
>>> 
>>> I'm not super-fond of extra sub-packages for their own sake, and the
>>> extra e2scrub bits are small enough (about 32k?) that I don't believe
>>> it justifies an extra sub-package; but that's a distribution-level
>>> packaging decision, so it's certainly fine if we're not completely aligned.
>> 
>> Yes, size is not a big concern but the scrub bits require util-linux, lvm,
>> and mailer to work correctly and I don't want to add these dependencies to
>> stock e2fsprogs package because some minimal installations do not want e.g.
>> lvm at all. Granted these are just scripts so I could get away with not
>> requiring e.g. lvm at all but it seems user-unfriendly to leave it up to
>> user to determine that his systemd-service fails due to missing packages.
> 
> So you're using an extra package to force the installation of the
> necessary prerequisite packages, instead of the current approach where
> we don't require them, but we just skip running the scrub if lvm and
> util-linux are not present.  I think both approaches makes sense.
> 
> It's also a good point that we need to handle the case of a missing
> sendmail intelligently.  It looks like we currently skip sending mail
> at all in the cron case, and in the case systemd case, we'll spew a
> warning (which won't get mailed since there's no sendmail, but it does
> mean some extra lines in the logfile).  All of this being said, it's
> not _completely_ useless to scrub without an mailer; we still mark the
> file system as needing to be checked on the next boot.  But it's
> another argument that we shouldn't enable the service by default.
> 
> For that reason, I'm not sure I'd want to force the installation of a
> mailer, since someone might want to run e2scrub by hand, and
> e2scrub_all every week w/o isn't a completely insane thing.  But we
> certainly should handle that case gracefully.

If sendmail is unavailable (and maybe even if it *is* available), e2scrub
can use logger to write a short message to syslog if there is an error.
Something like:

    e2scrub: $device errors detected, needs offline e2fsck to correct
    e2scrub: $device logs in /var/log/e2scrub....

in mark_corrupt() or from e2scrub_fail.

Cheers, Andreas






["signature.asc" (signature.asc)]

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org

iQIzBAEBCAAdFiEEDb73u6ZejP5ZMprvcqXauRfMH+AFAlzxoBkACgkQcqXauRfM
H+Cyrw/8ClmvfJvUmZcQY1hR2YHksW6R2IqvieYmQ9GO69AkV7UenqOh2y44GSDA
SDf5uweb3+M6NMhlJlaH8AD7uGBt7EY3sm1LR3jyyMLw3aNibdM13y24I4gilGzc
KTQWECwbjFiiz7AUOnN+EBD4u2OHljmaS9o0+UUaGM1t5+LnWM3clUB4jLwDHntp
9AVQaoh322mxIHgjUX+xOthnmk6MvjLH+iPJwrdlh2xZpm1ALKb6QE5yBYlhqNBs
OoRpK0yb2VFi6TssA8cokh6BRcvct39a0Mf6gw0Zjlywuk0bM6nkEUN9bcI75Jj3
qlcGf+iF2RrJeVsUNT8q/b5AjsfIfN5wuhNWErBvQ8L30O0nXIXjpBuEE+CJfAkn
r/z5L+zyb/YYXE4mjePoI1jPS9Jk/5I26g6LWFR6tNRzhRyCV3VYPw3BFfyeMCWf
g1zC0B8IVXWEywkWFBFd88+Ms096ZsDrFf/P5Le0pV/T7HLzlducguKiu4+biwa5
sBlsw2r2yM83Xinx9D7NsTNZqdGX7tSHuAXpSrrzDFZqXR2XeL4dv7t1FLRJzyog
ynsl3hgrnuNBXc8/YnIFf6Q6KadCe0camQH30caxxjt7hu2soIGE/iSBl9porBZ8
lAGeSGxaL+1EedGLHwUM6zT5485ADAvUfuK1bA2RYYUsGAglJg4=
=DBie
-----END PGP SIGNATURE-----


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic