Red Hat Bugzilla – Bug 1455771
[downstream clone - 4.1.3] [RFE] Log collector should collect time diff for all hosts
Last modified: 2017-08-31 02:18:14 EDT
+++ This bug is a downstream clone. The original bug is: +++ +++ bug 1404509 +++ ====================================================================== ## Description of problem: It would be great if Log Collector checked the time diff for all hosts, regardless of how many hosts (sosreport) are selected. ## Version-Release number of selected component (if applicable): ovirt-log-collector-4.0.1-1.el7ev.noarch ## How reproducible: always ## Steps to Reproduce: 1. generate Log Collector 2. don't specify any hosts (or only specify one, etc) ## Actual results: time_diff.txt only collects info for hosts that are specified ## Expected results: collect time diff info for all hosts ## Additional info: Sometimes when troubleshooting issues, we get LC ouput without any host info, then get sosreports separately. More commmon, if we are troublehsooting a migration issue, we only get the destination host but not the source (so we can't check that both are in sync) It would be very useful if we could include this info (time diff for all hosts) so that we can easily 'tick off' out-of-sync hosts as a cause for various problems. Alternative - provide some easy way for the customer (or Support) to verify all hosts are in sync. I've been getting customers to run: (one line) for i in `cat hosts.txt`; do echo $i; ssh -i /etc/pki/ovirt-engine/keys/engine_id_rsa root@${i} 'date --iso-8601=seconds'; date --iso-8601=seconds; done Where 'hosts.txt' is a list of hosts (from 'ovirt-log-collector list') Is there a better way to see at a glance if all hosts are in sync? (Originally by Marcus West)
A possible way to do (Originally by Sandro Bonazzola)
A possible way to do a check against time drift is to leverage ntpq or chronyc commands. Need to check if sos already collect this kind of data. (Originally by Sandro Bonazzola)
The systemd sos plugin provides the output from timedatectl: $ timedatectl Local time: mer 2017-05-24 13:35:46 CEST Universal time: mer 2017-05-24 11:35:46 UTC RTC time: mer 2017-05-24 11:35:46 Time zone: Europe/Rome (CEST, +0200) Network time on: yes NTP synchronized: yes RTC in local TZ: no and the chrony plugin provides time drift: # cat chronyc_sources 210 Number of sources = 4 MS Name/IP address Stratum Poll Reach LastRx Last sample =============================================================================== ^? blue.1e400.net 0 9 0 - +0ns[ +0ns] +/- 0ns ^* ntp-2.arkena.net 2 7 355 813 -2808us[-4156us] +/- 41ms ^? server1.websters-compute> 2 9 4 21m +13ms[ +12ms] +/- 50ms ^+ iris.linocomm.net 2 7 377 39 -9300us[-9300us] +/- 78ms # cat chronyc_tracking Reference ID : 5F51AD4A (ntp-2.arkena.net) Stratum : 3 Ref time (UTC) : Wed May 24 11:18:51 2017 System time : 0.000000059 seconds fast of NTP time Last offset : -0.001348147 seconds RMS offset : 0.000891597 seconds Frequency : 9.894 ppm fast Residual freq : -0.298 ppm Skew : 2.514 ppm Root delay : 0.050097819 seconds Root dispersion : 0.018574700 seconds Update interval : 518.1 seconds Leap status : Normal (Originally by Sandro Bonazzola)
Also added --time-only option to skip sos collection from specified hosts, in particular, from all known hosts (Originally by Sandro Bonazzola)
Verified on ovirt-log-collector-4.1.3-1.el7ev.noarch
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2017:1695