Bug 445042 - ntpd init scripts do not honour sysconfig/ntpd -x option
ntpd init scripts do not honour sysconfig/ntpd -x option
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: ntp (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Miroslav Lichvar
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-02 17:41 EDT by Simo Sorce
Modified: 2008-05-05 09:40 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-05 09:40:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Simo Sorce 2008-05-02 17:41:49 EDT
In rawhide it seem the init scripts has been wiped out and they do not respect
the -x option which previously meant: synchronize with ntpdate before starting ntpd

Ntpd will just not work if the clock is not in sync, previously a simple
"service ntpd restart" would assure (provided the -x otpion was set) that the
machine time would be synchronized.

Now to put a machine back in sync (think suspended laptop, suspended vm) one
need to:
service ntpd stop
service ntpdate restart
service ntpd start

What is the reason we stopped supporting the *very* useful -x flag in
/etc/sysconfig/ntpd config file (and from what I can see just *any* of the
previously available options) ?

This seem a substantial regression, please advice.
Comment 1 Miroslav Lichvar 2008-05-05 08:17:40 EDT
The problem was that it wasn't possible to restart ntpd -x without running
ntpdate. If -x is used, there should be a good reason behind it and any stepping
caused by ntpdate will probably just make things worse.

Although it was possible to introduce yet another setting in sysconfig/ntpd,
I've decided to make it more transparent and split the script. Now the scripts
always use options specified in sysconfig/ntpd{,ate} as they are, no more
surprises when -g was added by the script.

ntpdate can be used when ntpd is running, just add -u to the options.

As for ntpd not working if the clock is not in sync, that would be a bug, please
file a new bug report.
Comment 2 Simo Sorce 2008-05-05 08:55:16 EDT
(In reply to comment #1)
> The problem was that it wasn't possible to restart ntpd -x without running
> ntpdate. If -x is used, there should be a good reason behind it and any stepping
> caused by ntpdate will probably just make things worse.

If you set the -x that's the intended behavior, you want to make a sync up
before starting ntpd, can you explain what it means "make things worse" ?

> Although it was possible to introduce yet another setting in sysconfig/ntpd,
> I've decided to make it more transparent and split the script. Now the scripts
> always use options specified in sysconfig/ntpd{,ate} as they are, no more
> surprises when -g was added by the script.

Not sure what you mean here, I found it surprising that upon update what I set
up didn't work anymore. I don't find surprising to have the ntpd script run
ntpdate if I tell it to do so by explicitly set -x

> ntpdate can be used when ntpd is running, just add -u to the options.

Should I open a bug against ntpdate to make this the default option then ?
As it is when ntpd runs and you run service ntpdate restart all you get is an error.
 
> As for ntpd not working if the clock is not in sync, that would be a bug, please
> file a new bug report.

This is ntpd normal behavior since ever, ntpd is not able to sync the clock if
the drift is bigger than a certain amount, or the clock is way off when it
starts, why should I open a bug, the -x option was meant exactly to solve this
well known limitation.

Please clarify.

Comment 3 Miroslav Lichvar 2008-05-05 09:40:16 EDT
The -x option isn't intended to be an init script option, it's an ntpd option to
never step the clock, please see ntpd(8). In most cases it shouldn't be used.

The init script used to run ntpdate before starting ntpd -x to have the clock in
sync as it takes about 2000 secs to adjust 1sec offset. But this should be done
only on boot and splitting the service has fixed it.

Just remove -x from the options and everything should be fine.

Note You need to log in before you can comment on or make changes to this bug.