From f0e4899778ed0dcac9d4a4b7202316bb73c52e0d Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 13 Dec 2022 15:30:58 +0100 Subject: [PATCH] MT#56187 Fix rate-o-mat service check The rate-o-mat service can run in active-active or in active-standby modes. If the service is enabled and on the proxy nodes, the former mode means the service will be enabled and running on both peers, the latter will mean it's in the traditional HA mode and thus only running on the active node. Change-Id: I020c8a00706135ed5d432bf8b1b8874cf1b2f532 (cherry picked from commit 6e46a9c67bebdb8db661946ce5ae1ab45cc4191a) (cherry picked from commit b33e2ac1f17d2a21fe08088251b8d1602a50fd38) --- templates/510_init-daemons-ngcp.yaml.tt2 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/510_init-daemons-ngcp.yaml.tt2 b/templates/510_init-daemons-ngcp.yaml.tt2 index a045763..cd112bc 100644 --- a/templates/510_init-daemons-ngcp.yaml.tt2 +++ b/templates/510_init-daemons-ngcp.yaml.tt2 @@ -56,8 +56,13 @@ service: running: [% is_mgmt && www_admin.enable == 'yes' ? 'true' : 'false' %] ngcp-rate-o-mat.service: +[% IF rateomat.ha_mode == 'active-active' -%] enabled: [% rateomat.enable == "yes" ? 'true' : 'false' %] running: [% is_proxy && rateomat.enable == "yes" ? 'true' : 'false' %] +[% ELSE -%] + enabled: false + running: {{if and [% is_proxy && rateomat.enable == "yes" ? 1 : 0 %] .Vars.NODE_ACTIVE}} true {{else}} false {{end}} +[% END -%] ngcp-rtpengine-recording-daemon.service: enabled: [% general.process_handler == 'none' && rtpengine.recording.enable == "yes" ? 'true' : 'false' %]