Small problems with mail notifications

  • Hi, I get 4 mails a day from my up-to-date OMV installation :

    • 1 almost always empty anacron (I saw it will be fixed in the next release 1.0.30)
    • 2 identical mails about cron-apt telling me what packages are updatable (one before 5am and the second before 8am)
    • 1 sparesmissing event on a two disks raid 1 array (fixed by setting spare to 0 in /etc/mdadm/mdadm.conf, as seen in the forum)

    How can I get only one cron-apt mail per day ? By the way, the "software updates" event in the notification page isn't check, so I suppose I shouldn't get any.


    Thx

  • please check the time of the mails from cron-apt. Is one of them identical to the time with the mail of anacron? Maybe cron-apt is executed by anacon also?

  • Yup, one of the mail has been sent today at 7:55, at the same time as the anacron one


    The other has been sent at 4:57.


    Here's the content of my anacrontab :

    Code
    # These replace cron's entries
    1       5       cron.daily      run-parts --report /etc/cron.daily
    7       10      cron.weekly     run-parts --report /etc/cron.weekly
    @monthly        15      cron.monthly    run-parts --report /etc/cron.monthly


    And the content of my /etc/crontab :

    Code
    17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
    25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
    47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
    52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )


    I lack knowledge about anacron, but should I disable the cron hourly and cron weekly in my crontab file ? Aren't the entries redundant ?


    Thx

  • no, this tests, if anacron is executable test -x /usr/sbin/anacron and if not it executes e.g. run-parts --report /etc/cron.daily
    don't see any error ;(

  • ok, I found the 4:00am occurence : it's defined in /etc/cron.d/cron-apt


    In the crontab file, cron.daily is supposed to be run at 6:25am, but the second mail I get says it runs at 7:35, and I get this mail at the same time as the soon-to-be-fixed empty anacron mail. I found another occurence in the /etc/cron.daily/openmediavault-cron-apt file that runs cron-apt (I ran it manually and got a mail).


    So I really have two launches a day of the cron-apt. According to OMV guidelines, which one should I remove and won't come back in a future upgrade ?

  • I also have that annoying problem of getting 2 e-mails about OMV updates. They are slightly different but basically tell the same thing.




    I'd rather just get one of these e-mails...

  • Do you have "anacron" installed, too?


    BTW: I have this entry in /etc/cron.d/cron-apt

    Code
    # Every hour.
    # 0 *   * * *   root    test -x /usr/sbin/cron-apt && /usr/sbin/cron-apt /etc/cron-apt/config2
    # Every five minutes.
    # */5 * * * *   root    test -x /usr/sbin/cron-apt && /usr/sbin/cron-apt /etc/cron-apt/config2


    But there is no file /etc/cron-apt/config2


    I think I found the bug:
    cron-apt is run daily by /etc/cron.daily/openmediavault-cron-apt, which is called from cron.daily and regularly at 4:00 by /etc/cron.d/cron-apt
    Shouldn't there be only one entry in cron.daily?

  • I [still] have this problem too, exactly the same, duplicate cron-apt update ready emails at 4 am and 7.35 am.


    As far as I can see, the 4 am cron-apt is run because /etc/cron.d/cron-apt is configured so:

    Code
    #
    # Regular cron jobs for the cron-apt package
    #
    # Every night at 4 o'clock.
    0 4     * * *   root    test -x /usr/sbin/cron-apt && /usr/sbin/cron-apt
    # Every hour.
    # 0 *   * * *   root    test -x /usr/sbin/cron-apt && /usr/sbin/cron-apt /etc/cron-apt/config2
    # Every five minutes.
    # */5 * * * *   root    test -x /usr/sbin/cron-apt && /usr/sbin/cron-apt /etc/cron-apt/config2


    ... and the 7.35 am job because of /etc/cron.daily/openmediavault-cron-apt: test -x /usr/sbin/cron-apt && /usr/sbin/cron-apt


    These files are the same on an OMV install that has been upgraded from 1.9 (I think) to 2.1 and has other packages and stuff, but also on a fresh install of 2.1 I did in a VM to test it.
    The file /etc/cron.daily/openmediavault-cron-apt contains the following note:


    Code
    # NOTE:
    # If the machine does not run 24/7 it might happen that cron-apt is not
    # executed. Because anacron does not execute cron jobs defined in /etc/cron.d
    # (where the default cron-apt cron job file is located) this script ensures
    # that cron-apt is executed at least once a day.


    So, if the machine does run 24/7, it follows that both the default cron-apt job in cron.d and the omv job in cron.daily are run. I would therefore suggest that the default cron-apt is disabled.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!