Re: [Vserver] How can i run ntp server inside VSERVER ? Do anyone have got experience with OPENNTPD

From: Tony Lewis <gnutered_at_yahoo.com.au>
Date: Fri 21 Apr 2006 - 01:39:30 BST
Message-ID: <444829C2.1060300@yahoo.com.au>

Sébastien CRAMATTE wrote:
> Hello
>
> I need to run ntp server inside VSERVER
...

I've got NTP working in a guest. I'm using just the ntp-server package
that comes with Ubuntu - no idea if this is OPENNTPD.

Have you seen this? It was helpful to me:
http://linux-vserver.org/VirtualiseNTP

> The service seems to be up in the VSERVER
>
> Jun 19 21:05:22 dhcp1 ntpd[15374]: peer 80.33.117.152 now invalid
> Jun 19 21:05:37 dhcp1 ntpd[15374]: peer 194.143.194.244 now valid
> Jun 19 21:05:38 dhcp1 ntpd[15374]: peer 80.33.117.152 now valid
> Jun 19 21:05:58 dhcp1 ntpd[15374]: peer 80.33.117.152 now invalid
> Jun 19 21:06:15 dhcp1 ntpd[15374]: peer 80.33.117.152 now valid
> Jun 19 21:06:45 dhcp1 ntpd[15374]: peer 80.33.117.152 now invalid
> Jun 19 21:06:52 dhcp1 ntpd[15374]: peer 213.96.197.96 now invalid
> Jun 19 21:07:22 dhcp1 ntpd[15374]: peer 213.96.197.96 now valid
> Jun 19 21:07:42 dhcp1 ntpd[15374]: peer 213.96.197.96 now invalid

I've not seen these messages before. Does that mean it can contact the
peer, or that it's synchronised with peer(s)> Can you run "ntpq" and
use the "peers" command to see if the offset is low (i.e. it has
selected and synchronised to a peer)?

>
> but when I try ntpdate 192.168.1.9 on the host machine server or
> on any other server in the main context
> i obtain this error
>
> ntpdate -q 192.168.1.9
> server 192.168.1.9, stratum 3, offset 0.000041, delay 0.02580
> 19 Apr 23:09:54 ntpdate[15563]: no server suitable for synchronization
> found

Two things I can think of:
1. if .1.9 has not successfully synchronised to a peer itself, it might
(should?) refuse to allow other servers to sync to it - see "peers" above.
2. if you're trying to sync from another vserver, or even the host, you
don't need to - all your vservers, plus host, use the one clock.

Don't forget that if the time difference is too large, ntpd will not
skew synchronise - you may have to run ntpdate and do a big time step,
and then start ntpd

And, don't forget to give your vserver guest the right capabilities:
    CAP_SYS_TIME

And, don't forget to restart the vserver with those new capabilities (I
forgot this, to my frustration)

HTH

Tony Lewis

_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Fri Apr 21 01:40:24 2006

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Fri 21 Apr 2006 - 01:40:25 BST by hypermail 2.1.8