aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Stransky <jistr@redhat.com>2016-09-02 15:18:00 +0200
committerJiri Stransky <jistr@redhat.com>2016-09-02 17:36:51 +0200
commit16b2c0ab0e27d1fdbfe06424c4e67f78dfc161d1 (patch)
treee6d2a2a6448163b089630c065c16bada789274f7
parent04b85b81a659421d2dd13a67dcc151a46751ffc4 (diff)
Manage Redis VIP when deploying with keepalived
Previously we weren't creating Redis VIP in keepalived, causing Redis to be unusable in non-HA deployments. Change-Id: I0bb37f6fb3eed022288b2dcfc7a88e8ff88a7ace Related-Bug: #1618510
-rw-r--r--manifests/keepalived.pp18
1 files changed, 18 insertions, 0 deletions
diff --git a/manifests/keepalived.pp b/manifests/keepalived.pp
index 45d772e..c0fb3ef 100644
--- a/manifests/keepalived.pp
+++ b/manifests/keepalived.pp
@@ -54,6 +54,11 @@
# A string.
# Defaults to false
#
+# [*redis_virtual_ip*]
+# Virtual IP on the redis service.
+# A string.
+# Defaults to false
+#
class tripleo::keepalived (
$controller_virtual_ip,
$control_virtual_interface,
@@ -62,6 +67,7 @@ class tripleo::keepalived (
$internal_api_virtual_ip = false,
$storage_virtual_ip = false,
$storage_mgmt_virtual_ip = false,
+ $redis_virtual_ip = false,
) {
case $::osfamily {
@@ -141,4 +147,16 @@ class tripleo::keepalived (
}
}
+ if $redis_virtual_ip and $redis_virtual_ip != $controller_virtual_ip {
+ $redis_virtual_interface = interface_for_ip($redis_virtual_ip)
+ # KEEPALIVE STORAGE MANAGEMENT NETWORK
+ keepalived::instance { '56':
+ interface => $redis_virtual_interface,
+ virtual_ips => [join([$redis_virtual_ip, ' dev ', $redis_virtual_interface])],
+ state => 'MASTER',
+ track_script => ['haproxy'],
+ priority => 101,
+ }
+ }
+
}