Commit 2be17561 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

playbook/vm-bootstrap: run /etc/opt/netconfig.sh twice

For KVM version < 1.0.220, the script /etc/opt/netconfig.sh is doing:

1) add address on IFACE
2) add routes going through IFACE
3) set IFACE up

But we can't add routes to an interface which is down. So call the
script twice so that the routes are really added during the second run.

The fix for KVM can be found at nexedi/slapos@07439e2e
parent 354e3593
......@@ -17,13 +17,13 @@
- name: create cronjob for netconfig.sh at boot time
cron:
name: "call netconfig.sh at reboot"
name: "call netconfig.sh at reboot (need to be called twice to work, until https://lab.nexedi.com/nexedi/slapos/commit/07439e2e6a8c39430d5be84ff3d77d2aae4d99c6 is used)"
special_time: reboot
job: "/etc/opt/netconfig.sh"
job: "/etc/opt/netconfig.sh ; /etc/opt/netconfig.sh"
when: netconfig_file.stat.exists == True
- name: call netconfig.sh
command: /etc/opt/netconfig.sh
command: /etc/opt/netconfig.sh ; /etc/opt/netconfig.sh
when: netconfig_file.stat.exists == True
ignore_errors: True
......
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