We encountered a problem with respect to KVM virtual host restore and NTP. Specifically, our VM test host was shutdown by an extended power outage and when power returned all of the restored guests were immediately shutdown by ntp because the time differential between the restored systems and that of the ntpd sync servers exceeded the panic threshold.
This is not an acceptable situation so in the absence of something more elegant we are contemplating shutting down ntpd on virtual hosts and scheduling regular ntpd -q from cron instead.
Is there an alternative to this? If not then what would be a recommended scheduling interval?
On Mon, May 28, 2012 at 08:41:30AM -0400, James B. Byrne wrote:
We encountered a problem with respect to KVM virtual host restore and NTP. Specifically, our VM test host was shutdown by an extended power outage and when power returned all of the restored guests were immediately shutdown by ntp because the time differential between the restored systems and that of the ntpd sync servers exceeded the panic threshold.
Umm, ntp won't shut down your guests unless you've done something non-standard. NTP inside the guest will abort because of the time difference but the guest will keep running... just with the wrong time.
See the "-g" option:
-g Normally, ntpd exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. This option allows the time to be set to any value without restriction; however, this can happen only once. If the thresh- old is exceeded after that, ntpd will exit with a message to the system log. This option can be used with the -q and -x options. See the tinker command for other options.
On Mon, May 28, 2012 at 5:41 AM, James B. Byrne byrnejb@harte-lyne.ca wrote:
We encountered a problem with respect to KVM virtual host restore and NTP. Specifically, our VM test host was shutdown by an extended power outage and when power returned all of the restored guests were immediately shutdown by ntp because the time differential between the restored systems and that of the ntpd sync servers exceeded the panic threshold.
This is not an acceptable situation so in the absence of something more elegant we are contemplating shutting down ntpd on virtual hosts and scheduling regular ntpd -q from cron instead.
Is there an alternative to this? If not then what would be a recommended scheduling interval?
The issue has been reported here:
http://bugs.centos.org/view.php?id=5726
You might want to try the workaround in note 15092, that is, to add 'tinker panic 0' to the *top* of the /etc/ntp.conf file.
Akemi