RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1726671 - timedatectl shows NTP synchronized: no, while with ntpstat the server is synchronized
Summary: timedatectl shows NTP synchronized: no, while with ntpstat the server is sync...
Keywords:
Status: CLOSED DUPLICATE of bug 1660846
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd
Version: 7.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: David Tardon
QA Contact: Frantisek Sumsal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-03 11:42 UTC by Yogita
Modified: 2020-04-24 14:26 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-10 19:12:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Yogita 2019-07-03 11:42:38 UTC
Description of problem:
Customer is running their environment the ntpd in "slew" mode (ntpd -x). With running ntpd in "slew" mode, timedatectl does always show "NTP synchronized: no" while ntpstat correctly show "synchronised to NTP server (10.11.160.238) at stratum 2 "

Version-Release number of selected component (if applicable):
RHEL7.6 
systemd-219-62.el7.x86_64

How reproducible:
remove chrony package, install ntp package, configure ntpd to run in "slew" mode, wait some time to be synchronized, test timedatectl vs. ntpstat


Steps to Reproduce:
1. yum remove chrony
2. yum install ntp
3. vi /etc/sysconfig/ntpd and add -x at the end of the OPTIONS line -> OPTIONS="-g -x" 
4. systemctl enable ntpd.service
5. systemctl start ntpd.service / or / timedatectl set-ntp 1
6. *wait some time to be synchronized*
7. ntpstat
8. timedatectl | grep NTP

Actual results:
# timedatectl | grep NTP
     NTP enabled: yes
NTP synchronized: no

# ntpstat
synchronised to NTP server (10.11.160.238) at stratum 2 
   time correct to within 10 ms
   polling server every 64 s

# ps -wauxxx | grep ntp
ntp       4343  0.0  0.0  29944  2140 ?        Ss   11:33   0:00 /usr/sbin/ntpd -u ntp:ntp -g -x

Expected results:

# timedatectl | grep NTP
     NTP enabled: yes
NTP synchronized: yes

Additional info:
I reproduced the problem on RHEL7.6/7.5/7.3
Customer won't use chrony in the near future.
additional side note, there is another issue with ntpd running in "slew" mode, ntptime returns code 5 (ERROR) which is described in https://access.redhat.com/solutions/38542, which was leading me to the source of this timedatectl issue.

Note - This bugzilla case is re-opened with systemd component due to reason mentioned in Bug 1660846's comment #6

Comment 3 David Tardon 2019-07-03 14:12:34 UTC

*** This bug has been marked as a duplicate of bug 1660846 ***


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