Bug 11092 - chrony as default ntp
Summary: chrony as default ntp
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: Installer (show other bugs)
Version: Cauldron
Hardware: i586 Linux
Priority: Normal enhancement
Target Milestone: ---
Assignee: Colin Guthrie
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-27 22:06 CEST by David Walser
Modified: 2017-03-06 00:26 CET (History)
1 user (show)

See Also:
Source RPM: drakx-installer-stage2
CVE:
Status comment:


Attachments
svn diff of svn/soft/perl-install with changes needed for chrony (8.89 KB, patch)
2013-08-27 22:07 CEST, David Walser
Details | Diff

Description David Walser 2013-08-27 22:06:14 CEST
Finally done some work to implement:
https://wiki.mageia.org/en/Feature:ChronyDefaultNTP

The chrony package has been imported and should be ready to submit.  I haven't built it yet on the build system, but it's built locally and running fine in a VM.

For the drakx changes, I have made an attempt to implement.  I haven't tested them (wouldn't know how to anyway), but I made the changes that looked right to make.  Obviously I didn't commit it, because I checked out from svn and everything's being converted to git, and I'd like to get it reviewed first.

Colin, hopefully you can commit this to the git of drakx if it's good.

I'll attach my svn diff.

Reproducible: 

Steps to Reproduce:
Comment 1 David Walser 2013-08-27 22:07:51 CEST
Created attachment 4290 [details]
svn diff of svn/soft/perl-install with changes needed for chrony

rpmsrate-raw in meta-task should also be changed s/ntp/chrony/:
Index: rpmsrate-raw
===================================================================
--- rpmsrate-raw        (revision 472352)
+++ rpmsrate-raw        (working copy)
@@ -820,7 +820,7 @@
   5 CAT_FILE_TOOLS davfs2
   5 CAT_FILE_TOOLS hfsutils
   4 CAT_FILE_TOOLS reiser4progs
-  5 CAT_SYSTEM ntp
+  5 CAT_SYSTEM chrony
   5 CAT_SYSTEM dhcp-client zcip
   5 CAT_SYSTEM rp-pppoe ppp-pppoatm pptp-linux bpalogin
   5 CAT_SYSTEM b43-openfwwf b43-fwcutter ndiswrapper
@@ -842,7 +842,7 @@

   5 pptp-linux dhcpcd dhcpxd dhcp-client rp-pppoe pump
     ppp nfs-utils ppp-pppoe ppp-pppoatm
-    autologin ntp samba-server ncpfs mageia-gfxboot-theme
+    autologin chrony samba-server ncpfs mageia-gfxboot-theme
     shorewall shorewall-ipv6 iptables samba-client perl-Net-DNS mandi-ifw dhcp-client
     netcat-traditional sndconfig curl
     mtools usbutils
Comment 2 Colin Guthrie 2013-08-27 22:20:54 CEST
Comment on attachment 4290 [details]
svn diff of svn/soft/perl-install with changes needed for chrony

Looks generally OK with a quick look. There may be more we can do in drakclock related to using the dbus interfaces now exported by systemd's datetimed (much like Gnome does), but I'll need to poke into it a bit to know what's possible there.
Comment 3 David Walser 2013-10-22 23:37:10 CEST
Per Ãyvind has implemented this in his branch (it'd be nice to take a look at his code) by just replacing ntp with chrony instead of supporting both.  A couple tips he gave me:
1) it should add iburst at the end of the server definition lines in chrony.conf so that it will sync immediately when chrony starts (kind of like what ntpdate.service does now)
2) it should do a waitsync after choosing the ntp server right after chronyd has been started by also doing systemctl start chrony-wait
Comment 4 Colin Guthrie 2013-11-17 21:57:48 CET
Hiya,

I've eventually taken a look at this - so sorry for the delay!

I've added the iburst thing and made several other changes. There were a few syntax bugs and I think I've fixed them all up!

Please double check!

http://gitweb.mageia.org/software/drakx/commit/?id=d54857e5704e52bc93d810250732affc82e1d65f


It seems to work well for me in both scenarios (tho' I did have to push one fix afterwards to fix a string comparison bug I introduced in the above commit).

Anyway, all seems well now I think.
Comment 5 David Walser 2013-11-22 19:21:02 CET
Hey Colin, thanks for committing this.  The only things I noticed are, with the differences in your commit vs. my patch for:
- perl-install/standalone/finish-install
- perl-install/install/steps.pm

your commit forces it to install and use chrony.  My intention was that if you already had ntpd installed, it would just use and still support that.

Also, have the needed changes to rpmsrate I posted in Comment 1 been addressed anywhere?
Comment 6 Colin Guthrie 2013-11-25 11:56:36 CET
(In reply to David Walser from comment #5)
> Hey Colin, thanks for committing this.  The only things I noticed are, with
> the differences in your commit vs. my patch for:
> - perl-install/standalone/finish-install

I mentioned all the differences in the patch commit message, so it should be clear.

I dropped the finish-install stuff as this is only used after live CD installs thus there should be no "legacy" installs here, and we should not have to deal with old systems - we can just assume chrony.

> - perl-install/install/steps.pm
> 
> your commit forces it to install and use chrony.  My intention was that if
> you already had ntpd installed, it would just use and still support that.

I don't see how the steps.pm changes did that. I could see this argument working if applied to finish-install if it were not for the pre-condition that it is only used for live installs where we can control ntp inclusion. Is this what you were referring to?

> Also, have the needed changes to rpmsrate I posted in Comment 1 been
> addressed anywhere?

Nope, missed this bit but done now. Thanks! (that does somewhat lessen my argument about finish-install, but the principle of it does still stand I think :p)
Comment 7 David Walser 2013-11-25 14:33:33 CET
OK, looking at install/steps.pm again, it looks like your code should do the same thing as mine.  I'll have to test this when I get a chance, but the code looks fine to me now.
Comment 8 David Walser 2014-03-06 18:33:58 CET
I just did some testing, and the installer works fine for installing and configuring chrony.

Using drakclock from MCC in a running system works sometimes, but there are some issues, as seen in Bug 11502.

Also, if you have both ntp and chrony installed, drakclock should configure chrony, but it does ntp in that case, which is incorrect.

Speaking of drakclock, there's also Bug 9785 which isn't related to this bug.
Comment 9 David Walser 2014-03-06 18:55:49 CET
Testing the installer on an upgrade with ntp and chrony installed, (and both services previously disabled) it configured ntp.conf and enabled ntpd.service, which is incorrect.

One one attempt at doing the above, it appeared to at least configure ntp.conf correctly.  On one other attempt, for some reason it put the africa ntp servers in ntp.conf, even though I left the default "All servers" selected in the installer, which should have put pool.ntp.org in ntp.conf.

I did one final attempt with only ntp installed, and it put the africa servers in there again, and did not enable ntpd.service.
Comment 10 Nicolas Lécureuil 2017-03-05 23:38:09 CET
what about this  bug ? is it still valid ?

CC: (none) => mageia

Comment 11 David Walser 2017-03-06 00:26:20 CET
I'm not aware that any work has been done on this.

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