Fabric config change only applies restart to the node that has a change
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user