Merge "Add application version on HA Cluster charm" into stable/focal

This commit is contained in:
Zuul 2024-03-07 16:26:34 +00:00 committed by Gerrit Code Review
commit 6ebd23cddd
2 changed files with 8 additions and 0 deletions

View File

@ -33,6 +33,7 @@ from charmhelpers.core.strutils import (
bool_from_string,
)
from charmhelpers.core.hookenv import (
application_version_set,
local_unit,
log,
TRACE,
@ -77,6 +78,7 @@ from charmhelpers.fetch import (
apt_install,
add_source,
apt_update,
get_upstream_version,
)
from charmhelpers.contrib.hahelpers.cluster import (
peer_ips,
@ -114,6 +116,8 @@ SYSTEMD_OVERRIDES_FILE = '{}/overrides.conf'
MAAS_DNS_CONF_DIR = '/etc/maas_dns'
STONITH_CONFIGURED = 'stonith-configured'
VERSION_PACKAGE = "pacemaker"
class MAASConfigIncomplete(Exception):
pass
@ -1382,6 +1386,8 @@ def assess_status_helper():
return ("blocked",
"Resource: {} not running".format(resource))
application_version_set(get_upstream_version(VERSION_PACKAGE))
return status, message

View File

@ -19,6 +19,8 @@ mock>=1.2,<4.0.0; python_version < '3.6'
mock>=1.2; python_version >= '3.6'
stestr>=2.2.0
# stestr requires voluptuous which dropped support for python 3.6
voluptuous<=0.14.0
# Dependency of stestr. Workaround for
# https://github.com/mtreinish/stestr/issues/145