summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-01-26 13:33:45 +0000
committerGerrit Code Review <review@openstack.org>2017-01-26 13:33:45 +0000
commit3de59329187bbe056b088d30ae6032d1b11833cf (patch)
tree3e83456ca865465c1780964fabbfd0bf5e577795
parenta1e1640f0fd235d2ab9a08c420d48fe47146d8c9 (diff)
parent51ed5351f7e729ffab69f8543b9bbe4e8e4d5d9e (diff)
Merge "[keepalived] fix netmask for vip"
-rw-r--r--manifests/keepalived.pp28
1 files changed, 24 insertions, 4 deletions
diff --git a/manifests/keepalived.pp b/manifests/keepalived.pp
index 0e9262d..a6d5832 100644
--- a/manifests/keepalived.pp
+++ b/manifests/keepalived.pp
@@ -113,10 +113,15 @@ class tripleo::keepalived (
if $internal_api_virtual_ip and $internal_api_virtual_ip != $controller_virtual_ip {
$internal_api_virtual_interface = interface_for_ip($internal_api_virtual_ip)
+ if is_ipv6_address($internal_api_virtual_ip) {
+ $internal_api_virtual_netmask = '64'
+ } else {
+ $internal_api_virtual_netmask = '32'
+ }
# KEEPALIVE INTERNAL API NETWORK
keepalived::instance { '53':
interface => $internal_api_virtual_interface,
- virtual_ips => [join([$internal_api_virtual_ip, ' dev ', $internal_api_virtual_interface])],
+ virtual_ips => [join(["${internal_api_virtual_ip}/${internal_api_virtual_netmask}", ' dev ', $internal_api_virtual_interface])],
state => 'MASTER',
track_script => ['haproxy'],
priority => 101,
@@ -125,10 +130,15 @@ class tripleo::keepalived (
if $storage_virtual_ip and $storage_virtual_ip != $controller_virtual_ip {
$storage_virtual_interface = interface_for_ip($storage_virtual_ip)
+ if is_ipv6_address($storage_virtual_ip) {
+ $storage_virtual_netmask = '64'
+ } else {
+ $storage_virtual_netmask = '32'
+ }
# KEEPALIVE STORAGE NETWORK
keepalived::instance { '54':
interface => $storage_virtual_interface,
- virtual_ips => [join([$storage_virtual_ip, ' dev ', $storage_virtual_interface])],
+ virtual_ips => [join(["${storage_virtual_ip}/${storage_virtual_netmask}", ' dev ', $storage_virtual_interface])],
state => 'MASTER',
track_script => ['haproxy'],
priority => 101,
@@ -137,10 +147,15 @@ class tripleo::keepalived (
if $storage_mgmt_virtual_ip and $storage_mgmt_virtual_ip != $controller_virtual_ip {
$storage_mgmt_virtual_interface = interface_for_ip($storage_mgmt_virtual_ip)
+ if is_ipv6_address($storage_mgmt_virtual_ip) {
+ $storage_mgmt_virtual_netmask = '64'
+ } else {
+ $storage_mgmt_virtual_netmask = '32'
+ }
# KEEPALIVE STORAGE MANAGEMENT NETWORK
keepalived::instance { '55':
interface => $storage_mgmt_virtual_interface,
- virtual_ips => [join([$storage_mgmt_virtual_ip, ' dev ', $storage_mgmt_virtual_interface])],
+ virtual_ips => [join(["${storage_mgmt_virtual_ip}/${storage_mgmt_virtual_netmask}", ' dev ', $storage_mgmt_virtual_interface])],
state => 'MASTER',
track_script => ['haproxy'],
priority => 101,
@@ -149,10 +164,15 @@ class tripleo::keepalived (
if $redis_virtual_ip and $redis_virtual_ip != $controller_virtual_ip {
$redis_virtual_interface = interface_for_ip($redis_virtual_ip)
+ if is_ipv6_address($redis_virtual_ip) {
+ $redis_virtual_netmask = '64'
+ } else {
+ $redis_virtual_netmask = '32'
+ }
# KEEPALIVE STORAGE MANAGEMENT NETWORK
keepalived::instance { '56':
interface => $redis_virtual_interface,
- virtual_ips => [join([$redis_virtual_ip, ' dev ', $redis_virtual_interface])],
+ virtual_ips => [join(["${redis_virtual_ip}/${redis_virtual_netmask}", ' dev ', $redis_virtual_interface])],
state => 'MASTER',
track_script => ['haproxy'],
priority => 101,