On Tue, 4 May 2021 21:41:03 -0700 Ross Boylan wrote:

[...]
> On Mon, May 3, 2021 at 2:24 PM Francesco Poli <invernom...@paranoici.org> 
> wrote:
[...]
> > I would be grateful, if you could find out why.
> > I am asking you, since you seem to be more knowledgeable about logcheck
> > than me.
> 
> This strikes me as secondary to avoiding having hourly runs for a
> daily job, but I've tracked down what's going on.

It's not so secondary: anacron runs hourly for very similar reasons,
and you do not seem to complain about it!
Maybe just because its hourly check does not trigger a logcheck mail
message?!?    ;-)

> 
> There are specific patterns to ignore the relevant messages.  For
> example, for anacron
[...]
> The file ships as part of the logcheck-database package, although
> individual packages can also install such files directly,
> i.e., it could have shipped as part of anacron.

I see: there are a number of such files which are indeed shipped in
other packages.
I do not have logcheck installed, but I have some logcheck
configuration snippets:

  $ dpkg -S /etc/logcheck/ignore.d.server/mdadm 
  mdadm: /etc/logcheck/ignore.d.server/mdadm
  $ dpkg -S /etc/logcheck/ignore.d.server/rsyslog 
  rsyslog: /etc/logcheck/ignore.d.server/rsyslog

and so forth...

> 
> But
> ================== ...ignore.d.server/systemd 
> =================================
> ^[[:alpha:]]{3} [ :[:digit:]]{11} [._[:alnum:]\-]+ systemd\[[0-9]+\]:
> (Starting|Stopping) [ +[:alnum:]/]+\.(\.\.)?$
> ============================================================
> looks as if it should match the Starting..., but the expression [
> +[:alnum:]/]+ does not match "-" in "apt-listbugs".  Changing it to
> [- +[:alnum:]/]+ does get it to match.  I think "-" needs to be first
> to avoid having it interpreted as indicating a range.  There is also a
> rule for Finished, but it enumerates specific text to look for and
> apt-listbugs isn't on it

I will probably add a /etc/logcheck/ignore.d.server/apt-listbugs file
sooner or later (after bullseye is released as stable).

[...]
> Granted that detecting if the network is "really" up has no perfect
> solution, it seems to me there's no strong reason for apt-listbugs to
> be more paranoid about it than other packages, where by paranoid I
> mean checking every hour because it's possible there was a network
> problem.

Please note that anacron only has daily, weekly, and monthly tasks to
execute.  Nonetheless, it checks hourly whether there's anything still
to be done.  And its tasks do not necessarily involve network access...

I am convinced that apt-listbugs should not risk wasting opportunities
to successfully run its cleanup task.  Otherwise users will report bugs
complaining that package pins are never removed or removed too late.

[...]
> > So, unless you reboot at least once a day (and be online shortly
> > after!), you may fail several attempts in a row, just because you are
> > not online at the "right" time...
> 
> There is a 5 minute delay,

Exactly: by "shortly after" I meant "within 5 minutes".

> and network targets to try to assure connectivity.

These are not too reliable, as already said.

[...]
> > But your suggestion is not too bad.
> > Maybe something like:
> >
> >   Description=Hourly check for daily apt-listbugs preferences cleanup
> >
> 
> That sounds pretty good to me.
[...]

Thanks: I will think about it.


-- 
 http://www.inventati.org/frx/
 There's not a second to spare! To the laboratory!
..................................................... Francesco Poli .
 GnuPG key fpr == CA01 1147 9CD2 EFDF FB82  3925 3E1C 27E1 1F69 BFFE

Attachment: pgpzPMAlGTapV.pgp
Description: PGP signature

Reply via email to