Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Eric Zheng
slapos
Commits
63055263
Commit
63055263
authored
Sep 09, 2020
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Plain Diff
Update Release Candidate
parents
da630113
865bc5d4
Changes
27
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
192 additions
and
110 deletions
+192
-110
software/caddy-frontend/buildout.hash.cfg
software/caddy-frontend/buildout.hash.cfg
+1
-1
software/caddy-frontend/templates/trafficserver/records.config.jinja2
...dy-frontend/templates/trafficserver/records.config.jinja2
+1
-0
software/caddy-frontend/test/test.py
software/caddy-frontend/test/test.py
+7
-46
software/erp5/test/setup.py
software/erp5/test/setup.py
+1
-0
software/erp5/test/test/test_erp5.py
software/erp5/test/test/test_erp5.py
+5
-8
software/erp5/test/test/test_mariadb.py
software/erp5/test/test/test_mariadb.py
+91
-2
software/erp5testnode/testsuite/dummy/software.cfg
software/erp5testnode/testsuite/dummy/software.cfg
+1
-1
software/erp5testnode/testsuite/instance-resilient-test.cfg.jinja2
...erp5testnode/testsuite/instance-resilient-test.cfg.jinja2
+6
-2
software/erp5testnode/testsuite/slaprunner.cfg
software/erp5testnode/testsuite/slaprunner.cfg
+10
-1
software/kvm/test/test.py
software/kvm/test/test.py
+5
-5
software/neoppod/buildout.hash.cfg
software/neoppod/buildout.hash.cfg
+1
-1
software/neoppod/my.cnf.in
software/neoppod/my.cnf.in
+2
-0
software/slapos-master/test/test/test_erp5.py
software/slapos-master/test/test/test_erp5.py
+5
-8
software/slapos-sr-testing/buildout.hash.cfg
software/slapos-sr-testing/buildout.hash.cfg
+1
-1
software/slapos-sr-testing/instance.cfg
software/slapos-sr-testing/instance.cfg
+1
-1
software/slapos-sr-testing/software.cfg
software/slapos-sr-testing/software.cfg
+3
-3
software/slapos-testing/software.cfg
software/slapos-testing/software.cfg
+8
-5
stack/erp5/buildout.cfg
stack/erp5/buildout.cfg
+4
-5
stack/erp5/buildout.hash.cfg
stack/erp5/buildout.hash.cfg
+3
-3
stack/erp5/instance-mariadb.cfg.in
stack/erp5/instance-mariadb.cfg.in
+6
-5
stack/erp5/instance.cfg.in
stack/erp5/instance.cfg.in
+1
-0
stack/erp5/mysql-querydigest.sh.in
stack/erp5/mysql-querydigest.sh.in
+5
-3
stack/lamp/buildout.cfg
stack/lamp/buildout.cfg
+3
-3
stack/lamp/buildout.hash.cfg
stack/lamp/buildout.hash.cfg
+1
-1
stack/lamp/instance.cfg.in
stack/lamp/instance.cfg.in
+1
-0
stack/slapos-dev.cfg
stack/slapos-dev.cfg
+1
-0
stack/slapos.cfg
stack/slapos.cfg
+18
-5
No files found.
software/caddy-frontend/buildout.hash.cfg
View file @
63055263
...
...
@@ -70,7 +70,7 @@ md5sum = 975177dedf677d24e14cede5d13187ce
[template-trafficserver-records-config]
_update_hash_filename_ = templates/trafficserver/records.config.jinja2
md5sum =
f3f31188de56bb35383335b3219537f4
md5sum =
56c7e9f5cc92f8c519f48496010e2078
[template-trafficserver-storage-config]
_update_hash_filename_ = templates/trafficserver/storage.config.jinja2
...
...
software/caddy-frontend/templates/trafficserver/records.config.jinja2
View file @
63055263
...
...
@@ -27,6 +27,7 @@ CONFIG proxy.config.http.cache.open_write_fail_action INT 2
CONFIG proxy.config.body_factory.template_sets_dir STRING {{ ats_configuration['templates-dir'] }}
# Support stale-if-error by returning cached content on backend 5xx or unavailability
CONFIG proxy.config.http.negative_revalidating_enabled INT 1
CONFIG proxy.config.http.negative_revalidating_lifetime INT 86400
##############################################################################
# Proxy users variables. Docs:
# https://docs.trafficserver.apache.org/records.config#proxy-user-variables
...
...
software/caddy-frontend/test/test.py
View file @
63055263
...
...
@@ -66,6 +66,7 @@ from cryptography.x509.oid import NameOID
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
from
slapos.testing.utils
import
findFreeTCPPort
from
slapos.testing.utils
import
getPromisePluginParameterDict
setUpModule
,
SlapOSInstanceTestCase
=
makeModuleSetUpAndTestCaseClass
(
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'..'
,
'software.cfg'
)))
...
...
@@ -243,44 +244,6 @@ def isHTTP2(domain, ip):
return
'Using HTTP2, server supports multi-use'
in
err
def
getPluginParameterDict
(
software_path
,
filepath
):
"""Load the slapos monitor plugin and returns the configuration used by this plugin.
This allow to check that monitoring plugin are using a proper config.
"""
# This is implemented by creating a wrapper script that loads the plugin wrapper
# script and returns its `extra_config_dict`. This might have to be adjusted if
# internals of slapos promise plugins change.
bin_file
=
os
.
path
.
join
(
software_path
,
'bin'
,
'test-plugin-promise'
)
monitor_python_with_eggs
=
os
.
path
.
join
(
software_path
,
'bin'
,
'monitor-pythonwitheggs'
)
if
not
os
.
path
.
exists
(
monitor_python_with_eggs
):
raise
ValueError
(
"Monitoring stack's python does not exist at %s"
%
monitor_python_with_eggs
)
with
open
(
bin_file
,
'w'
)
as
f
:
f
.
write
(
"""#!%s
import os
import importlib
import sys
import json
filepath = sys.argv[1]
sys.path[0:0] = [os.path.dirname(filepath)]
filename = os.path.basename(filepath)
module = importlib.import_module(os.path.splitext(filename)[0])
print json.dumps(module.extra_config_dict)
"""
%
monitor_python_with_eggs
)
os
.
chmod
(
bin_file
,
0o755
)
result
=
subprocess_output
([
bin_file
,
filepath
]).
strip
()
try
:
return
json
.
loads
(
result
)
except
ValueError
,
e
:
raise
ValueError
(
"%s
\
n
Result was: %s"
%
(
e
,
result
))
class
TestDataMixin
(
object
):
def
getTrimmedProcessInfo
(
self
):
return
'
\
n
'
.
join
(
sorted
([
...
...
@@ -3569,7 +3532,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
'check-_monitor-ipv6-test-ipv6-packet-list-test.py'
))[
0
]
# get promise module and check that parameters are ok
self
.
assertEqual
(
getP
luginParameterDict
(
self
.
software_path
,
monitor_file
),
getP
romisePluginParameterDict
(
monitor_file
),
{
'frequency'
:
'720'
,
'address'
:
'monitor-ipv6-test'
...
...
@@ -3606,7 +3569,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
'check-_monitor-ipv4-test-ipv4-packet-list-test.py'
))[
0
]
# get promise module and check that parameters are ok
self
.
assertEqual
(
getP
luginParameterDict
(
self
.
software_path
,
monitor_file
),
getP
romisePluginParameterDict
(
monitor_file
),
{
'frequency'
:
'720'
,
'ipv4'
:
'true'
,
...
...
@@ -4702,8 +4665,7 @@ class TestRe6stVerificationUrlDefaultSlave(SlaveHttpFrontendTestCase,
re6st_connectivity_promise_file = re6st_connectivity_promise_list[0]
self.assertEqual(
getPluginParameterDict(
self.software_path, re6st_connectivity_promise_file),
getPromisePluginParameterDict(re6st_connectivity_promise_file),
{
'
url
': '
http
:
//
[
2001
:
67
c
:
1254
:
4
::
1
]
/
index
.
html
',
}
...
...
@@ -4757,8 +4719,7 @@ class TestRe6stVerificationUrlSlave(SlaveHttpFrontendTestCase,
re6st_connectivity_promise_file = re6st_connectivity_promise_list[0]
self.assertEqual(
getPluginParameterDict(
self.software_path, re6st_connectivity_promise_file),
getPromisePluginParameterDict(re6st_connectivity_promise_file),
{
'
url
': '
some
-
re6st
-
verification
-
url
',
}
...
...
@@ -6462,7 +6423,7 @@ class TestSlaveRejectReportUnsafeDamaged(SlaveHttpFrontendTestCase):
# get promise module and check that parameters are ok
self
.
assertEqual
(
getP
luginParameterDict
(
self
.
software_path
,
monitor_file
),
getP
romisePluginParameterDict
(
monitor_file
),
{
'frequency'
:
'720'
,
'ipv4'
:
'true'
,
...
...
@@ -6506,7 +6467,7 @@ class TestSlaveRejectReportUnsafeDamaged(SlaveHttpFrontendTestCase):
'check-_monitor-ipv6-test-unsafe-ipv6-packet-list-test.py'
))[
0
]
# get promise module and check that parameters are ok
self
.
assertEqual
(
getP
luginParameterDict
(
self
.
software_path
,
monitor_file
),
getP
romisePluginParameterDict
(
monitor_file
),
{
'frequency'
:
'720'
,
'address'
:
'${section:option}
\
n
afternewline ipv6'
...
...
software/erp5/test/setup.py
View file @
63055263
...
...
@@ -48,6 +48,7 @@ setup(name=name,
'psutil'
,
'requests'
,
'mysqlclient'
,
'backports.lzma'
,
'cryptography'
,
'pyOpenSSL'
,
],
...
...
software/erp5/test/test/test_erp5.py
View file @
63055263
...
...
@@ -47,20 +47,17 @@ class TestPublishedURLIsReachableMixin(object):
# What happens is that instanciation just create the services, but does not
# wait for ERP5 to be initialized. When this test run ERP5 instance is
# instanciated, but zope is still busy creating the site and haproxy replies
# with 503 Service Unavailable, sometimes the first request is 404, so we
# retry in a loop.
# If we can move the "create site" in slapos node instance, then this retry loop
# would not be necessary.
# with 503 Service Unavailable when zope is not started yet, with 404 when
# erp5 site is not created, with 500 when mysql is not yet reachable, so we
# retry in a loop until we get a succesful response.
for
i
in
range
(
1
,
60
):
r
=
requests
.
get
(
url
,
verify
=
False
)
# XXX can we get CA from caucase already ?
if
r
.
status_code
in
(
requests
.
codes
.
service_unavailable
,
requests
.
codes
.
not_found
):
if
r
.
status_code
!=
requests
.
codes
.
ok
:
delay
=
i
*
2
self
.
logger
.
warn
(
"ERP5 was not available, sleeping for %ds and retrying"
,
delay
)
time
.
sleep
(
delay
)
continue
if
r
.
status_code
!=
requests
.
codes
.
ok
:
r
.
raise_for_status
()
r
.
raise_for_status
()
break
self
.
assertIn
(
"ERP5"
,
r
.
text
)
...
...
software/erp5/test/test/test_mariadb.py
View file @
63055263
...
...
@@ -31,12 +31,19 @@ import json
import
glob
import
urlparse
import
socket
import
sys
import
time
import
contextlib
import
datetime
import
subprocess
import
gzip
from
backports
import
lzma
import
MySQLdb
from
slapos.testing.utils
import
CrontabMixin
from
slapos.testing.utils
import
getPromisePluginParameterDict
from
.
import
ERP5InstanceTestCase
from
.
import
setUpModule
setUpModule
# pyflakes
...
...
@@ -56,8 +63,8 @@ class MariaDBTestCase(ERP5InstanceTestCase):
return
{
'tcpv4-port'
:
3306
,
'max-connection-count'
:
5
,
'max-slowqueries-threshold'
:
5
,
'slowest-query-threshold'
:
10
,
'max-slowqueries-threshold'
:
1
,
'slowest-query-threshold'
:
0.1
,
# XXX what is this ? should probably not be needed here
'name'
:
cls
.
__name__
,
'monitor-passwd'
:
'secret'
,
...
...
@@ -86,6 +93,88 @@ class MariaDBTestCase(ERP5InstanceTestCase):
)
class
TestCrontabs
(
MariaDBTestCase
,
CrontabMixin
):
def
test_full_backup
(
self
):
self
.
_executeCrontabAtDate
(
'mariadb-backup'
,
'2050-01-01'
)
with
gzip
.
open
(
os
.
path
.
join
(
self
.
computer_partition_root_path
,
'srv'
,
'backup'
,
'mariadb-full'
,
'20500101000000.sql.gz'
,
),
'r'
)
as
dump
:
self
.
assertIn
(
'CREATE TABLE'
,
dump
.
read
())
def
test_logrotate_and_slow_query_digest
(
self
):
# slow query digest needs to run after logrotate, since it operates on the rotated
# file, so this tests both logrotate and slow query digest.
# run logrotate a first time so that it create state files
self
.
_executeCrontabAtDate
(
'logrotate'
,
'2000-01-01'
)
# make two slow queries
cnx
=
self
.
getDatabaseConnection
()
with
contextlib
.
closing
(
cnx
):
cnx
.
query
(
"SELECT SLEEP(1.1)"
)
cnx
.
store_result
()
cnx
.
query
(
"SELECT SLEEP(1.2)"
)
# slow query crontab depends on crontab for log rotation
# to be executed first.
self
.
_executeCrontabAtDate
(
'logrotate'
,
'2050-01-01'
)
# this logrotate leaves the log for the day as non compressed
rotated_log_file
=
os
.
path
.
join
(
self
.
computer_partition_root_path
,
'srv'
,
'backup'
,
'logrotate'
,
'mariadb_slowquery.log-20500101'
,
)
self
.
assertTrue
(
os
.
path
.
exists
(
rotated_log_file
))
# then crontab to generate slow query report is executed
self
.
_executeCrontabAtDate
(
'generate-mariadb-slow-query-report'
,
'2050-01-01'
)
# and it creates a report for the day
slow_query_report
=
os
.
path
.
join
(
self
.
computer_partition_root_path
,
'srv'
,
'monitor'
,
'private'
,
'slowquery_digest'
,
'slowquery_digest.txt-2050-01-01.xz'
,
)
with
lzma
.
open
(
slow_query_report
,
'r'
)
as
f
:
# this is the hash for our "select sleep(n)" slow query
self
.
assertIn
(
"ID 0xF9A57DD5A41825CA"
,
f
.
read
())
# on next day execution of logrotate, log files are compressed
self
.
_executeCrontabAtDate
(
'logrotate'
,
'2050-01-02'
)
self
.
assertTrue
(
os
.
path
.
exists
(
rotated_log_file
+
'.xz'
))
self
.
assertFalse
(
os
.
path
.
exists
(
rotated_log_file
))
# there's a promise checking that the threshold is not exceeded
# and it reports a problem since we set a threshold of 1 slow query
check_slow_query_promise_plugin
=
getPromisePluginParameterDict
(
os
.
path
.
join
(
self
.
computer_partition_root_path
,
'etc'
,
'plugin'
,
'check-slow-query-pt-digest-result.py'
,
))
with
self
.
assertRaises
(
subprocess
.
CalledProcessError
)
as
error_context
:
subprocess
.
check_output
(
'faketime 2050-01-01 %s'
%
check_slow_query_promise_plugin
[
'command'
],
shell
=
True
)
self
.
assertEqual
(
error_context
.
exception
.
output
,
"""
\
Threshold is lower than expected:
Expected total queries : 1.0 and current is: 2
Expected slowest query : 0.1 and current is: 1
"""
)
class
TestMariaDB
(
MariaDBTestCase
):
def
test_utf8_collation
(
self
):
cnx
=
self
.
getDatabaseConnection
()
...
...
software/erp5testnode/testsuite/dummy/software.cfg
View file @
63055263
...
...
@@ -11,7 +11,7 @@ parts =
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg
md5sum =
efd3b712a2294207f265a9c45648d5cf
md5sum =
9fccb9600a085691ab0f9a20cd615c01
mode = 0644
[versions]
...
...
software/erp5testnode/testsuite/instance-resilient-test.cfg.jinja2
View file @
63055263
...
...
@@ -56,8 +56,12 @@ config-cpu-usage-ratio = 1
config-software-root = ${buildout:directory}/../../soft
config-buildout-shared-folder = ${buildout:directory}/../../shared
config-no-ipv4-frontend = true
# XXX hardcoded
#config-frontend-domain = google.com
# Use same repository / branch for the software installed in slaprunner
# than the tested slaprunner itself.
config-slapos-repository = {{ slapos_repository_url }}
config-slapos-reference = {{ slapos_repository_branch }}
# XXX Hack to deploy Root Instance on the same computer as the type-test Instance
sla-computer_guid = ${slap-connection:computer-id}
return = backend-url
...
...
software/erp5testnode/testsuite/slaprunner.cfg
View file @
63055263
...
...
@@ -7,7 +7,16 @@ parts += template-erp5testnode
[template-resilient-test]
filename = instance-resilient-test.cfg.jinja2
md5sum = cf34be404bdd93a72df9c593f8762cb2
md5sum = be4adbc196f07f5e39ca78401dfa53ec
# We have to use an extra level of indentation here because this is substituted
# during software buildout to generate instance buildout, but the
# slapos.recipe.template recipe doing the substitution does string replacements
# without knowledge of the buildout syntax, so we want the second line to be
# indented in the final generated instance buildout.
extra-context =
raw slapos_repository_url ${slapos.cookbook-repository:repository}
raw slapos_repository_branch ${slapos.cookbook-repository:branch}
[exporter-default-configuration]
# Define shorter interaction to speed up tests
...
...
software/kvm/test/test.py
View file @
63055263
...
...
@@ -744,9 +744,9 @@ class TestCpuMemMaxDynamic(InstanceTestCase):
def
test
(
self
):
with
open
(
os
.
path
.
join
(
self
.
computer_partition_root_path
,
'bin'
,
'kvm_raw'
),
'r
b
'
)
as
fh
:
self
.
computer_partition_root_path
,
'bin'
,
'kvm_raw'
),
'r'
)
as
fh
:
kvm_raw
=
fh
.
read
()
self
.
assert
True
(
'smp_count = 2'
in
kvm_raw
)
self
.
assert
True
(
'smp_max_count = 3'
in
kvm_raw
)
self
.
assert
True
(
'ram_size = 2048'
in
kvm_raw
)
self
.
assert
True
(
"ram_max_size = '2560'"
in
kvm_raw
)
self
.
assert
In
(
'smp_count = 2'
,
kvm_raw
)
self
.
assert
In
(
'smp_max_count = 3'
,
kvm_raw
)
self
.
assert
In
(
'ram_size = 2048'
,
kvm_raw
)
self
.
assert
In
(
"ram_max_size = '2560'"
,
kvm_raw
)
software/neoppod/buildout.hash.cfg
View file @
63055263
...
...
@@ -34,7 +34,7 @@ md5sum = 74e0361f3ec3424c905acc4cd55fd8bf
[template-neo-my-cnf]
filename = my.cnf.in
md5sum =
9f6f8f2b5f4cb0d97d50ffc1d3837e2f
md5sum =
a8939dcf440126a30db661b5a0a1bfb7
[template-neo]
filename = instance.cfg.in
...
...
software/neoppod/my.cnf.in
View file @
63055263
...
...
@@ -9,6 +9,8 @@
{% if not engine or engine == 'RocksDB' -%}
{% do plugins.append('ha_rocksdb') -%}
{% do extra_dict.setdefault('rocksdb_keep_log_file_num', '64') -%}
{% do extra_dict.setdefault('rocksdb_max_log_file_size', '16M') -%}
{% endif -%}
{% if not engine or engine == 'TokuDB' -%}
...
...
software/slapos-master/test/test/test_erp5.py
View file @
63055263
...
...
@@ -47,20 +47,17 @@ class TestPublishedURLIsReachableMixin(object):
# What happens is that instanciation just create the services, but does not
# wait for ERP5 to be initialized. When this test run ERP5 instance is
# instanciated, but zope is still busy creating the site and haproxy replies
# with 503 Service Unavailable, sometimes the first request is 404, so we
# retry in a loop.
# If we can move the "create site" in slapos node instance, then this retry loop
# would not be necessary.
# with 503 Service Unavailable when zope is not started yet, with 404 when
# erp5 site is not created, with 500 when mysql is not yet reachable, so we
# retry in a loop until we get a succesful response.
for
i
in
range
(
1
,
60
):
r
=
requests
.
get
(
url
,
verify
=
False
)
# XXX can we get CA from caucase already ?
if
r
.
status_code
in
(
requests
.
codes
.
service_unavailable
,
requests
.
codes
.
not_found
):
if
r
.
status_code
!=
requests
.
codes
.
ok
:
delay
=
i
*
2
self
.
logger
.
warn
(
"ERP5 was not available, sleeping for %ds and retrying"
,
delay
)
time
.
sleep
(
delay
)
continue
if
r
.
status_code
!=
requests
.
codes
.
ok
:
r
.
raise_for_status
()
r
.
raise_for_status
()
break
self
.
assertIn
(
"ERP5"
,
r
.
text
)
...
...
software/slapos-sr-testing/buildout.hash.cfg
View file @
63055263
...
...
@@ -15,4 +15,4 @@
[template]
filename = instance.cfg
md5sum =
25a4d7e438402d992edadf9339faf557
md5sum =
14d2f49d20670e44c2a162bcec9e0a8e
software/slapos-sr-testing/instance.cfg
View file @
63055263
...
...
@@ -44,7 +44,7 @@ environment =
SLAPOS_TEST_WORKING_DIR=${slapos-test-runner-environment:SLAPOS_TEST_WORKING_DIR}
[slapos-test-runner-environment]
PATH = {{ buildout['bin-directory'] }}:{{ curl_location }}/bin/:/usr/bin/:/bin
PATH = {{ buildout['bin-directory'] }}:{{ curl_location }}/bin/:
{{ faketime_location }}/bin/:
/usr/bin/:/bin
SLAPOS_TEST_IPV4 = ${slap-configuration:ipv4-random}
SLAPOS_TEST_IPV6 = ${slap-configuration:ipv6-random}
SLAPOS_TEST_WORKING_DIR = ${directory:working-dir}
...
...
software/slapos-sr-testing/software.cfg
View file @
63055263
...
...
@@ -4,6 +4,7 @@ extends =
../../component/bcrypt/buildout.cfg
../../component/curl/buildout.cfg
../../component/git/buildout.cfg
../../component/faketime/buildout.cfg
../../component/pillow/buildout.cfg
../../component/python-cryptography/buildout.cfg
../../component/python-mysqlclient/buildout.cfg
...
...
@@ -174,6 +175,7 @@ eggs =
${python-pynacl:egg}
${python-cryptography:egg}
${python-mysqlclient:egg}
${backports.lzma:egg}
${bcrypt:egg}
slapos.libnetworkcache
supervisor
...
...
@@ -200,7 +202,6 @@ eggs =
${slapos.test.dream-setup:egg}
${slapos.test.metabase-setup:egg}
${slapos.test.repman-setup:egg}
${backports.lzma:egg}
entry-points =
runTestSuite=erp5.util.testsuite:runTestSuite
scripts =
...
...
@@ -239,6 +240,7 @@ context =
key slapos_location slapos-repository:location
key interpreter eggs:interpreter
key curl_location curl:location
key faketime_location faketime:location
key tests :tests
tests =
${slapos.test.kvm-setup:setup}
...
...
@@ -309,8 +311,6 @@ Django = 1.11
# selenium==3.141.0
urllib3 = 1.24.1
backports.lzma = 0.0.13
mock = 2.0.0
testfixtures = 6.11
funcsigs = 1.0.2
...
...
software/slapos-testing/software.cfg
View file @
63055263
...
...
@@ -57,7 +57,9 @@ depends = ${slapos.core-setup:egg}
<= setup-develop-egg
egg = slapos.cookbook[test]
setup = ${slapos.cookbook-repository:location}
depends = ${slapos.core-setup:egg}
depends =
${slapos.core-setup:egg}
${slapos-cookbook-dependencies:eggs}
[slapos.core-setup]
<= setup-develop-egg
...
...
@@ -83,10 +85,11 @@ setup = ${slapos.recipe.template-repository:location}
[slapos.toolbox-setup]
<= setup-develop-egg
# XXX slapos.toolbox does not have `test` extra require, `mock` and `pycurl` are only listed in `tests_require` and are listed explicitly
egg = slapos.toolbox
egg = slapos.toolbox[test]
setup = ${slapos.toolbox-repository:location}
depends = ${slapos.core-setup:egg}
depends =
${slapos.core-setup:egg}
${slapos-toolbox-dependencies:eggs}
[slapos.rebootstrap-setup]
<= setup-develop-egg
...
...
@@ -98,6 +101,7 @@ recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
${python-cryptography:egg}
${backports.lzma:egg}
${pycurl:egg}
${bcrypt:egg}
dnspython
...
...
@@ -113,7 +117,6 @@ eggs =
${slapos.toolbox-setup:egg}
${slapos.libnetworkcache-setup:egg}
${slapos.rebootstrap-setup:egg}
mock
zope.testing
supervisor
entry-points =
...
...
stack/erp5/buildout.cfg
View file @
63055263
...
...
@@ -9,6 +9,7 @@ extends =
../../component/git/buildout.cfg
../../component/graphviz/buildout.cfg
../../component/gzip/buildout.cfg
../../component/xz-utils/buildout.cfg
../../component/haproxy/buildout.cfg
../../component/hookbox/buildout.cfg
../../component/findutils/buildout.cfg
...
...
@@ -178,6 +179,7 @@ context =
key erp5_location erp5:location
key findutils_location findutils:location
key gzip_location gzip:location
key xz_utils_location xz-utils:location
key haproxy_location haproxy:location
key instance_common_cfg instance-common:rendered
key jsl_location jsl:location
...
...
@@ -560,14 +562,11 @@ setup = ${erp5:location}
[zodbpack]
recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
${pycurl:egg}
${python-PyYAML:egg}
${python-cryptography:egg}
${python-cliff:egg}
slapos.toolbox[zodbpack]
scripts =
zodbpack
depends =
${slapos-toolbox-dependencies:eggs}
[versions]
# See ../../software/neoppod/software-common.cfg for versions common with NEO:
...
...
stack/erp5/buildout.hash.cfg
View file @
63055263
...
...
@@ -18,7 +18,7 @@ md5sum = 85ce1e2f3d251aa435fef8118dca8a63
[mariadb-slow-query-report-script]
filename = mysql-querydigest.sh.in
md5sum =
0c0d98a68230cd0ad36046bb25b35f4a
md5sum =
7b14d2b81f2c864e47682ddb03b1b663
[mariadb-start-clone-from-backup]
filename = instance-mariadb-start-clone-from-backup.sh.in
...
...
@@ -26,7 +26,7 @@ md5sum = d10b8e35b02b5391cf46bf0c7dbb1196
[template-mariadb]
filename = instance-mariadb.cfg.in
md5sum =
bfed6ac56c3ba0e96be4c9474dac6f20
md5sum =
7d064777c1c4e7b275b255db4f4b1da9
[template-kumofs]
filename = instance-kumofs.cfg.in
...
...
@@ -70,7 +70,7 @@ md5sum = cc19560b9400cecbd23064d55c501eec
[template]
filename = instance.cfg.in
md5sum =
328ea2bb5f2bff18f8be8c541c01f260
md5sum =
5c5250112b87a3937f939028f9594b85
[monitor-template-dummy]
filename = dummy.cfg
...
...
stack/erp5/instance-mariadb.cfg.in
View file @
63055263
...
...
@@ -326,17 +326,18 @@ context =
raw slow_query_path ${directory:srv}/backup/logrotate/mariadb_slowquery.log
raw pt_query_exec ${binary-wrap-pt-digest:wrapper-path}
raw dash {{ parameter_dict['dash-location'] }}/bin/dash
raw xz {{ parameter_dict['xz-utils-location'] }}/bin/xz
key output_folder directory:slowquery
[slow-query-digest-parameters]
max_queries_threshold = {{ slapparameter_dict['max-slowqueries-threshold'] }}
slowest_queries_threshold = {{ slapparameter_dict['slowest-query-threshold'] }}
{%if slapparameter_dict.get('max-slowqueries-threshold') and slapparameter_dict.get('slowest-query-threshold') %}
[{{ section('monitor-promise-slowquery-result') }}]
<= monitor-promise-base
module = check_command_execute
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}"
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 "${:max_queries_threshold}" --slowest_query_threshold "${:slowest_queries_threshold}"
max_queries_threshold = {{ slapparameter_dict['max-slowqueries-threshold'] }}
slowest_queries_threshold = {{ slapparameter_dict['slowest-query-threshold'] }}
{%-endif%}
[{{ section('promise-check-computer-memory') }}]
<= monitor-promise-base
...
...
stack/erp5/instance.cfg.in
View file @
63055263
...
...
@@ -144,6 +144,7 @@ coreutils-location = {{ coreutils_location }}
dash-location = {{ dash_location }}
findutils-location = {{ findutils_location }}
gzip-location = {{ gzip_location }}
xz-utils-location = {{ xz_utils_location }}
mariadb-location = {{ mariadb_location }}
template-my-cnf = {{ template_my_cnf }}
template-mariadb-initial-setup = {{ template_mariadb_initial_setup }}
...
...
stack/erp5/mysql-querydigest.sh.in
View file @
63055263
#!{{dash}}
# BEWARE: This file is operated by slapgrid
set -e
SLOW_QUERY_PATH='{{slow_query_path}}'
OUTPUT_FOLDER='{{output_folder}}'
PT_QUERY_EXEC='{{pt_query_exec}}'
...
...
@@ -21,6 +23,6 @@ if [ ! -f "$SLOW_LOG" ]; then
exit 1
fi
"$PT_QUERY_EXEC" "$SLOW_LOG" > "$OUTPUT_FILE"
&& \
echo "Report generated successfully." || \
echo "Report failed with code $?
"
"$PT_QUERY_EXEC" "$SLOW_LOG" > "$OUTPUT_FILE"
{{ xz }} -9 "$OUTPUT_FILE
"
stack/lamp/buildout.cfg
View file @
63055263
...
...
@@ -31,6 +31,7 @@ extends =
../../component/perl/buildout.cfg
../../component/sqlite3/buildout.cfg
../../component/stunnel/buildout.cfg
../../component/xz-utils/buildout.cfg
../../component/zlib/buildout.cfg
../erp5/buildout.cfg
../logrotate/buildout.cfg
...
...
@@ -88,6 +89,7 @@ context =
key logrotate_location logrotate:location
key logrotate_cfg template-logrotate-base:rendered
key gzip_location gzip:location
key xz_utils_location xz-utils:location
key stunnel_location stunnel:location
key template_monitor monitor2-template:rendered
key mariadb_link_binary template-mariadb:link-binary
...
...
@@ -137,6 +139,4 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_}
[eggs]
recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
${pycurl:egg}
slapos.toolbox
${slapos-toolbox:eggs}
stack/lamp/buildout.hash.cfg
View file @
63055263
...
...
@@ -14,7 +14,7 @@
# not need these here).
[instance]
filename = instance.cfg.in
md5sum =
be63b936ed521edaead8e0770ac64621
md5sum =
5c953c0f5d3376718eb9c4030288647a
[instance-apache-php]
filename = instance-apache-php.cfg.in
...
...
stack/lamp/instance.cfg.in
View file @
63055263
...
...
@@ -78,6 +78,7 @@ coreutils-location = {{ coreutils_location }}
dash-location = {{ dash_location }}
findutils-location = {{ findutils_location }}
gzip-location = {{ gzip_location }}
xz-utils-location = {{ xz_utils_location }}
mariadb-location = {{ mariadb_location }}
template-my-cnf = {{ template_my_cnf }}
template-mariadb-initial-setup = {{ template_mariadb_initial_setup }}
...
...
stack/slapos-dev.cfg
View file @
63055263
...
...
@@ -21,6 +21,7 @@ develop = true
recipe = zc.recipe.egg:develop
egg = slapos.toolbox
setup = ${slapos.toolbox-repository:location}
depends = ${slapos-toolbox-dependencies:eggs}
[slapos.cookbook-repository]
develop = true
...
...
stack/slapos.cfg
View file @
63055263
...
...
@@ -23,6 +23,7 @@ extends =
../component/defaults.cfg
../component/git/buildout.cfg
../component/lxml-python/buildout.cfg
../component/python-backports-lzma/buildout.cfg
../component/python-cffi/buildout.cfg
../component/python-cliff/buildout.cfg
../component/python-cachecontrol/buildout.cfg
...
...
@@ -88,6 +89,11 @@ setup = ${slapos.cookbook-repository:location}
# Install slapos.cookbook containing all officials recipes
[slapos-cookbook]
recipe = zc.recipe.egg
eggs = slapos.cookbook
depends = ${slapos-cookbook-dependencies:eggs}
[slapos-cookbook-dependencies]
recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
${python-cffi:egg}
...
...
@@ -96,17 +102,23 @@ eggs =
${python-cliff:egg}
${python-cryptography:egg}
${jsonschema:egg}
pyOpenSSL
slapos.cookbook
# slapos.toolbox containing utilities
[slapos-toolbox]
recipe = zc.recipe.egg
eggs = slapos.toolbox
depends = ${slapos-toolbox-dependencies:eggs}
[slapos-toolbox-dependencies]
# slapos.toolbox depends on eggs with C-extensions that needs to be
# installed with slapos provided libraries. This section installs all
# slapos.toolbox dependencies.
recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
${pycurl:egg}
${python-cryptography:egg}
slapos.toolbox
${backports.lzma:egg}
[jsonschema]
recipe = zc.recipe.egg:custom
...
...
@@ -135,6 +147,7 @@ MarkupSafe = 1.0
PyYAML = 3.13
Werkzeug = 0.12
asn1crypto = 1.3.0
backports.lzma = 0.0.14
cffi = 1.14.0
click = 6.7
cliff = 2.4.0
...
...
@@ -160,14 +173,14 @@ pytz = 2016.10
requests = 2.24.0
six = 1.12.0
slapos.cookbook = 1.0.152
slapos.core = 1.6.
0
slapos.core = 1.6.
1
slapos.extension.strip = 0.4
slapos.extension.shared = 1.0
slapos.libnetworkcache = 0.20
slapos.rebootstrap = 4.5
slapos.recipe.build = 0.45
slapos.recipe.cmmi = 0.16
slapos.toolbox = 0.1
09
slapos.toolbox = 0.1
10
stevedore = 1.21.0
subprocess32 = 3.5.3
unicodecsv = 0.14.1
...
...
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