RE: SL7 - crond starting before chronyd causing problem with mrtg {solved - I think}

2015-02-06 Thread Bill Maidment
Hmm

It seems that I forgot that kvm by default only suspends the guests when you 
reboot the host. This explains the delay in resyncronising the clock, etc.

I've now fixed up the /etc/sysconfig/libvirt-guests on the host to ensure a 
reboot of guests.

I'm now awaiting the next reboot (a scheduled power outage on Tuesday) to prove 
the point.

Sorry all for the noise; at age 68 the little grey cells aren't what they used 
to be.

Cheers

Bill





-Original message-
From: Bill Maidment b...@maidment.me
Sent: Thursday 22nd January 2015 18:26
To: scientific-linux-users@fnal.gov
Subject: RE: SL7 - crond starting before chronyd causing problem with mrtg


Thanks David.
However, even using After= chronyd.service the chronyd still takes too long to 
correct the time for the time-zone.

After some investigation, it seems that the KVM system is at fault when the 
host is rebooted, but not when the guest is rebooted.
On reboot of the host KVM adds the timezone shift to the hardware clock for the 
guests and then the guest adds the timezone shift again.
This extra addition of the timzone shift did not happen on SL6.

After running hwclock --systohc on the guest, I get the following setup.

[root@giggs2 ˜]# timedatectl 
  Local time: Thu 2015-01-22 17:55:26 AEDT
  Universal time: Thu 2015-01-22 06:55:26 UTC
    RTC time: Thu 2015-01-22 06:55:26
    Timezone: Australia/Sydney (AEDT, +1100)
 NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
  DST active: yes
 Last DST change: DST began at
  Sun 2014-10-05 01:59:59 AEST
  Sun 2014-10-05 03:00:00 AEDT
 Next DST change: DST ends (the clock jumps one hour backwards) at
  Sun 2015-04-05 02:59:59 AEDT
  Sun 2015-04-05 02:00:00 AEST
[root@giggs2 ˜]# 

On reboot of just the guest, I get the following, the RTC looks OK:

[root@giggs2 ˜]# timedatectl 
  Local time: Thu 2015-01-22 18:05:09 AEDT
  Universal time: Thu 2015-01-22 07:05:09 UTC
    RTC time: Thu 2015-01-22 07:05:09
    Timezone: Australia/Sydney (AEDT, +1100)
 NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
  DST active: yes
 Last DST change: DST began at
  Sun 2014-10-05 01:59:59 AEST
  Sun 2014-10-05 03:00:00 AEDT
 Next DST change: DST ends (the clock jumps one hour backwards) at
  Sun 2015-04-05 02:59:59 AEDT
  Sun 2015-04-05 02:00:00 AEST
[root@giggs2 ˜]#

On reboot of the host, I get the following on the guest, the RTC looks wrong:

[root@giggs2 ˜]# timedatectl 
  Local time: Fri 2015-01-23 05:15:41 AEDT
  Universal time: Thu 2015-01-22 18:15:41 UTC
    RTC time: Thu 2015-01-22 18:15:42
    Timezone: Australia/Sydney (AEDT, +1100)
 NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
  DST active: yes
 Last DST change: DST began at
  Sun 2014-10-05 01:59:59 AEST
  Sun 2014-10-05 03:00:00 AEDT
 Next DST change: DST ends (the clock jumps one hour backwards) at
  Sun 2015-04-05 02:59:59 AEDT
  Sun 2015-04-05 02:00:00 AEST
[root@giggs2 ˜]#

Regards
Bill Maidment 
 
-Original message-
 From:David Sommerseth sl+us...@lists.topphemmelig.net
 Sent: Wednesday 21st January 2015 23:33
 To: Bill Maidment b...@maidment.me; SCIENTIFIC-LINUX-USERS@FNAL.GOV 
 SCIENTIFIC-LINUX-USERS@fnal.gov
 Subject: Re: SL7 - crond starting before chronyd causing problem with mrtg
 
 On 21/01/15 12:18, Bill Maidment wrote:
  Hi guys
  MRTG is having problems with timeshift because crond starts before chronyd 
  on SL7.
  I have added chrond.service as a dependancy to the crond.service. Is that 
  the right approach to solving the problem?
 
 This sounds like the right approach.  But systemd have different levels of
 dependencies.  I recommend you to check the dependency you used against man
 systemd.unit.  Check out After=, Requires= and Requisite=.
 
 --
 kind regards,
 
 David Sommerseth
 
 




RE: SL7 - crond starting before chronyd causing problem with mrtg

2015-01-21 Thread Bill Maidment
Thanks David.
However, even using After= chronyd.service the chronyd still takes too long to 
correct the time for the time-zone.

After some investigation, it seems that the KVM system is at fault when the 
host is rebooted, but not when the guest is rebooted.
On reboot of the host KVM adds the timezone shift to the hardware clock for the 
guests and then the guest adds the timezone shift again.
This extra addition of the timzone shift did not happen on SL6.

After running hwclock --systohc on the guest, I get the following setup.

[root@giggs2 ~]# timedatectl 
  Local time: Thu 2015-01-22 17:55:26 AEDT
  Universal time: Thu 2015-01-22 06:55:26 UTC
RTC time: Thu 2015-01-22 06:55:26
Timezone: Australia/Sydney (AEDT, +1100)
 NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
  DST active: yes
 Last DST change: DST began at
  Sun 2014-10-05 01:59:59 AEST
  Sun 2014-10-05 03:00:00 AEDT
 Next DST change: DST ends (the clock jumps one hour backwards) at
  Sun 2015-04-05 02:59:59 AEDT
  Sun 2015-04-05 02:00:00 AEST
[root@giggs2 ~]# 

On reboot of just the guest, I get the following, the RTC looks OK:

[root@giggs2 ~]# timedatectl 
  Local time: Thu 2015-01-22 18:05:09 AEDT
  Universal time: Thu 2015-01-22 07:05:09 UTC
RTC time: Thu 2015-01-22 07:05:09
Timezone: Australia/Sydney (AEDT, +1100)
 NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
  DST active: yes
 Last DST change: DST began at
  Sun 2014-10-05 01:59:59 AEST
  Sun 2014-10-05 03:00:00 AEDT
 Next DST change: DST ends (the clock jumps one hour backwards) at
  Sun 2015-04-05 02:59:59 AEDT
  Sun 2015-04-05 02:00:00 AEST
[root@giggs2 ~]#

On reboot of the host, I get the following on the guest, the RTC looks wrong:

[root@giggs2 ~]# timedatectl 
  Local time: Fri 2015-01-23 05:15:41 AEDT
  Universal time: Thu 2015-01-22 18:15:41 UTC
RTC time: Thu 2015-01-22 18:15:42
Timezone: Australia/Sydney (AEDT, +1100)
 NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
  DST active: yes
 Last DST change: DST began at
  Sun 2014-10-05 01:59:59 AEST
  Sun 2014-10-05 03:00:00 AEDT
 Next DST change: DST ends (the clock jumps one hour backwards) at
  Sun 2015-04-05 02:59:59 AEDT
  Sun 2015-04-05 02:00:00 AEST
[root@giggs2 ~]#

Regards
Bill Maidment 
 
-Original message-
 From:David Sommerseth sl+us...@lists.topphemmelig.net
 Sent: Wednesday 21st January 2015 23:33
 To: Bill Maidment b...@maidment.me; SCIENTIFIC-LINUX-USERS@FNAL.GOV 
 SCIENTIFIC-LINUX-USERS@fnal.gov
 Subject: Re: SL7 - crond starting before chronyd causing problem with mrtg
 
 On 21/01/15 12:18, Bill Maidment wrote:
  Hi guys
  MRTG is having problems with timeshift because crond starts before chronyd 
  on SL7.
  I have added chrond.service as a dependancy to the crond.service. Is that 
  the right approach to solving the problem?
 
 This sounds like the right approach.  But systemd have different levels of
 dependencies.  I recommend you to check the dependency you used against man
 systemd.unit.  Check out After=, Requires= and Requisite=.
 
 --
 kind regards,
 
 David Sommerseth
 
 


Re: SL7 - crond starting before chronyd causing problem with mrtg

2015-01-21 Thread David Sommerseth
On 21/01/15 12:18, Bill Maidment wrote:
 Hi guys
 MRTG is having problems with timeshift because crond starts before chronyd on 
 SL7.
 I have added chrond.service as a dependancy to the crond.service. Is that the 
 right approach to solving the problem?

This sounds like the right approach.  But systemd have different levels of
dependencies.  I recommend you to check the dependency you used against man
systemd.unit.  Check out After=, Requires= and Requisite=.


--
kind regards,

David Sommerseth