F20 - Unintended consequences of no default MTA - How best to fix

Lars E. Pettersson lars at homer.se
Fri Jan 3 11:08:02 UTC 2014


On 01/03/2014 05:07 AM, Pete Travis wrote:
> I think there was some misunderstanding here. If you can't find your
> cronjob output in the journal, *your* cron is broken.

Default installation:

[root at tux ~]# rpm -V cronie
[root at tux ~]# rpm -q cronie
cronie-1.4.11-4.fc20.x86_64
[root at tux ~]# rpm -V crontabs
[root at tux ~]# rpm -q crontabs
crontabs-1.11-7.20130830git.fc20.noarch

> Before I get too
> far in, in my opinion, mails are good for notification, voluminous
> content should be in the logs that the mail notifies about. The journal
> is good at logs.

Mail has no problem handling voluminous content. It is also very easy to 
retrieve without knowing quite a lot of strange options to a command 
that you have to print in a terminal.

> $ journalctl SYSLOG_IDENTIFIER=CROND -f  #filtered for convenience

Where is my output from yum-cron (yum-cron is run hourly and it has a 
fault at the moment due to spots Chrome repository not yet being up to 
Fedora 20)?

[root at tux ~]# journalctl SYSLOG_IDENTIFIER=CROND --since=-2h
-- Logs begin at Tue 2013-07-02 20:53:56 CEST, end at Fri 2014-01-03 
11:40:01 CE
Jan 03 09:50:01 tux CROND[3666]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Jan 03 10:00:01 tux CROND[3895]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Jan 03 10:01:01 tux CROND[4044]: (root) CMD (run-parts /etc/cron.hourly)
Jan 03 10:10:01 tux CROND[4358]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Jan 03 10:20:01 tux CROND[5345]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Jan 03 10:30:01 tux CROND[5521]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Jan 03 10:40:01 tux CROND[5790]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Jan 03 10:50:01 tux CROND[6135]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Jan 03 11:00:01 tux CROND[6388]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Jan 03 11:01:01 tux CROND[6541]: (root) CMD (run-parts /etc/cron.hourly)
Jan 03 11:10:01 tux CROND[6763]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Jan 03 11:20:01 tux CROND[6963]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Jan 03 11:30:01 tux CROND[7380]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Jan 03 11:40:01 tux CROND[7681]: (root) CMD (/usr/lib64/sa/sa1 1 1)

> But wait! These things could get all mixed up on a busy machine, you
> say! Let's take a closer look at a message:
>
> MESSAGE=(pete) CMDOUT (New Things are Different.)
[lots of lines removed]
>      SYSLOG_IDENTIFIER=CROND
>      _CMDLINE=/usr/sbin/CROND -n
>      _BOOT_ID=0557929cbde247928f945d8b53a6e067

How is non technical user supposed to understand this? What command 
sequence did you use to get that output?

> $ journalctl SYSLOG_IDENTIFIER=CROND _AUDIT_SESSION=83 -b

How do you find out the _AUDIT_SESSION to use?

> Stop! I don't want all that extra information, you say! `journalctl`
> should KNOW I'm not interested in the timestamp, or the hostname, or the
> name and PID of the reporting binary - just give me the message!
>
> journalctl SYSLOG_IDENTIFIER=CROND _AUDIT_SESSION=83 -o cat
> (pete) CMD (LARSHAPPY="no"; if [[ "$LARSHAPPY" == "no" ]]; then echo -e
> "<This isn't the same.\nNew Th
> (pete) CMDOUT (This isn't the same.)
> (pete) CMDOUT (New Things are Different.)
> (pete) CMDOUT (Some people like the old thing.)

That is several messages. I want only one...

How am I notified that I should look in the journal when things go 
wrong? (With mail I am notified and also get the "log" lines all at once)

> I'll agree that this isn't as *simple* as banging out a four letter word
> and reading message, but the journal can provide context, too.

I am not arguing whether the journal is good or not, I am arguing 
whether removing the MTA used to send mail, sent from some applications, 
is good or bad. As I see it, as long as some applications do send mail, 
we have to have a MTA. Or at least let those applications have a 
requirement of a MTA so that the MTA is installed when those 
applications are installed on the system. That is my key argument, not 
that the journal is bad.

The journal is OK, but very hard for a non technical user to use. What 
is needed is probably a very good graphical frontend that hides all 
these strange things you show us in your mail. How is a non technical 
user supposed to understand all this?

> You're putting lots of effort into complaining about a hugely useful
> tool, and apparently little into learning about it.  If the complaint is
> about cronjobs, start here:

I am not complaining about the journal. But please let us know where to 
find a "journal for dummies" text where we can find out how to become 
journal experts. The man page is a bit sparse on information.

> Of course, if you like the old way, you can just install and configure
> an MTA.

I have to as long as some applications use that path to send messages to 
me. The same thing goes for all others installing these applications. 
Without a MTA these messages are lost in bit space.

Lars
-- 
Lars E. Pettersson <lars at homer.se>
http://www.sm6rpz.se/


More information about the users mailing list