[CentOS-virt] Xen and timekeeping

Mon Jul 11 18:16:51 UTC 2011
Dmitry E. Mikhailov <d.mikhailov at infocommunications.ru>

Hi everyone,

I have the problem with Xen domU's and timekeeping in dom0.

Time in dom0 was incorrect by 5 hours due to wrong timezone assumed. Fixed it 
by ntpdate ntp.nist.gov. The time on a dom0 was changed. I didn't append 
xen.independent_wallclock=1 to sysctl.conf thus the time in all domU's was 
also changed. But THEY DIDN'T "KNOW" THAT!

The 'date' output in domU shows time unchanged, as before, incorrect by 5 
hours. But any current_time-dependent operations don't behave correctly. 
Quagga's OSPFd daemon doesn't add routes. 'service dhcpd stop' hangs forever 
while correctly stopping the daemon.

AFAIK, it hangs on 'killproc'

[root at gbuh-ufa init.d]# grep killproc dhcpd -A 2 -B 2

    echo -n $"Shutting down $prog: "
    killproc $prog
    [ $RETVAL = 0 ] && rm -f $lockfile

From http://www.novell.com/coolsolutions/feature/15380.html

killproc: killproc kills a process which is given by a full path to the 
executable. ...cut... (by default a SIGTERM is sent, then a SIGKILL if the 
process does not die within 5 seconds). 

So a 5 seconds interval becomes 5 hours and 5 seconds - something I'm not 
willing to wait for.

The problem was worked around when I did a 'date 07111158' on a dom0 and all 
domU's semi-simultaneously.

Is this behaviour normal or should I file a bug?

Best regards,
	Dmitry Mikhailov

Hardware: Intel 5000P chipset, 2 CPUs, total 8 cores
[root at xensrv ~]# cat /etc/redhat-release
CentOS release 5.6 (Final)
[root at xensrv ~]# uname -a
Linux xensrv 2.6.18-238.el5xen #1 SMP Thu Jan 13 16:41:45 EST 2011 x86_64 
x86_64 x86_64 GNU/Linux
[root at xensrv ~]# rpm -q ntp
[root at xensrv ~]# cat /proc/cpuinfo - 8 times the following
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Xeon(R) CPU           E5420  @ 2.50GHz
stepping        : 6
cpu MHz         : 1998.000
cache size      : 6144 KB
physical id     : 0
siblings        : 1
core id         : 0
cpu cores       : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu tsc msr pae cx8 apic mtrr cmov pat clflush acpi mmx fxsr 
sse sse2 ss ht syscall nx lm constant_tsc pni vmx est ssse3 cx16 sse4_1 
bogomips        : 6237.52
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:

[root at gbuh-ufa init.d]# cat /etc/redhat-release
CentOS release 5.5 (Final)
[root at gbuh-ufa init.d]# uname -a
Linux gbuh-ufa 2.6.18-238.el5xen #1 SMP Thu Jan 13 17:49:40 EST 2011 i686 i686 
i386 GNU/Linux

[root at buhserv ~]# cat /etc/redhat-release
CentOS release 5.6 (Final)
[root at buhserv ~]# uname -a
Linux buhserv 2.6.18-238.el5xen #1 SMP Thu Jan 13 16:41:45 EST 2011 x86_64 
x86_64 x86_64 GNU/Linux