Bug 1413754

Summary: Chrony and ntpd are present in overcloud-full images
Product: Red Hat OpenStack Reporter: David Hill <dhill>
Component: rhosp-director-imagesAssignee: Emilien Macchi <emacchi>
Status: CLOSED ERRATA QA Contact: Gurenko Alex <agurenko>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 10.0 (Newton)CC: agurenko, akarlsso, cpaquin, dhill, ealcaniz, emacchi, jjung, jschluet, kejones, mburns, ohochman
Target Milestone: rcKeywords: Triaged
Target Release: 11.0 (Ocata)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rhosp-director-images-11.0-20170228.1.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-17 20:24:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1335596, 1396161    

Description David Hill 2017-01-16 21:40:12 UTC
Description of problem:
Chrony and ntpd are present in overcloud-full images .   This causes an issue because chronyd starts before ntpd but is not configured thus making time synching unfunctionnal.

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


How reproducible:
Always

Steps to Reproduce:
1. Deploy an overcloud
2.
3.

Actual results:
chronyd and ntpd are starting at boot time but ntpd fails to start because the NTP port is already binded by chronyd

Expected results:
Succeds

Additional info:

Comment 4 Mike Burns 2017-01-17 17:51:18 UTC
Puppet should probably ensure that chronyd is not started, but you can do this yourself with:

sudo virt-customize -a overcloud-full.qcow2 --run-command "systemctl disable chronyd"

Comment 5 Mike Burns 2017-01-17 17:54:07 UTC
I've checked and all 7.3 based images I have available currently have chronyd enabled by default.  I check a couple 7.2 images as well and those also have it enabled by default.  This applies to both OSP overcoud images and RHEL Guest Images, so it's best to assume that chronyd is always on by default in a RHEL 7 image.

Comment 6 Emilien Macchi 2017-01-18 16:40:40 UTC
Mike: Puppet doesn't manage chronyd at all so it doesn't make sense to disable the service, because we don't know exactly what is in the image. Puppet can't disable things we don't manage in the catalog.

Comment 7 Mike Burns 2017-01-18 16:55:37 UTC
(In reply to Emilien Macchi from comment #6)
> Mike: Puppet doesn't manage chronyd at all so it doesn't make sense to
> disable the service, because we don't know exactly what is in the image.
> Puppet can't disable things we don't manage in the catalog.

It appears that all RHEL 7 images that are publicly available have chrony installed and running by default, so something from either DIB or Puppet should be disabling chronyd if its causing a problem.

Maybe it's the element that installs ntp that needs to disable chronyd.

Comment 8 Emilien Macchi 2017-03-01 21:21:08 UTC
Moving the bug to Ocata, since we can't easily backport the fix upstream I think. Omri, can we check that chrony is not in the image anymore? Thanks.

Comment 10 Jon Schlueter 2017-03-06 20:13:35 UTC
Confirmed chrony is no longer installed on OSP 11 images

Comment 14 Gurenko Alex 2017-04-30 12:27:01 UTC
Latest RC build 2017-04-28.4

[stack@undercloud-0 ~]$ rpm -q rhosp-director-images
rhosp-director-images-11.0-20170428.1.el7ost.noarch

[heat-admin@controller-0 ~]$ rpm -q chrony
package chrony is not installed

[heat-admin@controller-0 ~]$ systemctl status chornyd
Unit chornyd.service could not be found.

[heat-admin@controller-0 ~]$ systemctl status ntpd
● ntpd.service - Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2017-04-30 11:56:02 UTC; 28min ago
 Main PID: 82824 (ntpd)

Looks good.

Comment 15 Kevin Jones 2017-05-01 02:28:49 UTC
As an update, I experienced an issue regarding chronyd vs. ntpd this past week on a customer PoC.

In my experience the following was in place after deployment:

- chronyd was enabled and active
- ntpd was disabled and inactive
- ntp.conf was configured with the ntp server from the deploy command
- chrony.conf was not configured with the ntp server. It still had default rhel pool servers

We worked around by feeding the following script in on firstboot.

uname -r|grep el7 && grep ^server /etc/chrony.conf|grep rhel && cp -rp /etc/chrony.conf /etc/chrony.conf.orig && cat /etc/chrony.conf.orig|sed s/server/#server/g > /etc/chrony.conf && echo server YOURNTPSEVER iburst >> /etc/chrony.conf && systemctl restart chronyd

Comment 17 errata-xmlrpc 2017-05-17 20:24:57 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/RHEA-2017:1247