Fabric config change only applies restart to the node that has a change

This commit is contained in:
Bilal Baqar
2015-11-21 14:07:15 -08:00
parent b9a6d93d6e
commit da05e48642
2 changed files with 26 additions and 0 deletions

View File

@@ -30,6 +30,7 @@ from pg_dir_utils import (
ensure_mtu,
add_lcm_key,
post_pg_license,
fabric_interface_changed
)
hooks = Hooks()
@@ -71,6 +72,15 @@ def config_changed():
if add_lcm_key():
log("PLUMgrid LCM Key added")
return 1
charm_config = config()
if charm_config.changed('fabric-interfaces'):
if not fabric_interface_changed():
log("Fabric interface already set")
return 1
if charm_config.changed('os-data-network'):
if charm_config['fabric-interfaces'] == 'MANAGEMENT':
log('Fabric running on managment network')
return 1
stop_pg()
configure_sources(update=True)
pkgs = determine_packages()