Configuration should be applied for specific nodes

We need to apply configuration to the node with particular service
running or we need to extent configuration templates processing to
support additional parameters of override_resources Puppet type

Change-Id: Iae6c2e5f2b3c43fa4f750802a98e927dca95c251
Closes-Bug: 1644656
This commit is contained in:
Dmitry Ukov 2016-12-23 15:28:36 +04:00
parent a817128b76
commit 94a7196300
2 changed files with 27 additions and 13 deletions

View File

@ -10,15 +10,15 @@ neutron_plugin_ml2:
neutron_dhcp_agent_config:
fuel_qa/service_reconfiguration_4:
value: "InProgress"
notify: "Service[neutron-server]"
notify: "Service[neutron-dhcp-agent]"
neutron_l3_agent_config:
fuel_qa/service_reconfiguration_5:
value: "InProgress"
notify: "Service[neutron-server]"
notify: "Service[neutron-l3-agent]"
neutron_metadata_agent_config:
fuel_qa/service_reconfiguration_6:
value: "InProgress"
notify: "Service[neutron-server]"
notify: "Service[neutron-metadata-agent]"
neutron_api_config:
fuel_qa/service_reconfiguration_7:
value: "InProgress"
@ -51,3 +51,12 @@ service:
ensure: running
nova-cert:
ensure: running
neutron-dhcp-agent:
ensure: running
provider: pacemaker
neutron-l3-agent:
ensure: running
provider: pacemaker
neutron-metadata-agent:
ensure: running
provider: pacemaker

View File

@ -47,11 +47,10 @@ def get_structured_config_dict(config):
param = param.split('/')
d['section'] = param[0]
d['option'] = param[1]
k, v = value.items()[0]
if k == 'ensure' and v == 'absent':
if value.get('ensure', False) == 'absent':
d['value'] = None
if k == 'value':
d['value'] = str(v)
else:
d['value'] = str(value.get('value', ''))
structured_conf[key2].append(d)
for key in config.keys():
@ -406,7 +405,8 @@ class ServicesReconfiguration(TestBasic):
uptimes = self.get_service_uptime(controllers, service_name)
self.show_step(4)
task = self.fuel_web.client.apply_configuration(cluster_id)
task = self.fuel_web.client.apply_configuration(cluster_id,
role="controller")
self.show_step(5)
self.fuel_web.assert_task_success(task, timeout=900, interval=5)
@ -539,7 +539,8 @@ class ServicesReconfiguration(TestBasic):
cluster_id)
self.show_step(3)
task = self.fuel_web.client.apply_configuration(cluster_id)
task = self.fuel_web.client.apply_configuration(cluster_id,
role="controller")
self.show_step(4)
self.fuel_web.task_wait(task, timeout=3600, interval=30)
@ -587,7 +588,8 @@ class ServicesReconfiguration(TestBasic):
uptimes = self.get_service_uptime(controllers, 'nova-api')
self.show_step(4)
task = self.fuel_web.client.apply_configuration(cluster_id)
task = self.fuel_web.client.apply_configuration(cluster_id,
role="controller")
self.show_step(5)
self.fuel_web.assert_task_success(task, timeout=900, interval=5)
@ -1084,7 +1086,8 @@ class ServicesReconfiguration(TestBasic):
controller_env_2 = self.fuel_web.get_nailgun_cluster_nodes_by_roles(
cluster_id_2, ['controller'])
uptimes = self.get_service_uptime(controller_env_1, service_name)
task = self.fuel_web.client.apply_configuration(cluster_id_1)
task = self.fuel_web.client.apply_configuration(cluster_id_1,
role="controller")
self.show_step(10)
self.fuel_web.assert_task_success(task, timeout=900, interval=5)
@ -1109,7 +1112,8 @@ class ServicesReconfiguration(TestBasic):
self.fuel_web.client.upload_configuration(config_revert,
cluster_id_2)
uptimes = self.get_service_uptime(controller_env_2, service_name)
task = self.fuel_web.client.apply_configuration(cluster_id_2)
task = self.fuel_web.client.apply_configuration(cluster_id_2,
role="controller")
self.show_step(15)
self.fuel_web.assert_task_success(task, timeout=900, interval=5)
@ -1406,7 +1410,8 @@ class ServicesReconfiguration(TestBasic):
uptimes = self.get_service_uptime(controllers, service_name)
self.show_step(4)
task = self.fuel_web.client.apply_configuration(cluster_id)
task = self.fuel_web.client.apply_configuration(cluster_id,
role="controller")
self.show_step(5)
self.fuel_web.assert_task_success(task, timeout=900, interval=5)