Page MenuHomeDevCentral

D3109.id7936.diff
No OneTemporary

D3109.id7936.diff

diff --git a/pillar/nodes/nodes.sls b/pillar/nodes/nodes.sls
--- a/pillar/nodes/nodes.sls
+++ b/pillar/nodes/nodes.sls
@@ -222,6 +222,9 @@
gateway: 2001:41d0:303:d9ff:ff:ff:ff:ff
prefix: 64
+ fixes:
+ hello_ipv6_ovh: True
+
ysul:
forest: nasqueron-dev
hostname: ysul.nasqueron.org
diff --git a/roles/core/network/files/FreeBSD/hello-ipv6.cron b/roles/core/network/files/FreeBSD/hello-ipv6.cron
new file mode 100644
--- /dev/null
+++ b/roles/core/network/files/FreeBSD/hello-ipv6.cron
@@ -0,0 +1,24 @@
+# -------------------------------------------------------------
+# Cron :: hello IPv6
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# Source file: roles/core/network/files/FreeBSD/hello-ipv6.cron
+# Description: OVH network doesn't send a lot of RA. If we use
+# IPv6, for example by sending a packet outside,
+# a route is advertised for a few minutes.
+# This cron allows continuous access from world.
+# -------------------------------------------------------------
+#
+# <auto-generated>
+# This file is managed by our rOPS SaltStack repository.
+#
+# Changes to this file may cause incorrect behavior
+# and will be lost if the state is redeployed.
+# </auto-generated>
+
+SHELL=/bin/sh
+PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
+REMOTE_ENDPOINT=ipv6.google.com
+
+*/5 * * * * root ping -c 5 $REMOTE_ENDPOINT > /dev/null
diff --git a/roles/core/network/ipv6.sls b/roles/core/network/ipv6.sls
--- a/roles/core/network/ipv6.sls
+++ b/roles/core/network/ipv6.sls
@@ -19,6 +19,7 @@
{% from "map.jinja" import dirs with context %}
{% set network = salt['node.get']('network') %}
+{% set fixes = salt['pillar.get']('nodes:' + grains["id"] + ":fixes", {}) %}
# -------------------------------------------------------------
# Native IPv6
@@ -89,3 +90,24 @@
{% endif %}
{% endif %}
+
+# -------------------------------------------------------------
+# Routes - IPv6 fix for OVH
+#
+# OVH network doesn't announce an IPv6 route for a VM at first.
+# If from the VM, we reach another network, the route is then
+# announced for a while, before being dropped.
+#
+# To workaround that behavior, solution is to ping regularly
+# an external site so packets reach OVH router and a route is
+# announced.
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{% if fixes.get("hello_ipv6_ovh", False) %}
+
+/usr/local/etc/cron.d/hello-ipv6:
+ file.managed:
+ - source: salt://roles/core/network/files/FreeBSD/hello-ipv6.cron
+ - makedirs: True
+
+{% endif %}

File Metadata

Mime Type
text/plain
Expires
Sun, Oct 27, 15:39 (22 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2216242
Default Alt Text
D3109.id7936.diff (2 KB)

Event Timeline