Rerun set of tasks to update hiera info before start 'cgroups' task

Currently we are not collecting task's dependencies when
we run it separately. So, in this case only 'cgroups' task
will be triggered with outdated hiera data.

Change-Id: I671c011fa6e51acabaf64e9ba37a7e303b506543
Closes-Bug: #1573066
(cherry picked from commit 8757f4b3bd)
This commit is contained in:
slava 2016-05-12 03:01:59 +03:00 committed by Valyavskiy Viacheslav
parent 8c6e291498
commit dc5f84a70c
2 changed files with 5 additions and 3 deletions

View File

@ -2491,8 +2491,9 @@ class FuelWebClient(object):
with self.get_ssh_for_node(slave.name) as remote:
data = yaml.load(''.join(
remote.execute('cat /etc/astute.yaml')['stdout']))
node_name = [node['fqdn'] for node in data['nodes']
if node['role'] == role][0]
nodes = data['network_metadata']['nodes']
node_name = [node['fqdn'] for node in nodes.values()
if role in node['node_roles']][0]
logger.debug("node name is {0}".format(node_name))
fqdn = self.get_fqdn_by_hostname(node_name)
devops_node = self.get_devops_node_by_nailgun_fqdn(fqdn)

View File

@ -89,7 +89,8 @@ class TestCgroupHa(TestBasic):
cluster_id, self.generate_attributes(cgroups))
task = self.fuel_web.client.put_deployment_tasks_for_cluster(
cluster_id=cluster_id,
data=["cgroups"],
data=["upload_configuration", "configuration_symlink",
"hiera", "cgroups"],
node_id=node_ids)
self.fuel_web.assert_task_success(task)