Bug 1638606 - NTP config is migrated to chrony on every upgrade
Summary: NTP config is migrated to chrony on every upgrade
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: imgbased
Version: 4.2.6
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ovirt-4.3.0
: 4.3.0
Assignee: Yuval Turgeman
QA Contact: Huijuan Zhao
URL:
Whiteboard:
Depends On:
Blocks: 1652940
TreeView+ depends on / blocked
 
Reported: 2018-10-12 04:16 UTC by Germano Veit Michel
Modified: 2022-03-13 15:44 UTC (History)
11 users (show)

Fixed In Version: imgbased-1.1.1
Doc Type: Bug Fix
Doc Text:
Previously, the default ntp.conf file was migrated to chrony even when NTP was disabled, overwriting chrony.conf file with incorrect values. In the current release, ntp.conf is only migrated if NTP is enabled.
Clone Of:
: 1652940 (view as bug list)
Environment:
Last Closed: 2019-05-08 12:32:16 UTC
oVirt Team: Node
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3649301 0 None None None 2018-10-12 04:17:26 UTC
Red Hat Product Errata RHBA-2019:1053 0 None None None 2019-05-08 12:32:47 UTC
oVirt gerrit 94900 0 master MERGED osupdater: migrate ntp.conf only if ntp is enabled 2021-01-27 10:48:41 UTC
oVirt gerrit 95263 0 ovirt-4.2 MERGED osupdater: migrate ntp.conf only if ntp is enabled 2021-01-27 10:47:58 UTC

Description Germano Veit Michel 2018-10-12 04:16:39 UTC
Description of problem:

In 4.2, RHV switched from ntpd to chrony and a translator from ntpd to chrony was added (BZ1503148) to ease the transition.

However, this translator still runs with every upgrade. Even on a freshly installed host. This means on every upgrade /etc/chrony.conf is overwritten with the settings from /etc/ntp.conf, making it impossible for the user to customize /etc/chrony.conf as the settings are overwritten.

This migration should only happen once (i.e. if ntpd is enabled) not on every upgrade.

Also, the latest versions are still shipped with /etc/ntp.conf even if it is not in use.

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

How reproducible:
100%

Steps to Reproduce:
1. Install rhvh-4.2.6.1-0.20180907.0
2. Modify /etc/chrony.conf
3. Upgrade

Actual results:
/etc/chrony.conf modified

Expected results:
/etc/chrony.conf persisted

Additional info:

On every upgrade...
2018-10-12 13:41:48,155 [DEBUG] (migrate_ntp_to_chrony) Migrating NTP configuration to chrony
2018-10-12 13:41:48,156 [DEBUG] (migrate_ntp_to_chrony) Adding ntp option: servers

Comment 2 cshao 2018-10-12 09:10:38 UTC
Can reproduce this issue.

Test steps:
1. Install rhvh-4.2.6.1-0.20180907.0
2. Modify /etc/chrony.conf
3. Upgrade

Test result:
/etc/chrony.conf not persisted

Comment 6 Huijuan Zhao 2018-11-28 03:05:08 UTC
This bug is fixed in redhat-virtualization-host-4.3-20181122.0.el7_6.

Scenario 1

Test versions:
# imgbase layout
rhvh-4.1-0.20180425.0
 +- rhvh-4.1-0.20180425.0+1
rhvh-4.3.0.0-0.20181122.0
 +- rhvh-4.3.0.0-0.20181122.0+1

Test steps:
1. Install rhvh-4.1-0.20180425.0
2. Login rhvh, check chronyd.service is active
3. Change both /etc/chrony.conf (e.g. add server1) and /etc/ntp.conf(e.g. add server2)
4. Upgrade rhvh to rhvh-4.3.0.0-0.20181122.0
5. Check chronyd.service status and /etc/chrony.conf

Test results:
After step 5, chronyd.service is active, /etc/chrony.conf only persisted the change of /etc/chrony.conf in step 3(add server1).


Scenario 2

Test versions:
# imgbase layout
rhvh-4.0-0.20170307.0
 +- rhvh-4.0-0.20170307.0+1
rhvh-4.3.0.0-0.20181122.0
 +- rhvh-4.3.0.0-0.20181122.0+1

Test steps:
1. Install rhvh-4.0-0.20170307.0
2. Login rhvh, stop chronyd.service, start ntpd.service
3. Change both /etc/chrony.conf (e.g. add server1) and /etc/ntp.conf(e.g. add server2)
4. Upgrade rhvh to rhvh-4.3.0.0-0.20181122.0
5. Check chronyd.service status and /etc/chrony.conf

Test results:
After step 5, chronyd.service is active, /etc/chrony.conf only persisted the change of /etc/ntp.conf in step 3(add server2).


So this bug is fixed, change the status to VERIFIED.

Comment 8 errata-xmlrpc 2019-05-08 12:32:16 UTC
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/RHBA-2019:1053


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