aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/patches
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-02-07 14:52:46 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-02-07 14:52:46 +0000
commit20dac8e3fd7e3a4161b0ee0ea4f5eb4833a99dda (patch)
treea1aaac388ce04bff363f8fd2182dbc440460bc90 /mcp/patches
parent854729dd3174985f524c2a2ab9d373b65f49d188 (diff)
parentf49be97051c3c5c8bb4386d236197103d3682720 (diff)
Merge "Add NOVCP HA OVS scenario (baremetal, virtual)"
Diffstat (limited to 'mcp/patches')
-rw-r--r--mcp/patches/0011-routes-Skip-network-restart-on-noifupdown.patch29
-rw-r--r--mcp/patches/0014-reclass.storage.node-Merge-duplicate-nodes.patch44
-rwxr-xr-xmcp/patches/patch.sh9
-rw-r--r--mcp/patches/patches.list1
-rw-r--r--mcp/patches/patches_init.list8
-rw-r--r--mcp/patches/scripts/0002-salt-master-init.sh-Apply-OPNFV-Fuel-patches.patch35
6 files changed, 121 insertions, 5 deletions
diff --git a/mcp/patches/0011-routes-Skip-network-restart-on-noifupdown.patch b/mcp/patches/0011-routes-Skip-network-restart-on-noifupdown.patch
new file mode 100644
index 000000000..5ccd04aef
--- /dev/null
+++ b/mcp/patches/0011-routes-Skip-network-restart-on-noifupdown.patch
@@ -0,0 +1,29 @@
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Mon, 8 Jan 2018 05:09:11 +0100
+Subject: [PATCH] routes: Skip network restart on 'noifupdown'
+
+Previously, setting up routes did not allow passing 'require_reboot',
+so each route change would lead to a networking service restart,
+rendering interface configuration options like 'noifupdown' useless.
+Allow disabling network restart per-interface using the existing
+'noifupdown' option.
+
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+ linux/network/interface.sls | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/linux/network/interface.sls b/linux/network/interface.sls
+index 921ceac..6ebc670 100644
+--- a/linux/network/interface.sls
++++ b/linux/network/interface.sls
+@@ -338,6 +338,9 @@ linux_network_{{ interface_name }}_routes:
+ gateway: {{ route.gateway }}
+ {%- endif %}
+ {%- endfor %}
++ {%- if interface.noifupdown is defined %}
++ - require_reboot: {{ interface.noifupdown }}
++ {%- endif %}
+
+ {%- endif %}
+
diff --git a/mcp/patches/0014-reclass.storage.node-Merge-duplicate-nodes.patch b/mcp/patches/0014-reclass.storage.node-Merge-duplicate-nodes.patch
new file mode 100644
index 000000000..25159bc4a
--- /dev/null
+++ b/mcp/patches/0014-reclass.storage.node-Merge-duplicate-nodes.patch
@@ -0,0 +1,44 @@
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+: Copyright (c) 2017 Mirantis Inc., Enea AB and others.
+:
+: All rights reserved. This program and the accompanying materials
+: are made available under the terms of the Apache License, Version 2.0
+: which accompanies this distribution, and is available at
+: http://www.apache.org/licenses/LICENSE-2.0
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Sun, 03 Dec 2017 22:03:01 +0200
+Subject: [PATCH] reclass.storage.node: Merge duplicate nodes
+
+Reclass does not support duplicate nodes in top pillar, so merge all
+nodes with the same name into a single node, inheriting classes from
+all instances.
+
+This allows using multiple "system.reclass.storage.system.*_cluster"
+classes for the same node, based on re-using the name (hostname).
+
+NOTE: defaults.merge module does not merge lists (e.g. for classes),
+so handle that case separately.
+
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+
+diff --git a/reclass/storage/node.sls b/reclass/storage/node.sls
+--- a/reclass/storage/node.sls
++++ b/reclass/storage/node.sls
+@@ -1,7 +1,15 @@
+ {%- from "reclass/map.jinja" import storage with context %}
+ {%- if storage.enabled %}
+
++{%- set storage_by_name = {} %}
+ {%- for node_name, node in storage.get('node', {}).iteritems() %}
++{%- set new_node_name = node.get('name', node_name) %}
++{%- set new_node = storage_by_name.get(new_node_name, {'classes': []}) %}
++{%- do salt['defaults.merge'](node, {'classes': new_node.classes + node.classes}) %}
++{%- do salt['defaults.merge'](storage_by_name, {new_node_name: node}) %}
++{%- endfor %}
++
++{%- for node_name, node in storage_by_name.iteritems() %}
+
+ {%- if node.repeat is defined %}
+
diff --git a/mcp/patches/patch.sh b/mcp/patches/patch.sh
index 1da3bc597..bb48dcd07 100755
--- a/mcp/patches/patch.sh
+++ b/mcp/patches/patch.sh
@@ -11,10 +11,9 @@ CI_DEBUG=${CI_DEBUG:-0}; [[ "${CI_DEBUG}" =~ (false|0) ]] || set -x
if [ -r "$1" ]; then
while IFS=': ' read -r p_dest p_file; do
- if [[ ! "${p_dest}" =~ '^#' ]] && [[ "${p_dest}" =~ $2 ]] && \
- ! patch --dry-run -Rd "${p_dest}" -r - -s -p1 < \
- "/root/fuel/mcp/patches/${p_file}" > /dev/null; then
- patch -d "${p_dest}" -p1 < "/root/fuel/mcp/patches/${p_file}"
+ if ! patch --dry-run -Rd "${p_dest}" -r - -s -p1 < \
+ "/root/fuel/mcp/patches/${p_file}" > /dev/null; then
+ patch -d "${p_dest}" -p1 < "/root/fuel/mcp/patches/${p_file}"
fi
- done < "$1"
+ done < <(grep -vE '^#' "${1}" | grep -E "^.*${2}.*: ")
fi
diff --git a/mcp/patches/patches.list b/mcp/patches/patches.list
index 2eb45b272..703bd0587 100644
--- a/mcp/patches/patches.list
+++ b/mcp/patches/patches.list
@@ -16,5 +16,6 @@
/usr/share/salt-formulas/env: 0009-controller-Use-keystoneclient-to-check-project-ID.patch
/usr/share/salt-formulas/env: 0010-maas-region-allow-timeout-override.patch
/usr/share/salt-formulas/env: 0011-system.repo-Debian-Add-keyserver-proxy-support.patch
+/usr/share/salt-formulas/env: 0011-routes-Skip-network-restart-on-noifupdown.patch
/usr/share/salt-formulas/env: 0012-linux.storage.lvm-Disable-filter.patch
/usr/share/salt-formulas/env: 0013-dpdk-Support-ovs-bridge-tagging.patch
diff --git a/mcp/patches/patches_init.list b/mcp/patches/patches_init.list
new file mode 100644
index 000000000..94488cf9a
--- /dev/null
+++ b/mcp/patches/patches_init.list
@@ -0,0 +1,8 @@
+##############################################################################
+# Copyright (c) 2017 Mirantis Inc., Enea AB and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+/usr/share/salt-formulas/env: 0014-reclass.storage.node-Merge-duplicate-nodes.patch
diff --git a/mcp/patches/scripts/0002-salt-master-init.sh-Apply-OPNFV-Fuel-patches.patch b/mcp/patches/scripts/0002-salt-master-init.sh-Apply-OPNFV-Fuel-patches.patch
new file mode 100644
index 000000000..978815020
--- /dev/null
+++ b/mcp/patches/scripts/0002-salt-master-init.sh-Apply-OPNFV-Fuel-patches.patch
@@ -0,0 +1,35 @@
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+: Copyright (c) 2017 Mirantis Inc., Enea AB and others.
+:
+: All rights reserved. This program and the accompanying materials
+: are made available under the terms of the Apache License, Version 2.0
+: which accompanies this distribution, and is available at
+: http://www.apache.org/licenses/LICENSE-2.0
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Fri, 8 Dec 2017 20:30:46 +0100
+Subject: [PATCH] salt-master-init.sh: Apply OPNFV Fuel patches
+
+Some of Fuel@OPNFV patches need to be applied before the reclass
+storage.node state is ran for Salt Master, i.e. between installing
+salt-formula-* packages and configuring the Salt Master salt services.
+
+JIRA: FUEL-310
+
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+ salt-master-init.sh | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/salt-master-init.sh b/salt-master-init.sh
+index 343324c..a4ec138 100755
+--- a/salt-master-init.sh
++++ b/salt-master-init.sh
+@@ -284,6 +284,7 @@ options
+ system_config
+
+ saltmaster_bootstrap &&\
++ /root/fuel/mcp/patches/patch.sh /root/fuel/mcp/patches/patches_init.list formulas &&\
+ saltmaster_init &&\
+
+ verify_salt_minions