MT#59591 Clarify «start» key usage

For services we use an «enable» key to select whether to enable or
disable a service. The «start» key is unusual and has already caused a
wrong usage in templates in the past. Rename them for uniformity with
the rest of the key naming conventions used.

For DHCP address ranges, namespace the «start» key (alongside «end» and
«lease» renamed from «expire») into a new addr_range map, so that it's
obvious this is not about starting the service, but about the
aforementioned address range setting.

Change-Id: Icff25a273358e69881cc54ccdd9be39a27c5c526
mr12.3
Guillem Jover 1 year ago
parent 3c3177ebc4
commit 5a8acbf105

@ -34,7 +34,7 @@ command:
stderr: []
"pgrep -n -f '[k]amailio.*kamailio.proxy.pid'":
{{if and [% is_proxy && kamailio.proxy.start == "yes" ? 1 : 0 %] .Vars.NODE_ACTIVE}}
{{if and [% is_proxy && kamailio.proxy.enable == "yes" ? 1 : 0 %] .Vars.NODE_ACTIVE}}
exit-status: 0
stdout:
- "/[0-9]+/"
@ -45,7 +45,7 @@ command:
stderr: []
"pgrep -n -f '[k]amailio.*kamailio.lb.pid'":
{{if and [% is_lb && kamailio.lb.start == "yes" ? 1 : 0 %] .Vars.NODE_ACTIVE}}
{{if and [% is_lb && kamailio.lb.enable == "yes" ? 1 : 0 %] .Vars.NODE_ACTIVE}}
exit-status: 0
stdout:
- "/[0-9]+/"

@ -54,7 +54,7 @@ process:
running: true
ngcp-voisniff:
running: {{if and [% (is_proxy || is_li) && voisniff.daemon.start == 'yes' ? 1 : 0 %] .Vars.NODE_ACTIVE}} true {{else}} false {{end}}
running: {{if and [% (is_proxy || is_li) && voisniff.daemon.enable == 'yes' ? 1 : 0 %] .Vars.NODE_ACTIVE}} true {{else}} false {{end}}
# We have to use a truncated process name because that's the COMM limit
# on Linux (15 characters). Real name: prometheus-haproxy-exporter.

@ -32,12 +32,12 @@ service:
running: [% is_lb && haproxy.enable == "yes" && general.ngcp_type == 'carrier' ? 'true' : 'false' %]
kamailio-lb.service:
enabled: [% general.process_handler == 'none' && kamailio.lb.start == "yes" ? 'true' : 'false' %]
running: {{if and [% is_lb && kamailio.lb.start == "yes" ? 1 : 0 %] .Vars.NODE_ACTIVE}} true {{else}} false {{end}}
enabled: [% general.process_handler == 'none' && kamailio.lb.enable == "yes" ? 'true' : 'false' %]
running: {{if and [% is_lb && kamailio.lb.enable == "yes" ? 1 : 0 %] .Vars.NODE_ACTIVE}} true {{else}} false {{end}}
kamailio-proxy.service:
enabled: [% general.process_handler == 'none' && kamailio.proxy.start == "yes" ? 'true' : 'false' %]
running: {{if and [% is_proxy && kamailio.proxy.start == "yes" ? 1 : 0 %] .Vars.NODE_ACTIVE}} true {{else}} false {{end}}
enabled: [% general.process_handler == 'none' && kamailio.proxy.enable == "yes" ? 'true' : 'false' %]
running: {{if and [% is_proxy && kamailio.proxy.enable == "yes" ? 1 : 0 %] .Vars.NODE_ACTIVE}} true {{else}} false {{end}}
ngcp-license-client.service:
enabled: [% general.process_handler == 'none' && (general.license_key != '' || general.anonymous_usage_statistics == 'yes') ? 'true' : 'false' %]
@ -110,7 +110,7 @@ service:
ngcp-voisniff.service:
enabled: false
running: {{if and [% (is_proxy || is_li) && voisniff.daemon.start == 'yes' ? 1 : 0 %] .Vars.NODE_ACTIVE}} true {{else}} false {{end}}
running: {{if and [% (is_proxy || is_li) && voisniff.daemon.enable == 'yes' ? 1 : 0 %] .Vars.NODE_ACTIVE}} true {{else}} false {{end}}
ngcpcfg-api.service:
enabled: [% is_mgmt && bootenv.ngcpcfg_api.enable == "yes" ? 'true' : 'false' %]

Loading…
Cancel
Save