From aa00dd2a9584389389414b8f87edef290aba94b8 Mon Sep 17 00:00:00 2001 From: Guillaume Thouvenin Date: Mon, 29 Aug 2016 09:07:08 +0200 Subject: [PATCH] Fix a cycle in graph of tasks This patch removes a dependency that causes a cycle in the graph of tasks in MOS 8. The cycle was -netconfig -> hosts -> cluster -> virtual_ips -> -netconfig. We cannot remove hosts.pp as we tried previously because doing this also remove a dependency between globals and hosts. So we create the following dependency: tools -> -netconfig -> hosts in place of the former: tools -> netconfig -> hosts Change-Id: I21f6c04eb38406a22a3a400975233bfc775357d0 Partial-Bug: #1616391 --- deployment_tasks.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/deployment_tasks.yaml b/deployment_tasks.yaml index 162276b..6770789 100644 --- a/deployment_tasks.yaml +++ b/deployment_tasks.yaml @@ -58,12 +58,19 @@ puppet_modules: puppet/modules:/etc/puppet/modules timeout: 120 -# We cannot use the legacy 'netconfig' task because it won't create the proper -# dependency on the virtual management router task. +# We cannot use the legacy 'netconfig' task because with MOS 9, it won't create +# the proper dependency on the 'virtual_ips' task for the Infrastructure-Alerting +# nodes. As a consequence, the deployment will fail because the nodes will +# perform operations that download stuff from the Internet (like running +# 'apt-get update') while the virtual router isn't ready yet. For MOS 8, the +# task depends on the 'tools' task and not on the 'virtual_ips' task otherwise +# it creates a dependency cycle. In this case, this isn't an issue because the +# default gateway is only changed at post-deployment (see the +# 'influxdb-configure-default-route' task). - id: lma-alerting-netconfig type: puppet version: 2.0.0 - requires: [lma-alerting-hiera, virtual_ips] + requires: [lma-alerting-hiera, tools] required_for: [deploy_end, hosts] cross-depends: - name: virtual_ips