[Arm-dev] Old ver of Chrony - Re: Chronyd alternative - Re: So is this a bug to report - Re:  Re:  Re: System time

Johnny Hughes johnny at centos.org
Thu Sep 3 11:37:34 UTC 2015


On 09/02/2015 10:49 AM, Robert Moskowitz wrote:
> Problem is an 'old' ver of chrony:
> 
> On 09/02/2015 11:01 AM, Robert Moskowitz wrote:
>> This is not working on a new mSD with only chrony installed and the
>> changes listed below.
>>
>> It works on F22 'out of the box' with these changes.
> 
> From the Fedora-arm list:
> 
> =======
> 
> On 09/02/2015 11:41 AM, Miroslav Lichvar wrote:
>> In RHEL7 is currently chrony-1.29 which doesn't have the no RTC
>> fallback with the -s option. You might want to wait for 7.2, which
>> likely will have chrony-2.1.1. 
> =======
> 
>> Got to get this working...
> 
> So can we have chrony-2.1.1 ???  Please  :)
> 

I am not inclined to build new versions of things.  We don't want to
reproduce F22 and call it CentOS-7 .. we want to produce CentOS-7 for arm32.

Why can one not use ntpdate to set the initial date and then ntpd
thereafter?

>>
>> On 09/02/2015 08:56 AM, Robert Moskowitz wrote:
>>> On the Fedora-arm list I learned that chronyd and systemd-timesyncd
>>> conflict.  F22 is using chronyd with systemd-timesyncd not enabled. 
>>> To get chronyd to set the system time based on the last boot you need:
>>>
>>> In /etc/sysconfig/chronyd
>>> OPTIONS="-s"
>>>
>>> and /etc/chrony.conf
>>> #rtcsync
>>> rtcdevice /dev/nonexist
>>>
>>> shortly after boot if no network connection, your system time is set
>>> to the last content in /var/lib/chrony/drift
>>>
>>> So please add chronyd to the minimal install and set it with these
>>> 'defaults', or provide an easy way to configure for 'no rtc'.
>>>
>>> On 09/01/2015 11:29 PM, Robert Moskowitz wrote:
>>>> The archlinux wiki says this should work at boot even without a
>>>> network connection but it is not.  Perhaps there is some extra steps
>>>> to set this up right?
>>>>
>>>> If not, is this a bug?  Not supprising that the Intel based testing
>>>> did not see this, as how many Intel boxes do not have an rtc?  Only
>>>> those with dead batteries...
>>>>
>>>> On 09/01/2015 01:46 PM, Robert Moskowitz wrote:
>>>>> I just did a test, as timedatectl indicates that ntp is on.  It did
>>>>> not set the time on reboot.  It is not doing that auto stuff
>>>>> mentioned in the description.  :(
>>>>>
>>>>> On 09/01/2015 01:39 PM, Robert Moskowitz wrote:
>>>>>> Oh, I should have read further down the page of:
>>>>>> https://wiki.archlinux.org/index.php/Systemd-timesyncd
>>>>>>
>>>>>> ....
>>>>>>
>>>>>> On 09/01/2015 01:38 PM, Robert Moskowitz wrote:
>>>>>>> Again, this requires the network to be up?
>>>>>>>
>>>>>>> I use timedatectl to set my timezone, will look more into it. 
>>>>>>> Could be all is rolled together...
>>>>>>>
>>>>>>> On 09/01/2015 01:35 PM, Nicolas Repentin wrote:
>>>>>>>>
>>>>>>>> Don't know.. I saw this on the web
>>>>>>>>
>>>>>>>>
>>>>>>>> Centos 7 use systemd. I suggest you use it.
>>>>>>>>
>>>>>>>> Use the command timedatectl
>>>>>>>> <http://www.freedesktop.org/software/systemd/man/timedatectl.html>
>>>>>>>>
>>>>>>>> Enable network time synchronization:
>>>>>>>>
>>>>>>>> timedatectl set-ntp True
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Create a conf file:
>>>>>>>>
>>>>>>>> vi /etc/systemd/timesyncd.conf
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> with content like this:
>>>>>>>>
>>>>>>>> [Time]
>>>>>>>>
>>>>>>>> NTP= yourserver.org
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Start systemd-timedated service:
>>>>>>>>
>>>>>>>> systemctl start systemd-timedated
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Nicolas Repentin
>>>>>>>>
>>>>>>>> <nicolas at shivaserv.fr>
>>>>>>>>
>>>>>>>> --------- Original Message ---------
>>>>>>>> *From*: Robert Moskowitz
>>>>>>>> *To*: Conversations around CentOS on ARM hardware
>>>>>>>> *Date*: Tue Sep 01 19:26:49 GMT+02:00 2015
>>>>>>>> *Subject*: Re: [Arm-dev] Re: System time
>>>>>>>>
>>>>>>>>
>>>>>>>> On 09/01/2015 01:15 PM, Nicolas Repentin wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Oh, I did know about systemd-timesyncd, need to check about it :-)
>>>>>>>>>
>>>>>>>>
>>>>>>>> Can't find it in the repo, what provides it?
>>>>>>>>
>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Nicolas Repentin
>>>>>>>>>
>>>>>>>>> <nicolas at shivaserv.fr>
>>>>>>>>>
>>>>>>>>> --------- Original Message ---------
>>>>>>>>> *From*: Robert Moskowitz
>>>>>>>>> *To*: Conversations around CentOS on ARM hardware
>>>>>>>>> *Date*: Tue Sep 01 19:04:38 GMT+02:00 2015
>>>>>>>>> *Subject*: Re: [Arm-dev] System time
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 09/01/2015 12:16 PM, Nicolas wrote:
>>>>>>>>>> Hello
>>>>>>>>>>
>>>>>>>>>> I don't think any armv7 board like cubie has a battery to
>>>>>>>>>> backup clock
>>>>>>>>>> I think ntpd is the only way, and seems to work well on my bpi
>>>>>>>>>> with c7. I will check if dns resolution works when date is 1970.
>>>>>>>>>>
>>>>>>>>>> I think setting the currenttime can be a good idea on the rbf
>>>>>>>>>> tool :-)
>>>>>>>>>
>>>>>>>>> On the Fedora-arm list I was pointed to Systemd-timesyncd
>>>>>>>>>
>>>>>>>>> This does MOST of what I want.  All that I think needs to be
>>>>>>>>> added is for it to be enabled in the image and a initial
>>>>>>>>> date/time of the image built date be there so the firstboot has
>>>>>>>>> a decent time.
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Nicolas Repentin
>>>>>>>>>> <nicolas at shivaserv.fr>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Le 1 septembre 2015 18:12, Robert Moskowitz a écrit:
>>>>>>>>>>> How is system time set at boot?  Is ntpdate run after the
>>>>>>>>>>> network is
>>>>>>>>>>> ready?  How long does it retry waiting for the network to be
>>>>>>>>>>> available?
>>>>>>>>>>>
>>>>>>>>>>> I have seen a number of challenges becuase the system time is
>>>>>>>>>>> back at
>>>>>>>>>>> the epoch start as there is no battery rtc.  And  I wonder
>>>>>>>>>>> how many
>>>>>>>>>>> armv7 boards have a battery to maintain time across boots?
>>>>>>>>>>>
>>>>>>>>>>> Minimally, a process could right the time, in the proper
>>>>>>>>>>> format, to a
>>>>>>>>>>> file, say /etc/currenttime every 5 min and at shutdown.
>>>>>>>>>>>
>>>>>>>>>>> Then date can be run early in the boot process, piping this
>>>>>>>>>>> file in.  It
>>>>>>>>>>> would not be perfect and does not help, much for new
>>>>>>>>>>> installs, but
>>>>>>>>>>> better than epoch start.
>>>>>>>>>>>
>>>>>>>>>>> Plus /etc/currenttime can be at least set to the image build
>>>>>>>>>>> date/time
>>>>>>>>>>> so not even firstboot will be at epoch start.
>>>>>>>>>>>
>>>>>>>>>>> Opinions?
>>>>>>>>>>>
>>>>>>>>>>>



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.centos.org/pipermail/arm-dev/attachments/20150903/7fdb0d2c/attachment-0001.sig>


More information about the Arm-dev mailing list