In bionic, one of the ceph packages installed causes chrony to auto-install even on lxd

Bug #1852441 reported by Drew Freiberger on 2019-11-13
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack ceph-mon charm
Undecided
Ponnuvel Palaniyappan
ceph (Ubuntu)
Undecided
Unassigned

Bug Description

When running ceph-mon in containers, best practice is to have chrony/ntp configured and installed on the bare metal and then have the container trust the system clock, as the container should not manage the system clock.

It seems that in source=cloud:bionic-stein, ceph-base package ends up installing chrony automatically as a recommended package.

chrony should not be installed in the LXD context of this charm. If it's possible to remove chrony from the recommended package list or to have the charm remove chrony if ceph-base is installed in a lxd, that wouuld be preferable to having to adding the NTP charm to configure chrony in a lxd, or to have to disable the chrony service.

Tags: sts Edit Tag help
Drew Freiberger (afreiberger) wrote :

Perhaps just masking the service would be sufficient if running in a lxd.

Alex Kavanagh (ajkavanagh) wrote :

TRIAGE: Confirmed, but not sure whether to fix in packages or "make the problem go away" in the charm; more discussion needed.

Changed in charm-ceph-mon:
status: New → Triaged
Felipe Reyes (freyes) on 2020-02-05
tags: added: sts
Felipe Reyes (freyes) wrote :

I think the charm is the one responsible of disabling chrony, something like this would do the trick.

if is_container():
    subprocess.check_call("sudo timedatectl set-ntp off")

Bryan Quigley (bryanquigley) wrote :

"sudo timedatectl set-ntp off" didn't work for me disabling chrony service

sudo systemctl disable chrony was needed.

Bryan Quigley (bryanquigley) wrote :

I would suggest the charm should just do the apt install with --no-install-recommends

That doesn't install chrony..

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ceph (Ubuntu):
status: New → Confirmed
James Page (james-page) on 2020-04-09
Changed in ceph (Ubuntu):
status: Confirmed → Won't Fix

I've just found this piece of code change, that removes the removal of ntp when we're running in container:
https://review.opendev.org/#/c/584051/5/lib/ceph/utils.py@a43

originating from here: NTP implementation hard-coded ;https://bugs.launchpad.net/charm-ceph-mon/+bug/1780690

Is there a way to revert back the
if is_container():
   PACKAGES.remove('ntp')

code snippet?

Changed in charm-ceph-mon:
assignee: nobody → Ponnuvel Palaniyappan (pponnuvel)

Notes:

1. `--no-install-recommends` also excludes `ceph-common` package from getting installed which is needed (it could possibly exclude more packages, too).

2. `ntp` isn't getting installed - it's not an issues/related any more.

So simply removing `chrony` is probably enough.

Changed in charm-ceph-mon:
status: Triaged → In Progress

Change abandoned by Ponnuvel Palaniyappan (<email address hidden>) on branch: master
Review: https://review.opendev.org/738647

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

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

Change abandoned by Ponnuvel Palaniyappan (<email address hidden>) on branch: master
Review: https://review.opendev.org/738763

Change abandoned by Ponnuvel Palaniyappan (<email address hidden>) on branch: master
Review: https://review.opendev.org/738781

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

Other bug subscribers