Avoid excessive svc restarts by tracking CONFIG_CHANGED.
This commit is contained in:
parent
a3289c0e3e
commit
48b365dfcd
@ -2,6 +2,8 @@
|
||||
|
||||
# Common utility functions used across all nova charms.
|
||||
|
||||
CONFIG_CHANGED=False
|
||||
|
||||
# Load the common OpenStack helper library.
|
||||
if [[ -e $CHARM_DIR/lib/openstack-common ]] ; then
|
||||
. $CHARM_DIR/lib/openstack-common
|
||||
|
@ -49,9 +49,10 @@ function service_ctl {
|
||||
juju-log "$CHARM: service_ctl ERROR - Service $i failed to $action"
|
||||
fi
|
||||
done
|
||||
# all configs should have been reloaded on restart, reset flag if its
|
||||
# being used.
|
||||
if [[ "$action" == "restart" ]] && [[ -n "$CONFIG_CHANGED" ]]; then
|
||||
# all configs should have been reloaded on restart of all services, reset
|
||||
# flag if its being used.
|
||||
if [[ "$action" == "restart" ]] && [[ -n "$CONFIG_CHANGED" ]] &&
|
||||
[[ "$ctl" == "all" ]]; then
|
||||
CONFIG_CHANGED="False"
|
||||
fi
|
||||
}
|
||||
|
2
revision
2
revision
@ -1 +1 @@
|
||||
240
|
||||
261
|
||||
|
Loading…
x
Reference in New Issue
Block a user