From 9a2bc65fcf9906e0e2df6496981410450039e5f7 Mon Sep 17 00:00:00 2001 From: Kirill Solomko Date: Thu, 25 Nov 2021 13:11:44 +0100 Subject: [PATCH] TT#152101 replace comx fileshare service with ngcp-rest-api * comx fileshare service is deprecated and should no longer be checked for its running state * add ngcp-rest-api to the running state checks Change-Id: Id461c280fe4e9d0d0b5700ee8e12fbdcc6467506 (cherry picked from commit 80696a33baaefd433c976c08da8e5be83f5f0bf5) --- templates/135_filesys-logfiles.yaml.tt2 | 2 +- templates/411_process-ngcp-pro.yaml.tt2 | 14 ++++---------- templates/510_init-daemons-ngcp.yaml.tt2 | 6 +++--- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/templates/135_filesys-logfiles.yaml.tt2 b/templates/135_filesys-logfiles.yaml.tt2 index 87e0f64..d9d0091 100644 --- a/templates/135_filesys-logfiles.yaml.tt2 +++ b/templates/135_filesys-logfiles.yaml.tt2 @@ -108,7 +108,7 @@ command: # optionally existing subdirectories -[% FOR dir IN ['/var/log/ngcp/ngcp-rtcengine/', '/var/log/ngcp/ngcp-comx-fileshare-service/'] -%] +[% FOR dir IN ['/var/log/ngcp/ngcp-rtcengine/' -%] "if test -e [% dir %]; then find [% dir %] -maxdepth 1 -type f -size +0 -perm /o+rwx; fi": exit-status: 0 stdout: diff --git a/templates/411_process-ngcp-pro.yaml.tt2 b/templates/411_process-ngcp-pro.yaml.tt2 index 6aeb256..7b697b4 100644 --- a/templates/411_process-ngcp-pro.yaml.tt2 +++ b/templates/411_process-ngcp-pro.yaml.tt2 @@ -1,6 +1,7 @@ [% hostname = ngcp.get_hostname(); + is_mgmt = ngcp.has_role(hostname, 'mgmt'); is_proxy = ngcp.has_role(hostname, 'proxy'); is_lb = ngcp.has_role(hostname, 'lb'); is_rtp = ngcp.has_role(hostname, 'rtp'); @@ -60,6 +61,9 @@ process: ngcp-faxserver: running: {{if and [% is_proxy ? 1 : 0 %] .Vars.NODE_ACTIVE}} true {{else}} false {{end}} + ngcp-rest-api: + running: [% is_mgmt && rest_api.enable == 'yes' ? 'true' : 'false' %] + ngcp-snmp-agent: running: true @@ -88,13 +92,3 @@ command: stdout: [] {{end}} stderr: [] - - "pgrep -c -n -f '[c]omx-fileshare.js'": -{{if and [% is_proxy && fileshare.enable == "yes" ? 1 : 0 %] .Vars.NODE_ACTIVE}} - exit-status: 0 - stdout: - - "1" -{{else}} - exit-status: 1 - stdout: [] -{{end}} diff --git a/templates/510_init-daemons-ngcp.yaml.tt2 b/templates/510_init-daemons-ngcp.yaml.tt2 index fa6f436..cc1fa93 100644 --- a/templates/510_init-daemons-ngcp.yaml.tt2 +++ b/templates/510_init-daemons-ngcp.yaml.tt2 @@ -137,9 +137,9 @@ service: enabled: false running: {{if and [% is_proxy && rtcengine.enable == "yes" && general.ngcp_type != 'spce' ? 1 : 0 %] .Vars.NODE_ACTIVE}} true {{else}} false {{end}} - ngcp-comx-fileshare-service.service: - enabled: false - running: {{if and [% is_proxy && fileshare.enable == "yes" && general.ngcp_type != 'spce' ? 1 : 0 %] .Vars.NODE_ACTIVE}} true {{else}} false {{end}} + ngcp-rest-api.service: + enabled: [% is_mgmt && rest_api.enable == 'yes' ? 'true' : 'false' %] + running: [% is_mgmt && rest_api.enable == 'yes' ? 'true' : 'false' %] janus.service: enabled: false