Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos-mynij-dev
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mynij
slapos-mynij-dev
Commits
69f3e79d
Commit
69f3e79d
authored
Sep 02, 2019
by
Łukasz Nowak
Committed by
Łukasz Nowak
Nov 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stack/erp5: Switch to monitor-promise-base
As possible cover promises in tests.
parent
5bc5d6a4
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
111 additions
and
92 deletions
+111
-92
stack/erp5/buildout.hash.cfg
stack/erp5/buildout.hash.cfg
+7
-7
stack/erp5/instance-balancer.cfg.in
stack/erp5/instance-balancer.cfg.in
+13
-11
stack/erp5/instance-erp5.cfg.in
stack/erp5/instance-erp5.cfg.in
+1
-1
stack/erp5/instance-kumofs.cfg.in
stack/erp5/instance-kumofs.cfg.in
+17
-15
stack/erp5/instance-mariadb.cfg.in
stack/erp5/instance-mariadb.cfg.in
+13
-10
stack/erp5/instance-postfix.cfg.in
stack/erp5/instance-postfix.cfg.in
+15
-12
stack/erp5/instance-zeo.cfg.in
stack/erp5/instance-zeo.cfg.in
+15
-12
stack/erp5/instance-zope.cfg.in
stack/erp5/instance-zope.cfg.in
+30
-24
No files found.
stack/erp5/buildout.hash.cfg
View file @
69f3e79d
...
@@ -26,11 +26,11 @@ md5sum = d95e8500bdc72d1f40b97cc414656e7e
...
@@ -26,11 +26,11 @@ md5sum = d95e8500bdc72d1f40b97cc414656e7e
[template-mariadb]
[template-mariadb]
filename = instance-mariadb.cfg.in
filename = instance-mariadb.cfg.in
md5sum =
591fe60e2f615c7690fa5078473b1b0a
md5sum =
b29449652ef996c267518e4dcfd8e9e1
[template-kumofs]
[template-kumofs]
filename = instance-kumofs.cfg.in
filename = instance-kumofs.cfg.in
md5sum =
13315c109deab534b81e7a45e7320eea
md5sum =
e91c0fbd0df441884f7422fa7976053c
[template-zope-conf]
[template-zope-conf]
filename = zope.conf.in
filename = zope.conf.in
...
@@ -50,7 +50,7 @@ md5sum = dec33a617fa1b307c8ddb883efcfe3ce
...
@@ -50,7 +50,7 @@ md5sum = dec33a617fa1b307c8ddb883efcfe3ce
[template-postfix]
[template-postfix]
filename = instance-postfix.cfg.in
filename = instance-postfix.cfg.in
md5sum =
cbcb5f4c2885e3f2589770e76a422be7
md5sum =
bbf84495576a3dbc522524895e9640ff
[template-postfix-master-cf]
[template-postfix-master-cf]
filename = postfix_master.cf.in
filename = postfix_master.cf.in
...
@@ -78,19 +78,19 @@ md5sum = d41d8cd98f00b204e9800998ecf8427e
...
@@ -78,19 +78,19 @@ md5sum = d41d8cd98f00b204e9800998ecf8427e
[template-erp5]
[template-erp5]
filename = instance-erp5.cfg.in
filename = instance-erp5.cfg.in
md5sum =
2ebd2ed8b7db40c4ac6681a8dc0d792
a
md5sum =
939522bb26bf2109d7db818585a46f7
a
[template-zeo]
[template-zeo]
filename = instance-zeo.cfg.in
filename = instance-zeo.cfg.in
md5sum =
10a01b85c966ad9fe13bc981f1ddabe8
md5sum =
0648e38bd5d3a15bb9f93264932740b9
[template-zope]
[template-zope]
filename = instance-zope.cfg.in
filename = instance-zope.cfg.in
md5sum =
5eba2aa53af7ee74959745e6225ea0a7
md5sum =
b1685783f4c93da918ccc83702559e6f
[template-balancer]
[template-balancer]
filename = instance-balancer.cfg.in
filename = instance-balancer.cfg.in
md5sum =
10c620e934397390dc9b737453aab387
md5sum =
cfc9c1ad40bf215771f4902b2ea3fe5b
[template-haproxy-cfg]
[template-haproxy-cfg]
filename = haproxy.cfg.in
filename = haproxy.cfg.in
...
...
stack/erp5/instance-balancer.cfg.in
View file @
69f3e79d
...
@@ -180,11 +180,12 @@ input = inline:
...
@@ -180,11 +180,12 @@ input = inline:
kill -USR1 "$(cat '${apache-conf-parameter-dict:pid-file}')"
kill -USR1 "$(cat '${apache-conf-parameter-dict:pid-file}')"
[{{ section('apache-promise') }}]
[{{ section('apache-promise') }}]
<= monitor-promise-base
# Check any apache port in ipv4, expect other ports and ipv6 to behave consistently
# Check any apache port in ipv4, expect other ports and ipv6 to behave consistently
recipe = slapos.cookbook:
check_port_listening
module =
check_port_listening
path = ${directory:promise}/apache
name = apache.py
hostname = {{ ipv4 }}
config-
hostname = {{ ipv4 }}
port = {{ apache_dict.values()[0][0] }}
config-
port = {{ apache_dict.values()[0][0] }}
[{{ section('publish') }}]
[{{ section('publish') }}]
recipe = slapos.cookbook:publish.serialised
recipe = slapos.cookbook:publish.serialised
...
@@ -209,7 +210,6 @@ recipe = slapos.cookbook:mkdirectory
...
@@ -209,7 +210,6 @@ recipe = slapos.cookbook:mkdirectory
apache-conf = ${:etc}/apache
apache-conf = ${:etc}/apache
bin = ${buildout:directory}/bin
bin = ${buildout:directory}/bin
etc = ${buildout:directory}/etc
etc = ${buildout:directory}/etc
promise = ${:etc}/promise
services = ${:etc}/run
services = ${:etc}/run
services-on-watch = ${:etc}/service
services-on-watch = ${:etc}/service
var = ${buildout:directory}/var
var = ${buildout:directory}/var
...
@@ -247,14 +247,16 @@ configuration = {{ slapparameter_dict['apachedex-configuration'] }}
...
@@ -247,14 +247,16 @@ configuration = {{ slapparameter_dict['apachedex-configuration'] }}
promise-threshold = {{ slapparameter_dict['apachedex-promise-threshold'] }}
promise-threshold = {{ slapparameter_dict['apachedex-promise-threshold'] }}
[{{ section('monitor-promise-apachedex-result') }}]
[{{ section('monitor-promise-apachedex-result') }}]
recipe = slapos.cookbook:wrapper
<= monitor-promise-base
wrapper-path = ${directory:promise}/check-apachedex-result
module = check_command_execute
command-line = "{{ parameter_dict['promise-check-apachedex-result'] }}" --apachedex_path "${directory:apachedex}" --status_file ${monitor-directory:private}/apachedex.report.json --threshold "${apachedex-parameters:promise-threshold}"
name = check-apachedex-result.py
config-command = "{{ parameter_dict['promise-check-apachedex-result'] }}" --apachedex_path "${directory:apachedex}" --status_file ${monitor-directory:private}/apachedex.report.json --threshold "${apachedex-parameters:promise-threshold}"
[{{ section('promise-check-computer-memory') }}]
[{{ section('promise-check-computer-memory') }}]
recipe = slapos.cookbook:wrapper
<= monitor-promise-base
wrapper-path = ${directory:promise}/check-computer-memory
module = check_command_execute
command-line = "{{ parameter_dict["check-computer-memory-binary"] }}" -db ${monitor-instance-parameter:collector-db} --threshold "{{ slapparameter_dict["computer-memory-percent-threshold"] }}" --unit percent
name = check-computer-memory.py
config-command = "{{ parameter_dict["check-computer-memory-binary"] }}" -db ${monitor-instance-parameter:collector-db} --threshold "{{ slapparameter_dict["computer-memory-percent-threshold"] }}" --unit percent
[monitor-instance-parameter]
[monitor-instance-parameter]
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
...
...
stack/erp5/instance-erp5.cfg.in
View file @
69f3e79d
...
@@ -65,7 +65,7 @@ config-name = {{ name }}
...
@@ -65,7 +65,7 @@ config-name = {{ name }}
[directory]
[directory]
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:mkdirectory
etc = ${buildout:directory}/etc
etc = ${buildout:directory}/etc
p
romise = ${:etc}/promise
p
lugin = ${:etc}/plugin
service-on-watch = ${:etc}/service
service-on-watch = ${:etc}/service
srv = ${buildout:directory}/srv
srv = ${buildout:directory}/srv
backup-caucased = ${:srv}/backup/caucased
backup-caucased = ${:srv}/backup/caucased
...
...
stack/erp5/instance-kumofs.cfg.in
View file @
69f3e79d
...
@@ -72,7 +72,7 @@ log = ${kumofs-instance:kumo-gateway-log} ${kumofs-instance:kumo-manager-log} ${
...
@@ -72,7 +72,7 @@ log = ${kumofs-instance:kumo-gateway-log} ${kumofs-instance:kumo-manager-log} ${
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:mkdirectory
log = ${buildout:directory}/var/log
log = ${buildout:directory}/var/log
services = ${buildout:directory}/etc/run
services = ${buildout:directory}/etc/run
p
romise = ${buildout:directory}/etc/promise
p
lugin = ${buildout:directory}/etc/plugin
srv = ${buildout:directory}/srv
srv = ${buildout:directory}/srv
kumofs-data = ${:srv}/kumofs
kumofs-data = ${:srv}/kumofs
...
@@ -85,34 +85,36 @@ rendered = ${directory:srv}/exporter.exclude
...
@@ -85,34 +85,36 @@ rendered = ${directory:srv}/exporter.exclude
# Deploy zope promises scripts
# Deploy zope promises scripts
[promise-template]
[promise-template]
recipe = slapos.cookbook:check_port_listening
<= monitor-promise-base
hostname = ${kumofs-instance:ip}
module = check_port_listening
port = ${kumofs-instance:server-listen-port}
config-hostname = ${kumofs-instance:ip}
config-port = ${kumofs-instance:server-listen-port}
[promise-kumofs-server]
[promise-kumofs-server]
<= promise-template
<= promise-template
path = ${directory:promise}/kumofs-server
name = kumofs-server.py
port = ${kumofs-instance:server-port}
config-
port = ${kumofs-instance:server-port}
[promise-kumofs-server-listen]
[promise-kumofs-server-listen]
<= promise-template
<= promise-template
path = ${directory:promise}/kumofs-server-listen
name = kumofs-server-listen.py
port = ${kumofs-instance:server-listen-port}
config-
port = ${kumofs-instance:server-listen-port}
[promise-kumofs-gateway]
[promise-kumofs-gateway]
<= promise-template
<= promise-template
path = ${directory:promise}/kumofs-gatewa
y
name = kumofs-gateway.p
y
port = ${kumofs-instance:gateway-port}
config-
port = ${kumofs-instance:gateway-port}
[promise-kumofs-manager]
[promise-kumofs-manager]
<= promise-template
<= promise-template
path = ${directory:promise}/kumofs-manager
name = kumofs-manager.py
port = ${kumofs-instance:manager-port}
config-
port = ${kumofs-instance:manager-port}
[promise-check-computer-memory]
[promise-check-computer-memory]
recipe = slapos.cookbook:wrapper
<= monitor-promise-base
wrapper-path = ${directory:promise}/check-computer-memory
module = check_command_execute
command-line = "{{ parameter_dict["check-computer-memory-binary"] }}" -db ${monitor-instance-parameter:collector-db} --threshold "{{ slapparameter_dict["computer-memory-percent-threshold"] }}" --unit percent
name = check-computer-memory.py
config-command = "{{ parameter_dict["check-computer-memory-binary"] }}" -db ${monitor-instance-parameter:collector-db} --threshold "{{ slapparameter_dict["computer-memory-percent-threshold"] }}" --unit percent
[monitor-instance-parameter]
[monitor-instance-parameter]
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
...
...
stack/erp5/instance-mariadb.cfg.in
View file @
69f3e79d
...
@@ -252,7 +252,7 @@ recipe = slapos.cookbook:mkdirectory
...
@@ -252,7 +252,7 @@ recipe = slapos.cookbook:mkdirectory
bin = ${buildout:directory}/bin
bin = ${buildout:directory}/bin
etc = ${buildout:directory}/etc
etc = ${buildout:directory}/etc
services = ${:etc}/run
services = ${:etc}/run
p
romise = ${:etc}/promise
p
lugin = ${:etc}/plugin
srv = ${buildout:directory}/srv
srv = ${buildout:directory}/srv
tmp = ${buildout:directory}/tmp
tmp = ${buildout:directory}/tmp
backup = ${:srv}/backup
backup = ${:srv}/backup
...
@@ -333,19 +333,22 @@ max_queries_threshold = {{ slapparameter_dict['max-slowqueries-threshold'] }}
...
@@ -333,19 +333,22 @@ max_queries_threshold = {{ slapparameter_dict['max-slowqueries-threshold'] }}
slowest_queries_threshold = {{ slapparameter_dict['slowest-query-threshold'] }}
slowest_queries_threshold = {{ slapparameter_dict['slowest-query-threshold'] }}
[{{ section('monitor-promise-slowquery-result') }}]
[{{ section('monitor-promise-slowquery-result') }}]
recipe = slapos.cookbook:wrapper
<= monitor-promise-base
wrapper-path = ${directory:promise}/check-slow-query-pt-digest-result
module = check_command_execute
command-line = "{{ parameter_dict['promise-check-slow-queries-digest-result'] }}" --ptdigest_path "${directory:slowquery}" --status_file ${monitor-directory:private}/mariadb_slow_query.report.json --max_queries_threshold "${slow-query-digest-parameters:max_queries_threshold}" --slowest_query_threshold "${slow-query-digest-parameters:slowest_queries_threshold}"
name = check-slow-query-pt-digest-result.py
config-command = "{{ parameter_dict['promise-check-slow-queries-digest-result'] }}" --ptdigest_path "${directory:slowquery}" --status_file ${monitor-directory:private}/mariadb_slow_query.report.json --max_queries_threshold "${slow-query-digest-parameters:max_queries_threshold}" --slowest_query_threshold "${slow-query-digest-parameters:slowest_queries_threshold}"
[{{ section('promise-check-computer-memory') }}]
[{{ section('promise-check-computer-memory') }}]
recipe = slapos.cookbook:wrapper
<= monitor-promise-base
wrapper-path = ${directory:promise}/check-computer-memory
module = check_command_execute
command-line = "{{ parameter_dict["check-computer-memory-binary"] }}" -db ${monitor-instance-parameter:collector-db} --threshold "{{ slapparameter_dict["computer-memory-percent-threshold"] }}" --unit percent
name = check-computer-memory.py
config-command = "{{ parameter_dict["check-computer-memory-binary"] }}" -db ${monitor-instance-parameter:collector-db} --threshold "{{ slapparameter_dict["computer-memory-percent-threshold"] }}" --unit percent
[{{ section('promise') }}]
[{{ section('promise') }}]
recipe = slapos.cookbook:wrapper
<= monitor-promise-base
command-line = "{{ parameter_dict['bin-directory'] }}/is-local-tcp-port-opened" "${my-cnf-parameters:ip}" "${my-cnf-parameters:port}"
module = check_command_execute
wrapper-path = ${directory:promise}/mariadb
name = mariadb.py
config-command = "{{ parameter_dict['bin-directory'] }}/is-local-tcp-port-opened" "${my-cnf-parameters:ip}" "${my-cnf-parameters:port}"
[monitor-instance-parameter]
[monitor-instance-parameter]
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
...
...
stack/erp5/instance-postfix.cfg.in
View file @
69f3e79d
...
@@ -29,7 +29,7 @@ url = {{ dumps('smtp://' ~ urllib.quote_plus(smtpd_sasl_user) ~ ':' ~ urllib.quo
...
@@ -29,7 +29,7 @@ url = {{ dumps('smtp://' ~ urllib.quote_plus(smtpd_sasl_user) ~ ':' ~ urllib.quo
[directory]
[directory]
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:mkdirectory
etc = ${buildout:directory}/etc
etc = ${buildout:directory}/etc
p
romise = ${:etc}/promise
p
lugin = ${:etc}/plugin
etc-postfix = ${:etc}/postfix
etc-postfix = ${:etc}/postfix
etc-cyrus = ${:etc}/cyrus
etc-cyrus = ${:etc}/cyrus
run = ${:etc}/run
run = ${:etc}/run
...
@@ -79,10 +79,11 @@ wrapper-path = ${directory:run}/munnel
...
@@ -79,10 +79,11 @@ wrapper-path = ${directory:run}/munnel
{% do milter_list.append(socket) -%}
{% do milter_list.append(socket) -%}
[{{ section('munnel-promise') }}]
[{{ section('munnel-promise') }}]
recipe = slapos.cookbook:check_port_listening
<= monitor-promise-base
path = ${directory:promise}/munnel
module = check_port_listening
hostname = {{ ip }}
name = munnel.py
port = {{ milter_port }}
config-hostname = {{ ip }}
config-port = {{ milter_port }}
{% endif -%}
{% endif -%}
[configuration]
[configuration]
...
@@ -260,15 +261,17 @@ command-line = ${directory:usr}/libexec/postfix/master
...
@@ -260,15 +261,17 @@ command-line = ${directory:usr}/libexec/postfix/master
wrapper-path = ${directory:run}/postfix-master
wrapper-path = ${directory:run}/postfix-master
[{{ section('postfix-promise') }}]
[{{ section('postfix-promise') }}]
recipe = slapos.cookbook:check_port_listening
<= monitor-promise-base
path = ${directory:promise}/postfix
module = check_port_listening
hostname = {{ ip }}
name = postfix.py
port = {{ tcpv4_port }}
config-hostname = {{ ip }}
config-port = {{ tcpv4_port }}
[{{ section('promise-check-computer-memory') }}]
[{{ section('promise-check-computer-memory') }}]
recipe = slapos.cookbook:wrapper
<= monitor-promise-base
wrapper-path = ${directory:promise}/check-computer-memory
module = check_command_execute
command-line = "{{ parameter_dict["check-computer-memory-binary"] }}" -db ${monitor-instance-parameter:collector-db} --threshold "{{ slapparameter_dict["computer-memory-percent-threshold"] }}" --unit percent
name = check-computer-memory.py
config-command = "{{ parameter_dict["check-computer-memory-binary"] }}" -db ${monitor-instance-parameter:collector-db} --threshold "{{ slapparameter_dict["computer-memory-percent-threshold"] }}" --unit percent
[monitor-instance-parameter]
[monitor-instance-parameter]
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
...
...
stack/erp5/instance-zeo.cfg.in
View file @
69f3e79d
...
@@ -54,10 +54,11 @@ log = {{ "${" ~ zeo_section_name ~ ":log-path}" }}
...
@@ -54,10 +54,11 @@ log = {{ "${" ~ zeo_section_name ~ ":log-path}" }}
post = test ! -s {{ "${" ~ zeo_section_name ~":pid-path}" }} || {{ bin_directory }}/slapos-kill --pidfile {{ "${" ~ zeo_section_name ~ ":pid-path}" }} -s USR2
post = test ! -s {{ "${" ~ zeo_section_name ~":pid-path}" }} || {{ bin_directory }}/slapos-kill --pidfile {{ "${" ~ zeo_section_name ~ ":pid-path}" }} -s USR2
[{{ section(zeo_section_name ~ "-promise") }}]
[{{ section(zeo_section_name ~ "-promise") }}]
recipe = slapos.cookbook:check_port_listening
<= monitor-promise-base
hostname = {{ "${" ~ zeo_section_name ~ ":ip}" }}
module = check_port_listening
port = {{ "${" ~ zeo_section_name ~ ":port}" }}
name = zeo-{{ family }}.py
path = ${directory:promises}/zeo-{{ family }}
config-hostname = {{ "${" ~ zeo_section_name ~ ":ip}" }}
config-port = {{ "${" ~ zeo_section_name ~ ":port}" }}
{% endfor -%}
{% endfor -%}
...
@@ -87,10 +88,11 @@ repozo-wrapper = ${buildout:bin-directory}/tidstorage-repozo
...
@@ -87,10 +88,11 @@ repozo-wrapper = ${buildout:bin-directory}/tidstorage-repozo
tidstorage-wrapper = ${directory:services}/tidstoraged
tidstorage-wrapper = ${directory:services}/tidstoraged
[{{ section("promise-tidstorage") }}]
[{{ section("promise-tidstorage") }}]
recipe = slapos.cookbook:check_port_listening
<= monitor-promise-base
hostname = ${tidstorage:ip}
module = check_port_listening
port = ${tidstorage:port}
name = tidstorage.py
path = ${directory:promises}/tidstorage
config-hostname = ${tidstorage:ip}
config-port = ${tidstorage:port}
{% endif -%}
{% endif -%}
[{{ section("cron-entry-tidstorage-backup") }}]
[{{ section("cron-entry-tidstorage-backup") }}]
...
@@ -174,9 +176,10 @@ mode = 755
...
@@ -174,9 +176,10 @@ mode = 755
{% endif -%}
{% endif -%}
[{{ section('promise-check-computer-memory') }}]
[{{ section('promise-check-computer-memory') }}]
recipe = slapos.cookbook:wrapper
<= monitor-promise-base
wrapper-path = ${directory:promises}/check-computer-memory
module = check_command_execute
command-line = "{{ parameter_dict["check-computer-memory-binary"] }}" -db ${monitor-instance-parameter:collector-db} --threshold "{{ slapparameter_dict["computer-memory-percent-threshold"] }}" --unit percent
name = check-computer-memory.py
config-command = "{{ parameter_dict["check-computer-memory-binary"] }}" -db ${monitor-instance-parameter:collector-db} --threshold "{{ slapparameter_dict["computer-memory-percent-threshold"] }}" --unit percent
[publish]
[publish]
recipe = slapos.cookbook:publish.serialised
recipe = slapos.cookbook:publish.serialised
...
@@ -195,7 +198,7 @@ recipe = slapos.cookbook:mkdirectory
...
@@ -195,7 +198,7 @@ recipe = slapos.cookbook:mkdirectory
bin = ${buildout:directory}/bin
bin = ${buildout:directory}/bin
etc = ${buildout:directory}/etc
etc = ${buildout:directory}/etc
services = ${:etc}/run
services = ${:etc}/run
p
romises = ${:etc}/promise
p
lugin = ${:etc}/plugin
srv = ${buildout:directory}/srv
srv = ${buildout:directory}/srv
var = ${buildout:directory}/var
var = ${buildout:directory}/var
log = ${:var}/log
log = ${:var}/log
...
...
stack/erp5/instance-zope.cfg.in
View file @
69f3e79d
...
@@ -86,7 +86,7 @@ srv = ${buildout:directory}/srv
...
@@ -86,7 +86,7 @@ srv = ${buildout:directory}/srv
ca-dir = ${:srv}/ssl
ca-dir = ${:srv}/ssl
tmp = ${buildout:directory}/tmp
tmp = ${buildout:directory}/tmp
var = ${buildout:directory}/var
var = ${buildout:directory}/var
p
romises = ${:etc}/promise
p
lugin = ${:etc}/plugin
unit-test-path = ${:srv}/test-instance/unit_test
unit-test-path = ${:srv}/test-instance/unit_test
# Used for ERP5 resiliency or (more probably)
# Used for ERP5 resiliency or (more probably)
...
@@ -326,10 +326,11 @@ port = {{ port }}
...
@@ -326,10 +326,11 @@ port = {{ port }}
{%- endif %}
{%- endif %}
[{{ section("promise-" ~ name) }}]
[{{ section("promise-" ~ name) }}]
recipe = slapos.cookbook:check_port_listening
<= monitor-promise-base
hostname = {{ ipv4 }}
module = check_port_listening
port = {{ port }}
name = {{ name }}.py
path = ${directory:promises}/{{ name }}
config-hostname = {{ ipv4 }}
config-port = {{ port }}
{% set extra_path_list = [] -%}
{% set extra_path_list = [] -%}
{% set shell_escaped_extra_path_list = [] -%}
{% set shell_escaped_extra_path_list = [] -%}
...
@@ -339,9 +340,10 @@ path = ${directory:promises}/{{ name }}
...
@@ -339,9 +340,10 @@ path = ${directory:promises}/{{ name }}
{% do shell_escaped_extra_path_list.append(line.replace("\x27", "\x27\\\x27\x27")) -%}
{% do shell_escaped_extra_path_list.append(line.replace("\x27", "\x27\\\x27\x27")) -%}
{% endfor -%}
{% endfor -%}
[{{ section("promise-" ~ name ~ "-is-running-actual-product") }}]
[{{ section("promise-" ~ name ~ "-is-running-actual-product") }}]
recipe = slapos.cookbook:wrapper
<= monitor-promise-base
command-line = '{{ parameter_dict['bin-directory'] }}/is-process-older-than-dependency-set' '{{ "${" ~ conf_parameter_name ~ ":pid-file}" }}' {{ " ".join(shell_escaped_extra_path_list) }}
module = check_command_execute
wrapper-path = ${directory:promises}/{{ name }}-is-running-actual-product
name = {{ name }}-is-running-actual-product.py
config-command = '{{ parameter_dict['bin-directory'] }}/is-process-older-than-dependency-set' '{{ "${" ~ conf_parameter_name ~ ":pid-file}" }}' {{ " ".join(shell_escaped_extra_path_list) }}
{% if use_ipv6 -%}
{% if use_ipv6 -%}
[{{ zope_tunnel_section_name }}]
[{{ zope_tunnel_section_name }}]
...
@@ -352,26 +354,23 @@ ipv4-port = {{ port }}
...
@@ -352,26 +354,23 @@ ipv4-port = {{ port }}
{% do publish_list.append(("[" ~ ipv6 ~ "]:" ~ port, thread_amount, webdav)) -%}
{% do publish_list.append(("[" ~ ipv6 ~ "]:" ~ port, thread_amount, webdav)) -%}
[{{ section("promise-tunnel-" ~ name) }}]
[{{ section("promise-tunnel-" ~ name) }}]
recipe = slapos.cookbook:check_port_listening
<= monitor-promise-base
hostname = {{ '${' ~ zope_tunnel_section_name ~ ':ipv6}' }}
module = check_port_listening
port = {{ '${' ~ zope_tunnel_section_name ~ ':ipv6-port}' }}
name = {{ zope_tunnel_base_name }}.py
path = ${directory:promises}/{{ zope_tunnel_base_name }}
config-hostname = {{ '${' ~ zope_tunnel_section_name ~ ':ipv6}' }}
config-port = {{ '${' ~ zope_tunnel_section_name ~ ':ipv6-port}' }}
{% else -%}
{% else -%}
{% do publish_list.append((ipv4 ~ ":" ~ port, thread_amount, webdav)) -%}
{% do publish_list.append((ipv4 ~ ":" ~ port, thread_amount, webdav)) -%}
{% endif -%}
{% endif -%}
{% if longrequest_logger_interval > 0 -%}
{% if longrequest_logger_interval > 0 -%}
[{{ section('promise-check-' ~name ~ '-longrequest-error-log') }}]
[{{ section('promise-check-' ~name ~ '-longrequest-error-log') }}]
recipe = slapos.cookbook:promise.plugin
<= monitor-promise-base
eggs =
module = check_error_on_zope_longrequest_log
slapos.toolbox
name = {{'check-' ~ name ~ '-longrequest-error-log.py'}}
output = ${directory:plugins}/{{'check-' ~ name ~ '-longrequest-error-log.py'}}
content =
from slapos.promise.plugin.check_error_on_zope_longrequest_log import RunPromise
config-log-file = {{ '${' ~ conf_parameter_name ~ ':longrequest-logger-file}' }}
config-log-file = {{ '${' ~ conf_parameter_name ~ ':longrequest-logger-file}' }}
config-error-threshold = {{ slapparameter_dict["zope-longrequest-logger-error-threshold"] }}
config-error-threshold = {{ slapparameter_dict["zope-longrequest-logger-error-threshold"] }}
config-maximum-delay = {{ slapparameter_dict["zope-longrequest-logger-maximum-delay"] }}
config-maximum-delay = {{ slapparameter_dict["zope-longrequest-logger-maximum-delay"] }}
mode = 600
{% endif -%}
{% endif -%}
[{{ section('logrotate-entry-' ~ name) }}]
[{{ section('logrotate-entry-' ~ name) }}]
...
@@ -494,21 +493,28 @@ environment-extra +=
...
@@ -494,21 +493,28 @@ environment-extra +=
zserver_address_list={{ ','.join(zserver_address_list) }}
zserver_address_list={{ ','.join(zserver_address_list) }}
zserver_frontend_url_list={{ ','.join(slapparameter_dict['test-runner-apache-url-list']) }}
zserver_frontend_url_list={{ ','.join(slapparameter_dict['test-runner-apache-url-list']) }}
[
{{ section("promise-test-runner-apache-url") }}
]
[
promise-test-runner-apache-url-executable
]
# promise to wait for apache partition to have returned the parameter
# promise to wait for apache partition to have returned the parameter
recipe = slapos.cookbook:check_parameter
recipe = slapos.cookbook:check_parameter
value = {{ slapparameter_dict['test-runner-apache-url-list'] }}
value = {{ slapparameter_dict['test-runner-apache-url-list'] }}
expected-not-value = not-ready
expected-not-value = not-ready
path = ${directory:
promises
}/${:_buildout_section_name_}
path = ${directory:
bin
}/${:_buildout_section_name_}
expected-value =
expected-value =
[{{ section("promise-test-runner-apache-url") }}]
<= monitor-promise-base
module = check_command_execute
name = ${:_buildout_section_name_}.py
config-command = ${promise-test-runner-apache-url-executable:path}
{%- endif %}
{%- endif %}
{%- endif %}
{%- endif %}
[{{ section('promise-check-computer-memory') }}]
[{{ section('promise-check-computer-memory') }}]
recipe = slapos.cookbook:wrapper
<= monitor-promise-base
wrapper-path = ${directory:promises}/check-computer-memory
module = check_command_execute
command-line = "{{ parameter_dict["check-computer-memory-binary"] }}" -db ${monitor-instance-parameter:collector-db} --threshold "{{ slapparameter_dict["computer-memory-percent-threshold"] }}" --unit percent
name = check-computer-memory.py
config-command = "{{ parameter_dict["check-computer-memory-binary"] }}" -db ${monitor-instance-parameter:collector-db} --threshold "{{ slapparameter_dict["computer-memory-percent-threshold"] }}" --unit percent
[publish]
[publish]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment