Drop assess_status() as it's duplicating work done by set_os_workload_status().
This commit is contained in:
parent
39e1045899
commit
1a02c96e7e
@ -7,7 +7,6 @@ from lib.swift_storage_utils import (
|
||||
PACKAGES,
|
||||
RESTART_MAP,
|
||||
SWIFT_SVCS,
|
||||
assess_status,
|
||||
determine_block_devices,
|
||||
do_openstack_upgrade,
|
||||
ensure_swift_directories,
|
||||
@ -167,8 +166,7 @@ def main():
|
||||
hooks.execute(sys.argv)
|
||||
except UnregisteredHookError as e:
|
||||
log('Unknown hook {} - skipping.'.format(e))
|
||||
set_os_workload_status(CONFIGS, REQUIRED_INTERFACES,
|
||||
charm_func=assess_status)
|
||||
set_os_workload_status(CONFIGS, REQUIRED_INTERFACES)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
@ -344,15 +344,3 @@ socket options = SO_KEEPALIVE
|
||||
f = open('/etc/rsyncd.conf', 'w')
|
||||
f.write(rsyncd_base)
|
||||
f.close()
|
||||
|
||||
|
||||
def assess_status(configs):
|
||||
"""Assess status of current unit"""
|
||||
# Verify swift-hash received from swift-proxy
|
||||
ctxt = SwiftStorageContext()()
|
||||
if len(relation_ids('swift-storage')) < 1:
|
||||
return '', ''
|
||||
elif not ctxt or not ctxt['swift_hash']:
|
||||
return 'blocked', 'Missing swift-hash from proxy relation'
|
||||
else:
|
||||
return 'active', 'Unit is ready'
|
||||
|
Loading…
x
Reference in New Issue
Block a user