Do not update external network data port if already set (#625)

This commit is contained in:
coreycb
2021-08-24 09:48:55 -04:00
committed by GitHub
parent be1e489956
commit c759a23962

View File

@@ -986,8 +986,11 @@ def configure_networking_charms(networking_data, macs, use_juju_wait=True):
current_data_port = get_application_config_option(
application_name,
networking_data.port_config_key)
if current_data_port == config[networking_data.port_config_key]:
logging.info('Config already set to value')
if current_data_port:
logging.info("Skip update of external network data port config."
"Config '{}' already set to value: {}".format(
networking_data.port_config_key,
current_data_port))
return
model.set_application_config(