Make it possible to configure next hop for external VIP address
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kolla-ansible |
Invalid
|
Undecided
|
Unassigned |
Bug Description
For security reasons we all normally place our OpenStack cluster in internal networks that is not reachable from Internet. There is one exception and that is the external VIP address. I want to make it more flexible by making it possible to specify where next hop should be for outgoing default traffic from the external VIP address.
The patch adds keepalived features that create in the routing table a "default via xxx.xxx.xxx.xx dev xxxx.xxx" but adds a rule so it only applies to traffic from configured external VIP address.
It can be inspected with "ip rule list" and then "ip route list table xx". Simple!
== Example ==
Next hop wanted: 203.0.113.3
External VIP address: 203.0.113.22
External VIP interface. ens3f0.1435
Virtual router ID: 51
vrrp_instance kolla_internal_
state BACKUP
nopreempt
interface ens3f0.1438
virtual_
priority 2
advert_int 1
virtual_
}
virtual_routes {
203.0.113.3 scope link dev ens3f0.1435
default via 203.0.113.3 dev ens3f0.1435 table 51
}
virtual_rules {
from 203.0.113.22 table 51
}
track_interface {
ens3f0.1435
}
authentication {
auth_type PASS
auth_pass xxxxxxxxxxxxxxx
}
track_script {
check_alive
}
}
There is no subnets here so whatever is reachable and allowed by external router as external VIP address is usable. There should be no problem with IPv6 address when that feature comes.
--- kolla-orig/
+++ kolla-patched/
@@ -41,6 +41,18 @@
# internal and external requests between two VIPs.
#kolla_
+# Here you can specify next hop for default outgoing traffic from the external
+# VIP address. This is used if external VIP interface does not have a
+# default route or you want traffic to go against another external router.
+# Example use case is where external VIP interface has default route against a
+# router that can not handle public IP addresses but you have another router on
+# VIP interface that can. Or where external VIP interface has no previous
+# configuration or default route. For example if you configure external VIP
+# address to be "203.0.113.10" you can here configure that default outgoing
+# traffic should have next hop "192.0.2.3" or whatever external router IP
+# address that is reachable within external VIP interface.
+#kolla_
+
# The Public address used to communicate with OpenStack as set in the public_url
# for the endpoints that will be created. This DNS name should map to
# kolla_external_
--- kolla-orig/
+++ kolla-patched/
@@ -31,6 +31,15 @@
{{ kolla_external_
{% endif %}
}
+{% if haproxy_
+ virtual_routes {
+ {{ kolla_external_
+ default via {{ kolla_external_
+ }
+ virtual_rules {
+ from {{ kolla_external_
+ }
+{% endif %}
{% if haproxy_
track_
{{ kolla_external_
Changed in kolla-ansible: | |
status: | New → Invalid |
Hi Niklas, you can customise the keepalived configuration by placing a file in /etc/kolla/ config/ keepalived/ keepalived. conf. Just be sure to keep it in sync with the template in kolla-ansible when you upgrade.