Code review comment for lp:~ajkavanagh/charms/trusty/glance/use-assess-status-lp1531767

Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

> As the purpose of the MP is to implement assess_status() we need to make sure
> it runs after every hook.
>
> Currently in glance_relations.py set_os_workload_status is called which will
> clobber any paused status. This should be replaced with a call to
> asssess_status() and as Liam points out assess_status should ultimately call
> set_os_workload_status.
>
> if __name__ == '__main__':
> try:
> hooks.execute(sys.argv)
> except UnregisteredHookError as e:
> juju_log('Unknown hook {} - skipping.'.format(e))
> set_os_workload_status(CONFIGS, REQUIRED_INTERFACES,
> charm_func=check_optional_relations)

Yep, ok. I'll do an search of all the set_os_workload_status() calls and see if they would be better as assess_status() -- i.e. just to check that it won't clobber a pause status as you say.

« Back to merge proposal