Commit 07439e2e authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

software/kvm: fix netconfig.sh and ipv6_config.sh scripts

When adding a route to an interface not up yet, "ip route" command fails
with:

Error: Device for nexthop is not up.

So we need to up the device before adding the routes.
parent 3836a13f
......@@ -19,7 +19,7 @@ md5sum = 087f226ba90928dcc5a722d7008c867a
[template-kvm]
filename = instance-kvm.cfg.jinja2
md5sum = 14b5ec1ee15c8d108c67cc3e9d87e6a6
md5sum = b260fce887535fc69a259d1fd31af1b2
[template-kvm-cluster]
filename = instance-kvm-cluster.cfg.jinja2.in
......
......@@ -901,9 +901,9 @@ command =
ip a | grep eth0: && [ \$IFACE = ens3 ] && IFACE=eth0
ip a | grep eth1: && [ \$IFACE = ens4 ] && IFACE=eth1
${:ipv4-add-address}
${:ipv4-set-link-up}
${:ipv4-add-gateway-route}
${:ipv4-add-default-route}
${:ipv4-set-link-up}
EOF
update-command = ${:command}
{% endif -%}
......@@ -922,8 +922,8 @@ command =
#!/bin/sh
IFACE={{ iface }}
${:ipv6-add-address}
${:ipv6-add-default-route}
${:ipv6-set-link-up}
${:ipv6-add-default-route}
EOF
update-command = ${:command}
{% endif -%}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment