From cac473a0767f6b9beacef4a15db828cc3c22e8ea Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Mon, 17 Oct 2016 21:23:58 +0000 Subject: [PATCH] now that we have multiple keepaliveds use different router ids --- inventory/host_vars/db-koji01.stg.phx2.fedoraproject.org | 1 + inventory/host_vars/db-koji02.stg.phx2.fedoraproject.org | 2 ++ inventory/host_vars/koji01.phx2.fedoraproject.org | 1 + inventory/host_vars/koji02.phx2.fedoraproject.org | 1 + inventory/host_vars/pgbdr01.stg.phx2.fedoraproject.org | 1 + inventory/host_vars/pgbdr02.stg.phx2.fedoraproject.org | 2 ++ roles/keepalived/templates/keepalived.conf.j2 | 2 +- 7 files changed, 9 insertions(+), 1 deletion(-) diff --git a/inventory/host_vars/db-koji01.stg.phx2.fedoraproject.org b/inventory/host_vars/db-koji01.stg.phx2.fedoraproject.org index 2651545112..4141fb60fa 100644 --- a/inventory/host_vars/db-koji01.stg.phx2.fedoraproject.org +++ b/inventory/host_vars/db-koji01.stg.phx2.fedoraproject.org @@ -47,3 +47,4 @@ effective_cache_size: "24GB" keepalived_interface: eth0 keepalived_priority: 100 keepalived_ipaddress: 10.5.126.190/24 +keepalived_routerid: 18 diff --git a/inventory/host_vars/db-koji02.stg.phx2.fedoraproject.org b/inventory/host_vars/db-koji02.stg.phx2.fedoraproject.org index d1a7ae9bea..07e863bd1d 100644 --- a/inventory/host_vars/db-koji02.stg.phx2.fedoraproject.org +++ b/inventory/host_vars/db-koji02.stg.phx2.fedoraproject.org @@ -47,3 +47,5 @@ effective_cache_size: "24GB" keepalived_interface: eth0 keepalived_priority: 50 keepalived_ipaddress: 10.5.126.190/24 +keepalived_routerid: 18 + diff --git a/inventory/host_vars/koji01.phx2.fedoraproject.org b/inventory/host_vars/koji01.phx2.fedoraproject.org index a5c37932d1..343db63f29 100644 --- a/inventory/host_vars/koji01.phx2.fedoraproject.org +++ b/inventory/host_vars/koji01.phx2.fedoraproject.org @@ -14,6 +14,7 @@ datacenter: phx2 keepalived_interface: eth0 keepalived_priority: 100 keepalived_ipaddress: 10.5.125.63/24 +keepalived_routerid: 17 nrpe_procs_warn: 900 nrpe_procs_crit: 1000 diff --git a/inventory/host_vars/koji02.phx2.fedoraproject.org b/inventory/host_vars/koji02.phx2.fedoraproject.org index fa275cf0f3..7042a72df0 100644 --- a/inventory/host_vars/koji02.phx2.fedoraproject.org +++ b/inventory/host_vars/koji02.phx2.fedoraproject.org @@ -14,6 +14,7 @@ datacenter: phx2 keepalived_interface: eth0 keepalived_priority: 50 keepalived_ipaddress: 10.5.125.63/24 +keepalived_routerid: 17 nrpe_procs_warn: 900 nrpe_procs_crit: 1000 diff --git a/inventory/host_vars/pgbdr01.stg.phx2.fedoraproject.org b/inventory/host_vars/pgbdr01.stg.phx2.fedoraproject.org index 4fd67f7c38..1ba913001f 100644 --- a/inventory/host_vars/pgbdr01.stg.phx2.fedoraproject.org +++ b/inventory/host_vars/pgbdr01.stg.phx2.fedoraproject.org @@ -48,3 +48,4 @@ effective_cache_size: "24GB" keepalived_interface: eth0 keepalived_priority: 100 keepalived_ipaddress: 10.5.126.193/24 +keepalived_routerid: 19 diff --git a/inventory/host_vars/pgbdr02.stg.phx2.fedoraproject.org b/inventory/host_vars/pgbdr02.stg.phx2.fedoraproject.org index 3ff53944ec..c4d092ed57 100644 --- a/inventory/host_vars/pgbdr02.stg.phx2.fedoraproject.org +++ b/inventory/host_vars/pgbdr02.stg.phx2.fedoraproject.org @@ -48,3 +48,5 @@ effective_cache_size: "24GB" keepalived_interface: eth0 keepalived_priority: 50 keepalived_ipaddress: 10.5.126.193/24 +keepalived_routerid: 19 + diff --git a/roles/keepalived/templates/keepalived.conf.j2 b/roles/keepalived/templates/keepalived.conf.j2 index aca31d291b..be8153205f 100644 --- a/roles/keepalived/templates/keepalived.conf.j2 +++ b/roles/keepalived/templates/keepalived.conf.j2 @@ -13,7 +13,7 @@ vrrp_instance VI_1 { interface {{ keepalived_interface }} # arbitary unique number 0..255 # used to differentiate multiple instances of vrrpd - virtual_router_id 17 + virtual_router_id {{ keepalived_routerid }} # for electing MASTER, highest priority wins. # to be MASTER, make 50 more than other machines. priority {{ keepalived_priority }}