Re: [chrony-users] Modifying system date and syncing back

[ Thread Index | Date Index | More Archives ]

On 28/04/2014 13:06, Miroslav Lichvar wrote:
On Sat, Apr 26, 2014 at 10:53:17PM +0530, mallapadi niranjan wrote:
we have certain automation testing where we expire certs by moving
date,     We currently do move the date back  by date command ,


chronyc -a offline
date -s '1 month'
<perform certain actions>
date -s '1 month ago'
chronyc - a online
chronyc -a makestep

what i would like to  know is   can we modify the date after making the
time source offline  ?
I wouldn't recommend doing that. Even if you set the time back to
where it would be it wasn't stepped, and no measurements were made in
that period, it could still trigger some code in chronyd which tries
to detect backward clock jumps and invalidate old samples, or upset
it enough that it would take longer time to recover.

A better approach would be to make chronyd step the clock via the
manual feature. For example:

chronyc -a 'manual on' (or enable it in chrony.conf)

chronyc -a -m 'offline' 'settime 1 month' 'makestep' 'manual reset'

chronyc -a -m 'settime 1 month ago' 'makestep' 'manual reset' 'online'

What about simply killing Chrony, allowing it to write its various dump files to disk

Then mess with the clock as you see fit

Then restart chrony using the option to reload time from the RTC - this should be identical to the situation when booting so everything should just come up normally?

Ed W

To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject. For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.

Mail converted by MHonArc 2.6.19+