Description of problem: RHVH 4.0 and 4.1 ships with ntp for time synchronization, along with chrony. Chrony is the preferred time synchronization system for RHV, and ntp will be removed in 4.2. It would be ideal for imgbased to know how to convert between trivial ntpd/chrony configs. Imgbased should: check whether ntpd is running and configured If it is, enable chrony and do our best to migrate the ntp config
Test version: rhvh-4.1-0.20171207.0 --- imgbased-0.9.51-0.1.el7ev.noarch --- ntp-4.2.6p5-25.el7_3.2.x86_64 --- chrony-3.1-2.el7.x86_64 rhvh-4.2.0.5-0.20171207.0 --- imgbased-1.0.4-0.1.el7ev.noarch --- ntp-4.2.6p5-25.el7_3.2.x86_64 --- chrony-3.1-2.el7.x86_64 [root@dhcp-8-176 etc]# imgbase layout rhvh-4.1-0.20171207.0 +- rhvh-4.1-0.20171207.0+1 rhvh-4.2.0.5-0.20171207.0 +- rhvh-4.2.0.5-0.20171207.0+1 Test steps: 1. Install rhvh-4.1-0.20171207.0 2. Modify the /etc/ntp.conf and /etc/chronyd.conf 3. Upgrade to rhvh-4.2.0.5-0.20171207.0 4. Check the /etc/ntp.conf and /etc/chronyd.conf Results: 1. Before upgrade: #Add the "server 0.rhel.pool.ntp.org iburst" line [root@dhcp-8-111 opt]# cat ntp.conf |grep -v "^#"|grep -v "^$" server clock01.util.phx2.redhat.com iburst server clock02.util.phx2.redhat.com iburst server 0.rhel.pool.ntp.org iburst driftfile /var/lib/ntp/drift restrict default nomodify notrap nopeer noquery restrict 127.0.0.1 restrict ::1 includefile /etc/ntp/crypto/pw keys /etc/ntp/keys disable monitor server 10.5.26.10 # added by /sbin/dhclient-script server 10.5.27.10 # added by /sbin/dhclient-script #Add the "server 1.rhel.pool.ntp.org iburst" line [root@dhcp-8-111 opt]# cat chrony.conf |grep -v "^$" |grep -v "^#" server clock01.util.phx2.redhat.com iburst server clock02.util.phx2.redhat.com iburst server 1.rhel.pool.ntp.org iburst driftfile /var/lib/chrony/drift makestep 1.0 3 rtcsync logdir /var/log/chrony 2. After upgrade: [root@dhcp-8-176 etc]# cat ntp.conf |grep -v "^$" |grep -v "^#" server clock01.util.phx2.redhat.com iburst server clock02.util.phx2.redhat.com iburst server 0.rhel.pool.ntp.org iburst driftfile /var/lib/ntp/drift restrict default nomodify notrap nopeer noquery restrict 127.0.0.1 restrict ::1 includefile /etc/ntp/crypto/pw keys /etc/ntp/keys disable monitor server 10.5.26.10 # added by /sbin/dhclient-script server 10.5.27.10 # added by /sbin/dhclient-script [root@dhcp-8-176 etc]# cat chrony.conf # This file has been migrated or modified by imgbased makestep 1.0 3 rtcsync logdir /var/log/chrony driftfile /var/lib/chrony/drift server clock01.util.phx2.redhat.com iburst server clock02.util.phx2.redhat.com iburst server 1.rhel.pool.ntp.org iburst From the test result, the 4.2 chrony.conf don't translate from the 4.1 ntp.conf.
Please ignore the comment 8 Test version: rhvh-4.1-0.20171207.0 --- imgbased-0.9.51-0.1.el7ev.noarch --- ntp-4.2.6p5-25.el7_3.2.x86_64 --- chrony-3.1-2.el7.x86_64 rhvh-4.2.0.5-0.20171218.1 --- imgbased-1.0.5-0.1.el7ev.noarch --- ntp-4.2.6p5-25.el7_3.2.x86_64 --- chrony-3.1-2.el7.x86_64 [root@dhcp-8-176 ~]# imgbase layout rhvh-4.1-0.20171207.0 +- rhvh-4.1-0.20171207.0+1 rhvh-4.2.0.6-0.20171218.0 +- rhvh-4.2.0.6-0.20171218.0+1 Test steps: 1. Install rhvh-4.1-0.20171207.0 2. Modify the /etc/ntp.conf and /etc/chronyd.conf 3. Upgrade to rhvh-4.2.0.5-0.20171218.1 4. Check the /etc/ntp.conf and /etc/chronyd.conf Results: 1. Before upgrade: #Add the "server 0.rhel.pool.ntp.org iburst" line [root@dhcp-8-176 opt]# cat /etc/ntp.conf |grep -v "^#"|grep -v "^$" server clock01.util.phx2.redhat.com iburst server clock02.util.phx2.redhat.com iburst server 0.rhel.pool.ntp.org iburst driftfile /var/lib/ntp/drift restrict default nomodify notrap nopeer noquery restrict 127.0.0.1 restrict ::1 includefile /etc/ntp/crypto/pw keys /etc/ntp/keys disable monitor server 10.5.26.10 # added by /sbin/dhclient-script server 10.5.27.10 # added by /sbin/dhclient-script #Add the "server 1.rhel.pool.ntp.org iburst" line [root@dhcp-8-176 opt]# cat /etc/chrony.conf |grep -v "^$" |grep -v "^#" server clock01.util.phx2.redhat.com iburst server clock02.util.phx2.redhat.com iburst server 1.rhel.pool.ntp.org iburst driftfile /var/lib/chrony/drift makestep 1.0 3 rtcsync logdir /var/log/chrony 2. After upgrade: [root@dhcp-8-176 ~]# cat /etc/chrony.conf |grep -v "^$" |grep -v "^#" makestep 1.0 3 rtcsync logdir /var/log/chrony driftfile /var/lib/chrony/drift server clock01.util.phx2.redhat.com iburst server clock02.util.phx2.redhat.com iburst server 0.rhel.pool.ntp.org iburst server 10.5.26.10 server 10.5.27.10 [root@dhcp-8-176 ~]# cat /etc/ntp.conf |grep -v "^$" |grep -v "^#" server clock01.util.phx2.redhat.com iburst server clock02.util.phx2.redhat.com iburst server 0.rhel.pool.ntp.org iburst driftfile /var/lib/ntp/drift restrict default nomodify notrap nopeer noquery restrict 127.0.0.1 restrict ::1 includefile /etc/ntp/crypto/pw keys /etc/ntp/keys disable monitor server 10.5.26.10 # added by /sbin/dhclient-script server 10.5.27.10 # added by /sbin/dhclient-script [root@dhcp-8-176 ~]# service chronyd status Redirecting to /bin/systemctl status chronyd.service ● chronyd.service - NTP client/server Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; vendor preset: disabled) Active: active (running) since Thu 2017-12-21 13:31:43 CST; 7min ago Docs: man:chronyd(8) man:chrony.conf(5) Process: 1248 ExecStartPost=/usr/libexec/chrony-helper update-daemon (code=exited, status=0/SUCCESS) Process: 1214 ExecStart=/usr/sbin/chronyd $OPTIONS (code=exited, status=0/SUCCESS) Main PID: 1226 (chronyd) CGroup: /system.slice/chronyd.service └─1226 /usr/sbin/chronyd Dec 21 13:31:41 localhost.localdomain systemd[1]: Starting NTP client/server... Dec 21 13:31:41 localhost.localdomain chronyd[1226]: chronyd version 3.1 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SECHASH +SIGND +ASYNCDNS +IPV6 +DEBUG) Dec 21 13:31:41 localhost.localdomain chronyd[1226]: Frequency -0.390 +/- 1.868 ppm read from /var/lib/chrony/drift Dec 21 13:31:43 localhost.localdomain systemd[1]: Started NTP client/server. Dec 21 13:34:23 dhcp-8-176.nay.redhat.com chronyd[1226]: Source 203.135.184.123 replaced with 202.118.1.81 Dec 21 13:34:57 dhcp-8-176.nay.redhat.com chronyd[1226]: Selected source 10.5.27.10 Dec 21 13:36:01 dhcp-8-176.nay.redhat.com chronyd[1226]: Selected source 10.5.26.10 From the test result, the 4.2 chrony.conf translate from the 4.1 ntp.conf. So change the bug's status to verified!
According to the Comment 9, moving to verified.
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/RHSA-2018:1524
BZ<2>Jira Resync