Undercloud ntp service was not upgraded

Bug #1835368 reported by Sergii Golovatiuk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Cédric Jeanneret

Bug Description

Summary:

Further information:

Description
===========
Undercloud ntp service was not upgraded

Steps to reproduce
==================
On Rocky undercloud run:

[stack@undercloud-0 ~]$ pgrep -a ntpd
25903 /usr/sbin/ntpd -u ntp:ntp -g

There is a ntp service, configured and running

Upgrade undercloud to Stein by:

openstack undercloud upgrade -y

Expected result
===============
Either ntp or chrony should be configured and running.

Actual result
=============
There are no ntp services running on undercloud.

Environment
===========
1. Environment - Rocky and Stein undercloud.

Changed in tripleo:
assignee: nobody → Alex Schultz (alex-schultz)
milestone: none → train-3
importance: Undecided → High
status: New → Confirmed
Changed in tripleo:
status: Confirmed → Triaged
milestone: train-3 → train-2
Revision history for this message
Emilien Macchi (emilienm) wrote :

I couldn't see this issue in the upstream jobs:

Ansible disables ntp service when enabled:
http://logs.openstack.org/93/661093/45/check/tripleo-ci-centos-7-standalone-upgrade/e09ba5c/logs/undercloud/home/zuul/standalone_upgrade.log.txt.gz#_2019-07-03_18_40_16

ntpd isn't running after the upgrade.
http://logs.openstack.org/93/661093/45/check/tripleo-ci-centos-7-standalone-upgrade/e09ba5c/logs/undercloud/var/log/extra/pstree.txt.gz

However chronyd is enabled... so I don't understand what is the problem here?

Changed in tripleo:
assignee: Alex Schultz (alex-schultz) → Emilien Macchi (emilienm)
status: Triaged → Incomplete
Revision history for this message
Sergii Golovatiuk (sgolovatiuk) wrote :

Upstream job doesn't do upgrade from Rocky to Stein or master. You need to install Rocky and do upgrade to master rather then doing master to master upgrade where chrony was in both installations.

Changed in tripleo:
status: Incomplete → Confirmed
Changed in tripleo:
status: Confirmed → Triaged
Revision history for this message
Emilien Macchi (emilienm) wrote :
Revision history for this message
Cédric Jeanneret (cjeanner) wrote :

So there's a weird thing with the chronyd service:
while it's properly started, it's apparently NOT enabled:
● chronyd.service - NTP client/server
   Loaded: loaded (/usr/lib/systemd/system/chronyd.service; disabled; vendor preset: enabled)
   Active: active (running) since Fri 2019-07-05 13:59:59 UTC; 15min ago
     Docs: man:chronyd(8)
           man:chrony.conf(5)
 Main PID: 72538 (chronyd)
   CGroup: /system.slice/chronyd.service
           └─72538 /usr/sbin/chronyd

After a quick check, the ansible "chrony" module doesn't set "enabled: yes" here:
https://github.com/openstack/ansible-role-chrony/blob/master/tasks/config.yml#L12-L16

Although "vendor" sets it to "enabled", something is apparently overwriting it somewhere. Would be good to find out where, and correct the situation. Not sure the "config.yaml" block pointed above is the right culprit, but it never hurts setting the flag in it.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ansible-role-chrony (master)

Fix proposed to branch: master
Review: https://review.opendev.org/669365

Changed in tripleo:
assignee: Emilien Macchi (emilienm) → Cédric Jeanneret (cjeanner)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ansible-role-chrony (master)

Reviewed: https://review.opendev.org/669365
Committed: https://git.openstack.org/cgit/openstack/ansible-role-chrony/commit/?id=e289119ba1045f2cab00f62fc4543915d7568b3d
Submitter: Zuul
Branch: master

commit e289119ba1045f2cab00f62fc4543915d7568b3d
Author: Cédric Jeanneret <email address hidden>
Date: Fri Jul 5 16:37:36 2019 +0200

    Ensure service is enabled

    With older tripleo versions, we did disable the service since we were
    using ntpd.
    If we upgrade from a version using ntpd, the chronyd service won't be
    active upon reboot.

    Change-Id: Ic59374afdf5ace02ba8243f5163d0950e527ec52
    Closes-Bug: #1835368

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ansible-role-chrony 1.0.1

This issue was fixed in the openstack/ansible-role-chrony 1.0.1 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.