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 1785488 - Consider ntpd when showing time synchronization status
Summary: Consider ntpd when showing time synchronization status
Keywords:
Status: CLOSED DUPLICATE of bug 1660846
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: cockpit
Version: 7.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Martin Pitt
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-20 02:28 UTC by John
Modified: 2020-03-24 16:52 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-24 16:52:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Cockpit web UI showing exclamation mark to (incorrectly) indicate time is not synchronised. (70.66 KB, image/jpeg)
2019-12-20 02:28 UTC, John
no flags Details

Description John 2019-12-20 02:28:23 UTC
Created attachment 1646726 [details]
Cockpit web UI showing exclamation mark to (incorrectly) indicate time is not synchronised.

Description of problem:
Cockpit says time is not synchronised, when in fact, it is

Version-Release number of selected component (if applicable):

# rpm -qa | grep cockpit | sort
cockpit-195.1-1.el7.x86_64
cockpit-bridge-195.1-1.el7.x86_64
cockpit-system-195.1-1.el7.noarch
cockpit-ws-195.1-1.el7.x86_64

# rpm -qa | grep ntp | sort
fontpackages-filesystem-1.44-8.el7.noarch
ntp-4.2.6p5-29.el7.x86_64
ntpdate-4.2.6p5-29.el7.x86_64


How reproducible:
Don't know.

Steps to Reproduce:
1. Install cockpit, ntpd, synchronise time
2. Watch cockpit fail.
3.

Actual results:
Cockpit shows red exclamation mark next to system time, mouseover says "Not Synchronised"

Expected results:
Time IS synchronised, so there should be no false warning in Cockpit.

Actually, to be honest, I do not EVER expect ANYTHING to work in RHEL anymore.


Additional info:

Please see attached screenshot. I pressed reload just before taking the shot, so it was a freshly loaded page. 

I also ran the following command, before and after screenshot, confirming that time IS in fact, syncrhonised:

# ntpstat
synchronised to NTP server (10.255.0.11) at stratum 3
   time correct to within 63 ms
   polling server every 1024 s

Comment 2 Miroslav Lichvar 2020-03-24 11:16:46 UTC
How exactly is ntpd configured? Is the -x option specified in /etc/sysconfig/ntpd?

Comment 3 John 2020-03-24 13:42:40 UTC
Why does it matter whether -x is enabled or not?

The Cockpit Web UI has an indicator to indicate if the time is synchronised.
It is not an indicator to indicate if slew mode is enabled or disabled.
So, -x for slew mode is irrelevant.

This is all that is needed to see that there is a problem:

# ntpstat
synchronised to NTP server (10.255.0.11) at stratum 3
   time correct to within 63 ms
   polling server every 1024 s


ntpstat says "synchronised", Cockpit says the opposite.

Cockpit is wrong, and needs to be fixed.

Comment 4 Martin Pitt 2020-03-24 14:07:43 UTC
Sure, I'm just currently trying to evaluate where exactly the bug is, as I'm not famililar with chrony or ntpd, and how they are supposed to be integrated into systemd. cockpit currently gets this information from the "System clock synchronized" flag from `timedatectl` (not literally, it usees D-Bus, but timedatectl shows the same flag). At least chrony does not have an useful API (see bug 1330465), but ntpd at least has a command line API, so we could at least do a read-only check (and not change the setting).

Comment 5 Miroslav Lichvar 2020-03-24 14:46:06 UTC
(In reply to John from comment #3)
> Why does it matter whether -x is enabled or not?

ntpd running with the -x option doesn't tell the kernel that the clock is synchronized and timedated only uses the information returned by the kernel. It doesn't talk to ntpd or chronyd. This would be a duplicate of bug #1660846.

Comment 6 Martin Pitt 2020-03-24 16:52:48 UTC
Thanks Miroslav for the detailed explanation (especially in bug 1660846)! I learned something new today.

*** 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.