From f4385e9a3cde9a4d8497a86de85112d8271491ec Mon Sep 17 00:00:00 2001 From: Alexander Lutay Date: Thu, 22 Aug 2019 16:05:04 +0200 Subject: [PATCH] TT#63466 TT#26264 Fix janus.service check test on PRO Update condition when is should be running accordingly to the current login in ngcp-service template: >> /etc/ngcp-config/templates/etc/ngcp-service/nsservices.yml.tt2 > ... > enable: [% (janus.enable == 'yes' || (rtcengine.conference.enable == 'yes' && rtcengine.conference.type == 'janus')) ? 'yes' : 'no' %] Otherwise PRO system upgraded from mr6.5 to mr7.5 doesn't pass testing: > Service: janus.service: running: doesn't match, expect: [false] found: [true] > Process: janus: running: doesn't match, expect: [false] found: [true] > root@sp1:~# ngcpcfg values janus.enable > no > root@sp1:~# ngcpcfg values rtcengine.conference.enable > yes > root@sp1:~# ngcpcfg values rtcengine.conference.type > janus > root@sp1:~# So, test should be corrected here. Change-Id: If087da14763f2016a18c5e00cf81582f93d4e1a6 --- templates/411_process-ngcp-pro.yaml.tt2 | 2 +- templates/510_init-daemons-ngcp.yaml.tt2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/411_process-ngcp-pro.yaml.tt2 b/templates/411_process-ngcp-pro.yaml.tt2 index 306544c..45bc2cd 100644 --- a/templates/411_process-ngcp-pro.yaml.tt2 +++ b/templates/411_process-ngcp-pro.yaml.tt2 @@ -46,7 +46,7 @@ process: running: true janus: - running: [% janus.enable == "yes" && node_state == 'active' ? 'true' : 'false' %] + running: [% (node_state == 'active' && (janus.enable == 'yes' || (rtcengine.conference.enable == 'yes' && rtcengine.conference.type == 'janus'))) ? 'true' : 'false' %] command: "pgrep -c -n -f '[r]tcengine.js'": diff --git a/templates/510_init-daemons-ngcp.yaml.tt2 b/templates/510_init-daemons-ngcp.yaml.tt2 index 24cf151..0a6421d 100644 --- a/templates/510_init-daemons-ngcp.yaml.tt2 +++ b/templates/510_init-daemons-ngcp.yaml.tt2 @@ -141,7 +141,7 @@ service: janus.service: enabled: false - running: [% node_state == 'active' && janus.enable == "yes" && general.ngcp_type != 'spce' ? 'true' : 'false' %] + running: [% (node_state == 'active' && general.ngcp_type != 'spce' && (janus.enable == 'yes' || (rtcengine.conference.enable == 'yes' && rtcengine.conference.type == 'janus'))) ? 'true' : 'false' %] monit.service: enabled: [% general.process_handler == 'monit' ? 'true' : 'false' %]