summaryrefslogtreecommitdiffstats
path: root/mcp/patches/0012-routes-Skip-network-restart-on-noifupdown.patch
blob: fb42512ea30ba71afd55e9a2f6a49a2ea8ca86d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

@media only all and (prefers-color-scheme: dark) {
.highlight .hll { background-color: #49483e }
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .ch { color: #75715e } /* Comment.Hashbang */
.highlight .cm { color: #75715e } /* Comment.Multiline */
.highlight
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
: 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 <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 %}