[Bug 1145193] New: chrony prevents boot when without network by waiting for ntp server
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193 Bug ID: 1145193 Summary: chrony prevents boot when without network by waiting for ntp server Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: x86-64 OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: bnc-team-screening@forge.provo.novell.com Reporter: ginkobonsai@gmx.de QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Tried to boot my laptop with Tumbleweed yesterday with no network connection present. Boot reached chrony-wait and then stalled because (unsurprisingly) no ntp server could be reached. I booted into a rescue system from usb and dug around a little until I found this in /usr/lib/systemd/system/chrony-wait.service # Wait up to ~10 minutes for chronyd to synchronize and the remaining # clock correction to be less than 0.1 seconds ExecStart=/usr/bin/chronyc -h 127.0.0.1,::1 waitsync 600 0.1 0.0 1 Reducing 600 to 10 and rebooting fixed my issue. I don't quite know in which usecase an ntp server would be unavailable for 9 minutes but then start responding. My usecase is: either I've got a network connection and then a 10 second timeout is enough or I don't and then even waiting for 10 minutes won't change a thing. Also, I'd like to be able to use my laptop offline. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193#c2
--- Comment #2 from Ginko Bonsai
chrony-wait.service is disabled by default and should only be used on machines running services that strictly require synchronized time and have a permanent network connection. I wonder what caused it to be enabled on your laptop.
Me too. I changed the ntp server from the default to a pool for my country via YaST, iirc. Maybe that's when it happened?
For further analysis please post the output of "systemctl status chrony-wait.service".
Sure: ● chrony-wait.service - Wait for chrony to synchronize system clock Loaded: loaded (/usr/lib/systemd/system/chrony-wait.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Wed 2019-08-14 13:03:58 CEST; 6h ago Docs: man:chronyc(1) Main PID: 2691 (code=exited, status=1/FAILURE) Aug 14 13:03:49 suse-laptop systemd[1]: Starting Wait for chrony to synchronize system clock... Aug 14 13:03:58 suse-laptop systemd[1]: chrony-wait.service: Main process exited, code=exited, status=1/FAILURE Aug 14 13:03:58 suse-laptop systemd[1]: chrony-wait.service: Failed with result 'exit-code'. Aug 14 13:03:58 suse-laptop systemd[1]: Failed to start Wait for chrony to synchronize system clock. Since I'm currently using Wifi which only connects after I log in with my user, I'm not surprised by the failure.
BTW, the timeout you are criticising is not until the NTP server starts responding, but until chrony has synchronized the local clock to the server, which can take some time even if the server responds immediately, depending on how far off the local clock is.
Ah OK, that explains it, thanks :-) I guess the real issue is that it got activated for a laptop, then. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193 http://bugzilla.opensuse.org/show_bug.cgi?id=1145193#c3 Yunhe Guo changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |i@guoyunhe.me --- Comment #3 from Yunhe Guo --- I found something in KDE: 1. Right click the digital clock widget in panel. 2. Choose "Adjust date and time". 3. In the configuration dialog (I am sure it is from KDE), you can find a checkbox "Automatically set date and time" and it is checked (not sure if it is default or I did it). However, if I open YaST Date and Time, no matter how many times I tried to set this to "Manually", next time it still show "NTP". -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193#c4
--- Comment #4 from Ginko Bonsai
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193 http://bugzilla.opensuse.org/show_bug.cgi?id=1145193#c5 --- Comment #5 from Yunhe Guo --- Created attachment 814103 --> http://bugzilla.opensuse.org/attachment.cgi?id=814103&action=edit YaST Date and Time screen recording Weired behavior of YaST, when open the "other settings" dialog, it first shows "NTP" is selected. Then I close the dialog without saving. Then I open it again. Now it shows "Manually" is selected. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193#c6
Sam G
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193#c7
--- Comment #7 from Sam G
I have just installed Tumbleweed (with the 22nd of August snapshot) on a new laptop and found chrony-wait.service activated by default. It was activated from the first boot, nothing installed, nothing modified.
The only way to avoid waiting 10 minutes is to have it plugged to ethernet prior or during the wait time as otherwise it won't reach anything. I think this is may be rather urgent as new Tumbleweed users installing it for the first time on their laptops will have a bad impression!
Below is the status of the service prior to me having to disable it manually:
sam@localhost:~> sudo systemctl status chrony-wait.service [sudo] password for root: ● chrony-wait.service - Wait for chrony to synchronize system clock Loaded: loaded (/usr/lib/systemd/system/chrony-wait.service; enabled; vendor preset: disabled) Active: active (exited) since Sun 2019-08-25 16:47:11 CEST; 4min 57s ago Docs: man:chronyc(1) Main PID: 1446 (code=exited, status=0/SUCCESS) Tasks: 0 (limit: 4915) Memory: 0B CGroup: /system.slice/chrony-wait.service
Aug 25 16:40:07 localhost systemd[1]: Starting Wait for chrony to synchronize system clock... Aug 25 16:47:11 localhost.localdomain systemd[1]: Started Wait for chrony to synchronize system clock.
Sorry, had a brain fart! This was not truly a first boot as after finishing the installation and booting directly I logged into Plasma and then rebooted. I cannot really confirm the above as I was on ethernet but judging by the fact that the vendor preset is disabled there may be a desktop component triggering it on that first login. I will install TW again and confirm. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193#c8
--- Comment #8 from Sam G
(In reply to Sam G from comment #6)
I have just installed Tumbleweed (with the 22nd of August snapshot) on a new laptop and found chrony-wait.service activated by default. It was activated from the first boot, nothing installed, nothing modified.
The only way to avoid waiting 10 minutes is to have it plugged to ethernet prior or during the wait time as otherwise it won't reach anything. I think this is may be rather urgent as new Tumbleweed users installing it for the first time on their laptops will have a bad impression!
Below is the status of the service prior to me having to disable it manually:
sam@localhost:~> sudo systemctl status chrony-wait.service [sudo] password for root: ● chrony-wait.service - Wait for chrony to synchronize system clock Loaded: loaded (/usr/lib/systemd/system/chrony-wait.service; enabled; vendor preset: disabled) Active: active (exited) since Sun 2019-08-25 16:47:11 CEST; 4min 57s ago Docs: man:chronyc(1) Main PID: 1446 (code=exited, status=0/SUCCESS) Tasks: 0 (limit: 4915) Memory: 0B CGroup: /system.slice/chrony-wait.service
Aug 25 16:40:07 localhost systemd[1]: Starting Wait for chrony to synchronize system clock... Aug 25 16:47:11 localhost.localdomain systemd[1]: Started Wait for chrony to synchronize system clock.
Sorry, had a brain fart! This was not truly a first boot as after finishing the installation and booting directly I logged into Plasma and then rebooted. I cannot really confirm the above as I was on ethernet but judging by the fact that the vendor preset is disabled there may be a desktop component triggering it on that first login. I will install TW again and confirm.
Well...now I reinstalled TW with the same media and checked it on the first boot without ethernet at any moment nor logging to Plasma (just a tty)...and to my surprise the chrony-wait service is deactivated and inactive. I also tried: 1) A reboot, without logging into Plasma and without ethernet 2) A reboot, logging into Plasma and without ethernet 3) A reboot, logging into Plasma and with ethernet Whatever activated it in the first place may not even be doing it in all cases...if any further info is needed I will be happy to help, though maybe I have created an even bigger confusion -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
ls gz
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193#c11
--- Comment #11 from ls gz
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193#c12
Jon Brightwell
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193#c13
Fabian Vogt
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193#c14
--- Comment #14 from Dan Robinson
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193#c15
--- Comment #15 from ravas mi
systemctl disable chrony-wait.service
-- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193#c31
Rocky Arora
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193#c32
Hagen Buliwyf
The problem is: today many services communicates via certificates, even on local systems, and we are getting more and more bug reports because this fails, as this services are started before the time is set. The other problem is, that even booting creates meanwhile a lot of trouble because of this [bsc#1129730], that's why we enable it in our images.
As long as services communicate via certificates on a local system don't they they use the same time source - the system clock and therefore do have identical time? If services want to communicate via certificates across a network with a remote machine they do need network access. So does chrony. Only THOSE services should wait until chrony has finished time synchronisation. but no others. "Killing" the whole boot process seems not a good idea to me. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193#c33
--- Comment #33 from ravas mi
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193#c34
Felix Niederwanger
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
Alberto Planas Dominguez
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193#c35
--- Comment #35 from Alberto Planas Dominguez
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193#c36
--- Comment #36 from Reinhard Max
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
Hans de Raad
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193#c38
--- Comment #38 from Hans de Raad
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193#c41
--- Comment #41 from Reinhard Max
I see there has not been any progress on this. I'm still very much in favor of reverting the change in YaST ASAP. The stream of incoming complaints about TW being unusuable is constant and we're losing users because of this.
Fixing this in a way that everyone can agree on can be done afterwards.
Yes, please! I agree with Thorsten that there is much stuff to be fixed in this area, but just enabling chrony-wait.service through YaST and ignoring the other problems this brings up was throwing out the baby with the bath water. Maybe for the time being the default-enablement of chrony-wait.service can be done in a way so that it only happens on openSUSE Kubic, but not on normal Tumbleweed? If not, let's disable it by default until the followup-problems have been sorted out. (In reply to Josef Reidinger from comment #40)
what change in YaST you have mean? Switch from ntpd to chrony? Or something else?
The fact that YaST enables chrony-wait.service as a result of bug #1137196. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193#c43
--- Comment #43 from Reinhard Max
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193#c44
Reinhard Max
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193#c46
--- Comment #46 from Ginko Bonsai
and a wrong hardware clock does not provide this.
Yeah, but what *also* doesn't provide this is the ntp server you can't reach because you're offline because your system didn't boot and you couldn't log into the Wifi. So I still don't see a solution here? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193#c49
--- Comment #49 from Ginko Bonsai
YaST can't be responsible for decision taking here. We just implement what others want in a way they need it. I'd like to hear your wishes/opinions till Monday, 23rd September, 12:00 CEST. Then we need to plan for the next sprint.
I can't speak for the "always online and we absolutely need super-exact time" usecase, just for the "laptop, may be used offline" use case, so here goes the user story: As a travelling laptop user I want to be able to boot my laptop to graphical user interface and use it even if I have no network so that I can work on the train. Being offline must not block booting to GUI. A timeout of 10 minutes with no indication that the timeout *is* 10 minutes signals to me "this machine won't ever boot". Side note: since deactivating the chrony-wait service, I've had zero problems with services due to inexact time. But then I'm not using the laptop as a host for webserver, timeserver, fileserver, crypto stuff, etc. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
Marcus Hallett
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193#c53
--- Comment #53 from Marcus Hallett
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193#c54
--- Comment #54 from ravas mi
I don't have such a list, only look at the services which depend on it.
How do we look at the services that depend on it?
Most of them are systemd units for timers, and if you look at the mailing lists and the complains about timer running to early (especially on notebooks, who wonders why?), it should be pretty clear who needs them why.
I can't find the relevant posts. What timers are these? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
Philip Leupold
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
Marcel Kuehlhorn
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193
http://bugzilla.opensuse.org/show_bug.cgi?id=1145193#c58
--- Comment #58 from ravas mi
participants (1)
-
bugzilla_noreply@novell.com