Do not change config_target if not reconfiguring

During config active controller, the config_target on the
standby controller is mistakenly changed as well.
Should only reset config target for active controller.
Also enabled more logging to help future troubleshooting.

Closes-Bug: 1826418

Change-Id: I1db29ff0c07098844039b1c83cb437cbcae30aee
Signed-off-by: Bin Qian <bin.qian@windriver.com>
This commit is contained in:
Bin Qian 2019-05-02 08:16:43 -04:00
parent d6f638cf5c
commit 3189e42094
2 changed files with 12 additions and 5 deletions

View File

@ -132,7 +132,7 @@ class AgentAPI(sysinv.openstack.common.rpc.proxy.RpcProxy):
manifest based upon the config_dict (including personalities).
"""
LOG.debug("config_apply_runtime_manifest: fanout_cast: sending"
LOG.info("config_apply_runtime_manifest: fanout_cast: sending"
" config %s %s to agent" % (config_uuid, config_dict))
# fanout / broadcast message to all inventory agents

View File

@ -4511,7 +4511,8 @@ class ConductorManager(service.PeriodicService):
cutils.touch(CONFIG_CONTROLLER_ACTIVATE_FLAG)
# apply keystone changes to current active controller
personalities = [constants.CONTROLLER]
config_uuid = self._config_update_hosts(context, personalities)
config_uuid = self._config_update_hosts(context, personalities,
host_uuids=[active_host.uuid])
config_dict = {
"personalities": personalities,
"host_uuids": active_host.uuid,
@ -4551,7 +4552,8 @@ class ConductorManager(service.PeriodicService):
# initial unlock for subsequent host installs.
if standby_host is None:
personalities = [constants.CONTROLLER]
config_uuid = self._config_update_hosts(context, personalities)
config_uuid = self._config_update_hosts(context, personalities,
host_uuids=[active_host.uuid])
config_dict = {
"personalities": personalities,
"host_uuids": active_host.uuid,
@ -8021,8 +8023,8 @@ class ConductorManager(service.PeriodicService):
else:
# better to clear since a GET may block
LOG.info("SYS_I Clear system config alarm: %s" %
ihost_obj.hostname)
LOG.info("SYS_I Clear system config alarm: %s target config %s" %
(ihost_obj.hostname, ihost_obj.config_target))
self.fm_api.clear_fault(
fm_constants.FM_ALARM_ID_SYSCONFIG_OUT_OF_DATE,
@ -8252,6 +8254,11 @@ class ConductorManager(service.PeriodicService):
"""Apply manifests on all hosts affected by the supplied personalities.
If host_uuid is set, only update hiera data for that host
"""
if "classes" in config_dict:
LOG.info("applying runtime manifest config_uuid=%s, classes: %s" % (
config_uuid, config_dict["classes"]))
else:
LOG.info("applying runtime manifest config_uuid=%s" % config_uuid)
# Update hiera data for all hosts prior to runtime apply if host_uuid
# is not set. If host_uuid is set only update hiera data for that host