[Users] OpenVZ,, CentOS SCL and failed cron jobs?

Konstantin Khorenko khorenko at virtuozzo.com
Fri Dec 21 12:18:37 MSK 2018


On 12/20/2018 07:39 PM, Jeffrey Walton wrote:
> Hi Everyone,
>
> I'm performing a post-mortem on our [failed] disaster recovery procedures.
>
> We have an OpenVZ-based CentOS 7 VM. We use it for an open source
> project website and wiki. Our backup job in /etc/cron.daily has not
> been executing (nor has other cron jobs, like yum-daily.cron). We
> cannot find mention of the failures in dmesg or other logs in
> /var/log.
>
> It looks like things broke sometime around December 2017 based on the
> date of our last backup. (It is embarrassing, but like I said there
> were no logged failures so I did not know to investigate). I don't
> keep change control logs, but the best I can tell our last two major
> configuration changes were:
>
> * Migrate OpenVZ 7.1 -> 7.2, June 2016
> * Enable CentOS SCL, December 2017
>
> The SCL is Software
> Collections,https://wiki.centos.org/AdditionalResources/Repositories/SCL
>  . We needed it because of the ancient versions of Apache, Python and
> PHP provided with CentOS 7.
>
> My question is, is there a bad interaction or adverse relationship
> with OpenVZ, SCL repos and cron?

Hi Jeffrey,

unfortunately i have not heard about issues related with OpenVZ + SCL,
seems you are challenged to investigate it.

i'd start with checking if cron service is run at all,
its logs via "systemctl status crond.service",
running crond binary under strace to check which exactly configuration files it reads,
may be configure a very simple cron job like "echo 0 > /lalala" just to make sure it's executed at all
(may be you run a, say, backup python script which requires new python, but correct PATH is not set).

https://stackoverflow.com/questions/4984725/how-to-test-a-weekly-cron-job
May be useful if you want to test daily jobs.

Logs: most probably logging is just disabled by default,
check /etc/rsyslog.conf for "cron.none".

Hope that helps.

--
Best regards,

Konstantin Khorenko,
Virtuozzo Linux Kernel Team



More information about the Users mailing list