ceph-fs charm shouldn't install ntp package unconditionally

Bug #1935013 reported by Yoshi Kadokawa
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Ceph-FS Charm
Fix Released
High
Eric Chen

Bug Description

According to this[0], ceph-fs charm will install ntp package,
and with the following condition, nrpe check script will fail to run.

- when ceph-fs is deployed in an LXD container
- when the host machine, where ceph-fs is running in an LXD container, has a relation with ntp and nrpe charm

Here is the related bug[1].
First of all, I believe this ntp package is not necessary for ceph-fs to deploy.

[0] https://opendev.org/openstack/charm-ceph-fs/src/branch/master/src/lib/charm/openstack/ceph_fs.py#L172

[1] https://bugs.launchpad.net/charm-nrpe/+bug/1921392

Revision history for this message
Nobuto Murata (nobuto) wrote :

I think there are two issues here:
1. charm always installs "ntp" for both bionic and focal, "ntp" is in universe with focal it should be "chrony" on focal instead
2. charm installs (and activate) ntp servers even inside LXD container.

Like ceph-mon charm, we shouldn't install ntp in LXD, but relies on baremetal.
https://bugs.launchpad.net/charm-ceph-mon/+bug/1852441
https://opendev.org/openstack/charm-ceph-mon/commit/60a9a4f27aa1cddd717431abae7a26c46f5f8bd5

summary: - ntp package will fail to run nrpe check script for NTP
+ ceph-fs charm shouldn't install ntp package unconditionally
Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

Yes, looking at the source it's doing the wrong thing on focal. It would also be useful to detect if running in a container and then not install the appropriate package.

I'm not sure what it will do on series upgrade, but it's worth checking that ntp migrates to chrony properly.

Changed in charm-ceph-fs:
importance: Undecided → High
status: New → Triaged
tags: added: openstack-upgrade series-upgrade
tags: added: good-first-bug
Revision history for this message
Drew Freiberger (afreiberger) wrote :

I have run into this and it's actually causing knock on effect of ntpmon monitoring in the baremetal server that the container is running on. That's a separate bug, but it lead me to +1 this bug as an issue.

Regarding Nobuto's comments, 1. IIRC, bionic and focal should both be chrony, xenial was ntpd. 2. +1k to not run ntpd in a container just as was implemented in the ceph-mon charm.

Regarding ntp and baremetal, perhaps there should just be reliance on cs:ntp to handle the chronyd/ntpd decision and series-upgrade process since this charm installs but does not have a method to configure ntp per the environment's requirements, as it seems to only install the base ntp packages which assume access to global ubuntu NTP server pools.

Revision history for this message
Aurelien Lourot (aurelien-lourot) wrote :

Agreed, using cs:ntp as a subordinate instead of installing a package seems to be the way to go.

Eric Chen (eric-chen)
Changed in charm-ceph-fs:
assignee: nobody → YenHung (Eric) Chen (eric-chen)
Changed in charm-ceph-fs:
status: Triaged → In Progress
Changed in charm-ceph-fs:
milestone: none → 21.10
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-ceph-fs (master)

Reviewed: https://review.opendev.org/c/openstack/charm-ceph-fs/+/807668
Committed: https://opendev.org/openstack/charm-ceph-fs/commit/2cfacc2646dc06d9aa2c9d3667b0a334858a3d30
Submitter: "Zuul (22348)"
Branch: master

commit 2cfacc2646dc06d9aa2c9d3667b0a334858a3d30
Author: Eric Chen <email address hidden>
Date: Tue Sep 7 05:56:03 2021 +0000

    Remove ntp installation in ceph-fs.

    For the case in container, it is not necessary to install ntp.
    For the bare metal, we now expect operators to use a subordinate
    ntp charm instead. Therefore, we remove ntp installation in
    ceph-fs.

    Closes-Bug: #1935013
    Change-Id: I48f1a6a1ee6153bbc86cc9acf9302d8eb9d7db43

Changed in charm-ceph-fs:
status: Fix Committed → Fix Released
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.