From a2062e5fd64a2737df44497bfcece7e804b7f5bf Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Mon, 26 Feb 2018 18:40:01 +0100 Subject: [patch] cleanup: Drop LVM filter disable Now we explicitly add a LVM PV on /dev/sda{1,2} for Cinder storage, so we can safely drop the patch disabling LVM volume filtering. If we later move the PV to a different disk, we can just add the VG and LV definitions to linux:storage via reclass, and Salt will skip setting them up (as they're already created by MaaS), yet keep the filtering sane. While at it, fix 'nova_cpu_pinning' param expr; constructs based on reclass interpolation (e.g. '${_param:x}') do not work when parameters are passed via reclass.storage templating, so change reclass interpolation syntax with classic YAML anchors. Fixes: 672ae12 Change-Id: Ieb41635ddeb630543d7e4d1079f45d636d9a43af Signed-off-by: Alexandru Avadanii --- ...routes-Skip-network-restart-on-noifupdown.patch | 37 ---------------------- .../0012-linux.storage.lvm-Disable-filter.patch | 35 -------------------- ...routes-Skip-network-restart-on-noifupdown.patch | 37 ++++++++++++++++++++++ mcp/patches/patches.list | 3 +- .../all-mcp-arch-common/infra/config_pdf.yml.j2 | 4 +-- mcp/scripts/pharos | 2 +- 6 files changed, 41 insertions(+), 77 deletions(-) delete mode 100644 mcp/patches/0011-routes-Skip-network-restart-on-noifupdown.patch delete mode 100644 mcp/patches/0012-linux.storage.lvm-Disable-filter.patch create mode 100644 mcp/patches/0012-routes-Skip-network-restart-on-noifupdown.patch diff --git a/mcp/patches/0011-routes-Skip-network-restart-on-noifupdown.patch b/mcp/patches/0011-routes-Skip-network-restart-on-noifupdown.patch deleted file mode 100644 index fb42512ea..000000000 --- a/mcp/patches/0011-routes-Skip-network-restart-on-noifupdown.patch +++ /dev/null @@ -1,37 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2018 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 -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 ---- - 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/0012-linux.storage.lvm-Disable-filter.patch b/mcp/patches/0012-linux.storage.lvm-Disable-filter.patch deleted file mode 100644 index 6e57afcff..000000000 --- a/mcp/patches/0012-linux.storage.lvm-Disable-filter.patch +++ /dev/null @@ -1,35 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2018 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 -Date: Sat, 18 Nov 2017 22:03:01 +0200 -Subject: [PATCH] linux.storage.lvm: Disable filter - -Due to upstream bug [1], mixing OS-managed LVM volumes with Cinder -LVM volumes leads to a broken filter value in lvm.conf. -Temporarily disable the filter (whitelisting all devices, similar -to no-Cinder use-cases) until upstream bug is fixed. - -[1] https://github.com/salt-formulas/salt-formula-linux/issues/127 - -Signed-off-by: Alexandru Avadanii ---- - -diff --git a/linux/files/lvm.conf b/linux/files/lvm.conf ---- a/linux/files/lvm.conf -+++ b/linux/files/lvm.conf -@@ -129,7 +129,8 @@ - # Example - # Accept every block device: - -- filter = [ {%- for vgname, vg in storage.lvm.iteritems() %}{%- if vg.get('enabled', True) %}{%- for dev in vg.devices %}"a|{{ dev }}*|"{%- if not loop.last %},{%- endif %}{%- endfor %}{%- endif %}{%- endfor %}, "r|.*|" ] -+ # NOTE(opnfv): https://github.com/salt-formulas/salt-formula-linux/issues/127 -+ # filter = [ {%- for vgname, vg in storage.lvm.iteritems() %}{%- if vg.get('enabled', True) %}{%- for dev in vg.devices %}"a|{{ dev }}*|"{%- if not loop.last %},{%- endif %}{%- endfor %}{%- endif %}{%- endfor %}, "r|.*|" ] - - # filter = [ "a|.*/|" ] - # Reject the cdrom drive: diff --git a/mcp/patches/0012-routes-Skip-network-restart-on-noifupdown.patch b/mcp/patches/0012-routes-Skip-network-restart-on-noifupdown.patch new file mode 100644 index 000000000..fb42512ea --- /dev/null +++ b/mcp/patches/0012-routes-Skip-network-restart-on-noifupdown.patch @@ -0,0 +1,37 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: Copyright (c) 2018 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 +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 +--- + 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/patches.list b/mcp/patches/patches.list index 30e2b0c36..22d5a7a7d 100644 --- a/mcp/patches/patches.list +++ b/mcp/patches/patches.list @@ -16,6 +16,5 @@ /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: 0012-routes-Skip-network-restart-on-noifupdown.patch /usr/share/salt-formulas/env: 0013-dpdk-Support-ovs-bridge-tagging.patch diff --git a/mcp/reclass/classes/cluster/all-mcp-arch-common/infra/config_pdf.yml.j2 b/mcp/reclass/classes/cluster/all-mcp-arch-common/infra/config_pdf.yml.j2 index 677f0c9a0..477c0957b 100644 --- a/mcp/reclass/classes/cluster/all-mcp-arch-common/infra/config_pdf.yml.j2 +++ b/mcp/reclass/classes/cluster/all-mcp-arch-common/infra/config_pdf.yml.j2 @@ -25,11 +25,11 @@ parameters: dummy_value: ~ {%- endif %} {%- else %} - nova_cpu_pinning: '"1,2,3,4,5,7,8,9,10,11"' + nova_cpu_pinning: &nova_cpu_pinning_common '"1,2,3,4,5,7,8,9,10,11"' compute_hugepages_size: 1G compute_hugepages_count: 16 compute_hugepages_mount: /mnt/hugepages_1G - compute_kernel_isolcpu: ${_param:nova_cpu_pinning} + compute_kernel_isolcpu: *nova_cpu_pinning_common {%- endif %} openstack_compute_node02: <<: *openstack_compute_node01 diff --git a/mcp/scripts/pharos b/mcp/scripts/pharos index 63e122a1d..82af64d58 160000 --- a/mcp/scripts/pharos +++ b/mcp/scripts/pharos @@ -1 +1 @@ -Subproject commit 63e122a1d0e7e4ca402353d331f44eda63d966c3 +Subproject commit 82af64d58ea61973146f563dfd5b974f832a00fc -- cgit 1.2.3-korg