TT#79100 Add corosync/pacemaker support

This conditionalizes the heartbeat checks and adds corosync/pacemaker
checks.

Change-Id: I379716f2eb6d87a04de345f1645be16e48f8d142
mr9.1
Guillem Jover 5 years ago
parent 4cd3d9bb9f
commit 2947010649

@ -13,10 +13,40 @@ process:
# We have to use a truncated process name because that's the COMM limit
# on Linux (15 characters).
ngcp-hb-watchdo:
running: true
running: [% ha.gcs == 'heartbeat-2' || ha.crm == 'heartbeat-2' && heartbeat.hb_watchdog.enable == 'yes' ? 'true' : 'false' %]
heartbeat:
running: true
running: [% ha.gcs == 'heartbeat-2' || ha.crm == 'heartbeat-2' ? 'true' : 'false' %]
corosync:
running: [% ha.gcs == 'corosync' ? 'true' : 'false' %]
pacemakerd:
running: [% ha.crm == 'pacemaker' ? 'true' : 'false' %]
pacemaker-based:
running: [% ha.crm == 'pacemaker' ? 'true' : 'false' %]
# We have to use a truncated process name because that's the COMM limit
# on Linux (15 characters).
pacemaker-fence:
running: [% ha.crm == 'pacemaker' ? 'true' : 'false' %]
pacemaker-execd:
running: [% ha.crm == 'pacemaker' ? 'true' : 'false' %]
pacemaker-attrd:
running: [% ha.crm == 'pacemaker' ? 'true' : 'false' %]
# We have to use a truncated process name because that's the COMM limit
# on Linux (15 characters).
pacemaker-sched:
running: [% ha.crm == 'pacemaker' ? 'true' : 'false' %]
# We have to use a truncated process name because that's the COMM limit
# on Linux (15 characters).
pacemaker-contr:
running: [% ha.crm == 'pacemaker' ? 'true' : 'false' %]
influxdb-relay:
running: true

@ -15,6 +15,10 @@ service:
enabled: [% general.process_handler == 'none' && asterisk.enable == "yes" ? 'true' : 'false' %]
running: {{if and [% is_proxy && asterisk.enable == "yes" ? 1 : 0 %] .Vars.NODE_ACTIVE}} true {{else}} false {{end}}
corosync:
enabled: [% ha.gcs == 'corosync' ? 'true' : 'false' %]
running: [% ha.gcs == 'corosync' ? 'true' : 'false' %]
coturn.service:
enabled: [% is_rtp && turnserver.enable == 'yes' ? 'true' : 'false' %]
running: [% is_rtp && turnserver.enable == 'yes' ? 'true' : 'false' %]
@ -28,8 +32,8 @@ service:
running: [% is_lb && haproxy.enable == "yes" && general.ngcp_type == 'carrier' ? 'true' : 'false' %]
ngcp-hb-watchdog.service:
enabled: [% heartbeat.hb_watchdog.enable == 'yes' ? 'true' : 'false' %]
running: [% heartbeat.hb_watchdog.enable == 'yes' ? 'true' : 'false' %]
enabled: [% ha.gcs == 'heartbeat-2' || ha.crm == 'heartbeat-2' && heartbeat.hb_watchdog.enable == 'yes' ? 'true' : 'false' %]
running: [% ha.gcs == 'heartbeat-2' || ha.crm == 'heartbeat-2' && heartbeat.hb_watchdog.enable == 'yes' ? 'true' : 'false' %]
kamailio-lb.service:
enabled: [% general.process_handler == 'none' && kamailio.lb.start == "yes" ? 'true' : 'false' %]
@ -75,6 +79,10 @@ service:
enabled: [% (is_mgmt || is_lb || is_li_dist) && nginx.enable == 'yes' ? 'true' : 'false' %]
running: [% (is_mgmt || is_lb || is_li_dist) && nginx.enable == 'yes' ? 'true' : 'false' %]
pacemaker.service:
enabled: [% ha.crm == 'pacemaker' ? 'true' : 'false' %]
running: [% ha.crm == 'pacemaker' ? 'true' : 'false' %]
prosody.service:
enabled: [% general.process_handler == 'none' && prosody.enable == 'yes' ? 'true' : 'false' %]
running: {{if and [% is_proxy && prosody.enable == "yes" ? 1 : 0 %] .Vars.NODE_ACTIVE}} true {{else}} false {{end}}
@ -143,7 +151,7 @@ service:
[% IF general.ngcp_type != 'spce' -%]
heartbeat.service:
enabled: true
running: true
enabled: [% ha.gcs == 'heartbeat-2' || ha.crm == 'heartbeat-2' ? 'true' : 'false' %]
running: [% ha.gcs == 'heartbeat-2' || ha.crm == 'heartbeat-2' ? 'true' : 'false' %]
[% END -%]

@ -1,3 +1,12 @@
[%
hostname = ngcp.get_hostname();
peername = ngcp.get_peername(hostname);
argv.type = 'ha_int';
argv.host = hostname;
PROCESS '/usr/lib/ngcp-ngcpcfg/get_iface';
host_ha_iface = out;
-%]
port:
# Monit
tcp:2812:
@ -14,7 +23,12 @@ port:
listening: true
ip: ["127.0.0.1"]
# Corosync
udp:5405:
listening: [% ha.gcs == 'corosync' ? 'true' : 'false' %]
ip: ["[% hosts.$hostname.$host_ha_iface.ip %]"]
# Heartbeat
udp:[% heartbeat.port ? heartbeat.port : '694' %]:
listening: true
listening: [% ha.gcs == 'heartbeat-2' || ha.crm == 'heartbeat-2' ? 'true' : 'false' %]
ip: ["0.0.0.0"]

Loading…
Cancel
Save