Install python3-croniter for nrpe checks

Change ab79c3ee introduced the croniter library for interacting
with cron. However, the dependent package was not included in
a list of installation packages nor installed on the upgrade
path. This patch adds the python3-croniter package for upgrade
and installation paths to allow the nrpe checks to continue
to function.

Change-Id: I363f8e04a3850eecf219c5a26ab9137f217a0f36
Closes-Bug: #1928802
This commit is contained in:
Billy Olsen 2021-05-21 11:00:20 -07:00
parent 453b8e979b
commit 38e1b4ed35
2 changed files with 8 additions and 3 deletions

View File

@ -93,7 +93,8 @@ from charmhelpers.fetch import (
from charmhelpers.fetch import get_upstream_version
PACKAGES = ['rabbitmq-server', 'python3-amqplib', 'lockfile-progs']
PACKAGES = ['rabbitmq-server', 'python3-amqplib', 'lockfile-progs',
'python3-croniter']
VERSION_PACKAGE = 'rabbitmq-server'

View File

@ -641,9 +641,13 @@ def upgrade_charm():
# for the check_rabbitmq.py script, python3-amqplib needs to be installed;
# if previous version was a python2 version of the charm this won't happen
# unless the source is changed. Ensure it is installed here if needed.
# LP:#1928802 - also include python3-croniter as its needed for
# check_rabbitmq_queues.py as of change ab79c3ee
apt_update(fatal=True)
if filter_installed_packages(['python3-amqplib']):
apt_install(['python3-amqplib'], fatal=True)
missing_packages = filter_installed_packages(['python3-amqplib',
'python3-croniter'])
if missing_packages:
apt_install(missing_packages, fatal=True)
MAN_PLUGIN = 'rabbitmq_management'