Tuesday 18 January 2011

vzctl 3.0.25 - удалены cron задачи для перезагрузки VPS, теперь это выполняет демон vzeventd

В changelog сообщается следующее:
Removed cron scripts to handle cleanup and reboot

Так и есть:
chkconfig --list | grep vzeve
vzeventd 0:off 1:off 2:on 3:on 4:on 5:on 6:off

При этом, OpenVZ почему-то забывает про свой cron (вот поэтому "All the cron trickery (used for CT reboot and network cleanup) is removed from this release. If you have something non-standard in /etc/vz/cron/ directory, this is no longer managed by the vz initscript."):
cat /etc/cron.d/vz
# Cron jobs needed for OpenVZ

# ------------------ EDIT THE CORRECT FILE -------------------------
# This file is copied to /etc/cron.d/vz from
# /etc/vz/cron/vz when the vz service is started
# via its init.d script and the file
# /etc/cron.d/vz is cleared when the
# service is stopped. Therefore any edits made directly to
# /etc/cron.d/vz will be lost anytime the vz service
# restarts.
# To make changes, edit the master copy /etc/vz/cron/vz
# (or add your own /etc/vz/cron/vz* files)
# and run /etc/init.d/vz update-cron.
# The reason this is done this way is because the OpenVZ cron job
# should only be invoked if the vz service is enabled and not
# just as a consequence of installing the vzctl as it was the case
# previously. The file /etc/cron.d/vz
# cannot simply be linked to the master copy in
# /etc/vz/cron/ because for security reasons cron
# will not process crontab files that are links or writeable by
# anybody else but root, thus the file must be copied
# into /etc/cron.d/ with the right ownership and permissions.

# Clean containers' network rules (arp,route,iptables)
*/5 * * * * root /usr/share/vzctl/scripts/vpsnetclean

# Start containers marked as rebooted.
*/2 * * * * root /usr/share/vzctl/scripts/vpsreboot

И как результат, cron заспамливает нас ошибками, что файлов /usr/share/vzctl/scripts/vpsnetclean и /usr/share/vzctl/scripts/vpsreboot больше не существует, так что, нужно закончить задачу OpenVZ и удалить этот файл:
rm /etc/cron.d/vz


No comments :

Post a Comment

Note: only a member of this blog may post a comment.