Add workload status reporting
The charm currently does not report any workload status. This change adds support for this. Change-Id: I2586307c7beec5dc518a7b51c0737cca6105059d Closes-Bug: 1604580
This commit is contained in:
parent
9d7c31af42
commit
c614311aa2
@ -22,7 +22,9 @@ from cinder_backup_utils import (
|
||||
register_configs,
|
||||
restart_map,
|
||||
set_ceph_env_variables,
|
||||
PACKAGES
|
||||
PACKAGES,
|
||||
REQUIRED_INTERFACES,
|
||||
VERSION_PACKAGE,
|
||||
)
|
||||
from cinder_backup_contexts import (
|
||||
CephBackupSubordinateContext
|
||||
@ -41,6 +43,10 @@ from charmhelpers.core.host import (
|
||||
restart_on_change,
|
||||
service_restart,
|
||||
)
|
||||
from charmhelpers.contrib.openstack.utils import (
|
||||
set_os_workload_status,
|
||||
os_application_version_set,
|
||||
)
|
||||
from charmhelpers.contrib.storage.linux.ceph import (
|
||||
delete_keyring,
|
||||
ensure_ceph_keyring,
|
||||
@ -160,3 +166,5 @@ if __name__ == '__main__':
|
||||
hooks.execute(sys.argv)
|
||||
except UnregisteredHookError as e:
|
||||
log('Unknown hook {} - skipping.'.format(e))
|
||||
set_os_workload_status(CONFIGS, REQUIRED_INTERFACES)
|
||||
os_application_version_set(VERSION_PACKAGE)
|
||||
|
@ -34,6 +34,10 @@ PACKAGES = [
|
||||
'ceph-common',
|
||||
'cinder-backup',
|
||||
]
|
||||
REQUIRED_INTERFACES = {
|
||||
'ceph': ['ceph'],
|
||||
}
|
||||
VERSION_PACKAGE = 'cinder-common'
|
||||
CHARM_CEPH_CONF = '/var/lib/charm/{}/ceph.conf'
|
||||
CEPH_CONF = '/etc/ceph/ceph.conf'
|
||||
TEMPLATES = 'templates/'
|
||||
|
Loading…
x
Reference in New Issue
Block a user