summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislaw Bogatkin <sbogatkin@mirantis.com>2017-04-04 15:05:46 +0300
committerStanislaw Bogatkin <sbogatkin@mirantis.com>2017-04-04 15:09:05 +0300
commit21c7651fe55d3737383de673d564b472da75e788 (patch)
tree24ce6d79bafbd3cffbed89f3074508a85f51488e
parent9b13f574eaac8d06cf0ec96651108edb49a7caa8 (diff)
Use intersection of added vs deleted nodes instead of just deleted ones
There are cases when nailgun can send us data where there are nodes included into list of added nodes and deleted ones. As a result, puppet manifests failed with resource ensurance for present and absent hosts. To avoid this situation, subtract added nodes from deleted prior to actually deleting them from hosts. Change-Id: I515f7fae4bbe67123d70572a4f861e879ec580f6 Closes-Bug: #1679522
Notes
Notes (review): Code-Review+1: Igor Gajsin <igajsin@mirantis.com> Code-Review+1: Oleksiy Molchanov <omolchanov@mirantis.com> Code-Review+1: Michael Polenchuk <mpolenchuk@mirantis.com> Verified+1: Fuel CI <fuel-ci-bot@mirantis.com> Code-Review+1: Alexey Shtokolov <ashtokolov@mirantis.com> Code-Review+2: Stanislaw Bogatkin <sbogatkin@mirantis.com> Workflow+1: Stanislaw Bogatkin <sbogatkin@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Wed, 05 Apr 2017 06:14:03 +0000 Reviewed-on: https://review.openstack.org/453147 Project: openstack/fuel-library Branch: refs/heads/master
-rw-r--r--deployment/puppet/osnailyfacter/manifests/hosts/hosts.pp2
1 files changed, 1 insertions, 1 deletions
diff --git a/deployment/puppet/osnailyfacter/manifests/hosts/hosts.pp b/deployment/puppet/osnailyfacter/manifests/hosts/hosts.pp
index 03d304c..b38ee14 100644
--- a/deployment/puppet/osnailyfacter/manifests/hosts/hosts.pp
+++ b/deployment/puppet/osnailyfacter/manifests/hosts/hosts.pp
@@ -8,7 +8,7 @@ class osnailyfacter::hosts::hosts {
8 $host_resources = network_metadata_to_hosts($network_metadata) 8 $host_resources = network_metadata_to_hosts($network_metadata)
9 $messaging_host_resources = network_metadata_to_hosts($network_metadata, 'mgmt/messaging', $messaging_prefix) 9 $messaging_host_resources = network_metadata_to_hosts($network_metadata, 'mgmt/messaging', $messaging_prefix)
10 10
11 $deleted_nodes = hiera('deleted_nodes', []) 11 $deleted_nodes = difference(hiera('deleted_nodes', []), keys($host_resources))
12 $deleted_messaging_nodes = prefix($deleted_nodes, $messaging_prefix) 12 $deleted_messaging_nodes = prefix($deleted_nodes, $messaging_prefix)
13 13
14 Host { 14 Host {