BiBiServ / bibigrid

BiBiGrid is a tool for an easy cluster setup inside a cloud environment.
Apache License 2.0
11 stars 8 forks source link

Persists host routes entries (Hybrid Cloud worker) #391

Closed jkrue closed 1 year ago

jkrue commented 1 year ago

Currently, host routes are set by cloud-init using a modified user-data configuration for each hybrid cloud worker node.

#cloud-config:
bootcmd:
  - /usr/bin/ip route add 10.0.0.0/24 via 192.168.78.1 dev ens3

This works unless system-networkd is not restarted (e.g. as a result of a system update or reboot).

(needed for #388 )

jkrue commented 1 year ago

OpenStack allows adding host routes for a subnet, which are then distributed via DHCP. This would be a suitable solution if only one Hybrid-Cloud BiBiGrid is run within a (sub-) network.

jkrue commented 1 year ago

If adding host routes to a subnet isn't a possible solution, e.g. if running several Multi-Cloud setups on a single subnet, we can think about adding a network section to the provided user-data configuration.

https://cloudinit.readthedocs.io/en/22.3/topics/network-config.html#

However, after several attempts, it seems that a network configuration using user data isn't supported.

jkrue commented 1 year ago

Another solution for our problem could be to create a system-network configuration as drop-in (e.g. /etc/systemd/network/hostroutes.network ).

[Match]
Name=*

[Route]
Destination=10.0.0.0/24
Gateway=192.168.78.1
Metric=5
GatewayOnLink=True
jkrue commented 1 year ago

@XaverStiensmeier and I decided to implement the above-mentioned drop-in solution.