summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Carter <kevin.carter@rackspace.com>2018-10-08 11:59:24 -0500
committerMohammed Naser <mnaser@vexxhost.com>2018-10-09 02:05:35 +0200
commitca24797261225e615e9e88745460649f32427983 (patch)
tree2a07596acc1e01b03484f9146dc7580c5b45da71
parent873ae46e821aee732f83e00b38b9cd3f98dd1939 (diff)
Correct host only routes
The host only route was adding the cidr twice which is wrong. This change adds the missing network filter to correct the issue. Change-Id: Ic280db301ce44b98ac35c8911999dec5fa263a29 Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
Notes
Notes (review): Code-Review+2: Mohammed Naser <mnaser@vexxhost.com> Workflow+1: Kevin Carter (cloudnull) <kevin@cloudnull.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 09 Oct 2018 03:42:43 +0000 Reviewed-on: https://review.openstack.org/608735 Project: openstack/openstack-ansible-nspawn_hosts Branch: refs/heads/master
-rw-r--r--tasks/nspawn_networking.yml2
1 files changed, 1 insertions, 1 deletions
diff --git a/tasks/nspawn_networking.yml b/tasks/nspawn_networking.yml
index b9c5bd6..30b5db7 100644
--- a/tasks/nspawn_networking.yml
+++ b/tasks/nspawn_networking.yml
@@ -106,7 +106,7 @@
106 {% elif (value.address is defined) and ((interface_data['ipv4'] | default({'address': none}))['address'] != value.address) and ((value.host_only | default(false)) | bool) %} 106 {% elif (value.address is defined) and ((interface_data['ipv4'] | default({'address': none}))['address'] != value.address) and ((value.host_only | default(false)) | bool) %}
107 {% set net_cidr = (value.address ~ '/' ~ (value.netmask | default('32'))) %} 107 {% set net_cidr = (value.address ~ '/' ~ (value.netmask | default('32'))) %}
108 {% set _ = start_commands.append('-/sbin/ip address add ' ~ net_cidr ~ ' dev ' ~ mv_interface ~ ' scope host noprefixroute') %} 108 {% set _ = start_commands.append('-/sbin/ip address add ' ~ net_cidr ~ ' dev ' ~ mv_interface ~ ' scope host noprefixroute') %}
109 {% set _ = start_commands.append('-/sbin/ip route add ' ~ net_cidr ~ '/' ~ (value.netmask | default('32')) ~ ' dev ' ~ mv_interface ~ ' metric 100 proto kernel scope link table local') %} 109 {% set _ = start_commands.append('-/sbin/ip route add ' ~ (net_cidr | ipaddr('network')) ~ '/' ~ (value.netmask | default('32')) ~ ' dev ' ~ mv_interface ~ ' metric 100 proto kernel scope link table local') %}
110 {%- endif %} 110 {%- endif %}
111 {%- endif %} 111 {%- endif %}
112 {%- endif %} 112 {%- endif %}