Commit ab0d27e6 authored by Xavier Thompson's avatar Xavier Thompson

slapproxy: Add local software release path

See merge request nexedi/slapos.core!288
parents a01eb331 dd57a2cf
Pipeline #15453 passed with stage
in 0 seconds
...@@ -47,6 +47,8 @@ class ProxyStartCommand(ConfigCommand): ...@@ -47,6 +47,8 @@ class ProxyStartCommand(ConfigCommand):
help='Port to use') help='Port to use')
ap.add_argument('--host', ap.add_argument('--host',
help='Host to use') help='Host to use')
ap.add_argument('--local-software-release-root',
help='Root path for local Software Releases')
return ap return ap
......
...@@ -93,6 +93,7 @@ def setupFlaskConfiguration(conf): ...@@ -93,6 +93,7 @@ def setupFlaskConfiguration(conf):
app.config['DATABASE_URI'] = conf.database_uri app.config['DATABASE_URI'] = conf.database_uri
app.config['software_product_list'] = conf.software_product_list app.config['software_product_list'] = conf.software_product_list
app.config['multimaster'] = conf.multimaster app.config['multimaster'] = conf.multimaster
app.config['local_software_release_root'] = getattr(conf,'local_software_release_root', None)
def connectDB(): def connectDB():
# if first connection, create an empty db at DATABASE_URI path # if first connection, create an empty db at DATABASE_URI path
......
--version:14 --version:15
CREATE TABLE IF NOT EXISTS local_software_release_root%(version)s (
path VARCHAR(255)
);
INSERT INTO local_software_release_root%(version)s VALUES(NULL);
CREATE TABLE IF NOT EXISTS software%(version)s ( CREATE TABLE IF NOT EXISTS software%(version)s (
url VARCHAR(255), url VARCHAR(255),
computer_reference VARCHAR(255) DEFAULT '%(computer)s', computer_reference VARCHAR(255) DEFAULT '%(computer)s',
......
...@@ -32,6 +32,7 @@ import random ...@@ -32,6 +32,7 @@ import random
import string import string
import time import time
import re import re
import os
from datetime import datetime from datetime import datetime
from slapos.slap.slap import Computer, ComputerPartition, \ from slapos.slap.slap import Computer, ComputerPartition, \
SoftwareRelease, SoftwareInstance, NotFoundError SoftwareRelease, SoftwareInstance, NotFoundError
...@@ -177,7 +178,12 @@ def _upgradeDatabaseIfNeeded(): ...@@ -177,7 +178,12 @@ def _upgradeDatabaseIfNeeded():
# Migrate all data to new tables # Migrate all data to new tables
app.logger.info('Old schema detected: Migrating old tables...') app.logger.info('Old schema detected: Migrating old tables...')
for table in ('software', 'computer', 'partition', 'slave', 'partition_network'): table_list = ('software', 'computer', 'partition', 'slave', 'partition_network')
if int(current_schema_version) >= 11:
table_list += ('forwarded_partition_request',)
if int(current_schema_version) >= 15:
table_list += ('local_software_release_root',)
for table in table_list:
for row in execute_db(table, 'SELECT * from %s', db_version=current_schema_version): for row in execute_db(table, 'SELECT * from %s', db_version=current_schema_version):
columns = ', '.join(row.keys()) columns = ', '.join(row.keys())
placeholders = ':'+', :'.join(row.keys()) placeholders = ':'+', :'.join(row.keys())
...@@ -188,6 +194,33 @@ def _upgradeDatabaseIfNeeded(): ...@@ -188,6 +194,33 @@ def _upgradeDatabaseIfNeeded():
g.db.execute("DROP table %s" % previous_table) g.db.execute("DROP table %s" % previous_table)
g.db.commit() g.db.commit()
def _updateLocalSoftwareReleaseRootPathIfNeeded():
"""
Update the local software release root path if it changed,
and rebase all URLs in the database relatively to the new path.
"""
# Retrieve the current root path and replace it with the new one
current_root_path = execute_db('local_software_release_root', 'SELECT * from %s', one=True)['path'] or os.sep
new_root_path = app.config['local_software_release_root'] or os.sep
execute_db('local_software_release_root', 'UPDATE %s SET path=?', [new_root_path])
# Rebase all URLs relative to the new root path
if current_root_path != new_root_path:
app.logger.info('Updating local software release root path: %s --> %s', current_root_path, new_root_path)
def migrate_url(url):
if not url or urlparse(url).scheme:
app.logger.debug('Migrate URL ? N: %s is not a path', url)
return url
rel = os.path.relpath(url, current_root_path)
if rel.startswith(os.pardir + os.sep):
app.logger.debug('Migrate URL ? N: %s is not a subpath', url)
return url
new = os.path.join(new_root_path, rel)
app.logger.debug('Migrate URL ? Y: %s -> %s', url, new)
return new
g.db.create_function('migrate_url', 1, migrate_url)
execute_db('software', 'UPDATE %s SET url=migrate_url(url)')
execute_db('partition', 'UPDATE %s SET software_release=migrate_url(software_release)')
is_schema_already_executed = False is_schema_already_executed = False
@app.before_request @app.before_request
def before_request(): def before_request():
...@@ -195,6 +228,7 @@ def before_request(): ...@@ -195,6 +228,7 @@ def before_request():
global is_schema_already_executed global is_schema_already_executed
if not is_schema_already_executed: if not is_schema_already_executed:
_upgradeDatabaseIfNeeded() _upgradeDatabaseIfNeeded()
_updateLocalSoftwareReleaseRootPathIfNeeded()
is_schema_already_executed = True is_schema_already_executed = True
......
...@@ -211,6 +211,7 @@ class SlapOSConfigWriter(ConfigWriter): ...@@ -211,6 +211,7 @@ class SlapOSConfigWriter(ConfigWriter):
host = {standalone_slapos._server_ip} host = {standalone_slapos._server_ip}
port = {standalone_slapos._server_port} port = {standalone_slapos._server_port}
database_uri = {standalone_slapos._proxy_database} database_uri = {standalone_slapos._proxy_database}
local_software_release_root = {standalone_slapos._local_software_release_root}
{partition_forward_configuration} {partition_forward_configuration}
""").format(**locals())) """).format(**locals()))
...@@ -318,6 +319,7 @@ class StandaloneSlapOS(object): ...@@ -318,6 +319,7 @@ class StandaloneSlapOS(object):
shared_part_root=None, shared_part_root=None,
partition_forward_configuration=(), partition_forward_configuration=(),
slapos_bin='slapos', slapos_bin='slapos',
local_software_release_root=os.sep,
): ):
# type: (str, str, int, str, Iterable[str], Optional[str], Optional[str], Optional[str], Iterable[Union[PartitionForwardConfiguration, PartitionForwardAsPartitionConfiguration]]) -> None # type: (str, str, int, str, Iterable[str], Optional[str], Optional[str], Optional[str], Iterable[Union[PartitionForwardConfiguration, PartitionForwardAsPartitionConfiguration]]) -> None
"""Constructor, creates a standalone slapos in `base_directory`. """Constructor, creates a standalone slapos in `base_directory`.
...@@ -332,6 +334,7 @@ class StandaloneSlapOS(object): ...@@ -332,6 +334,7 @@ class StandaloneSlapOS(object):
* `shared_part_root` -- directory to hold shared parts software, default to "shared" in `base_directory`. * `shared_part_root` -- directory to hold shared parts software, default to "shared" in `base_directory`.
* `partition_forward_configuration` -- configuration of partition request forwarding to external SlapOS master. * `partition_forward_configuration` -- configuration of partition request forwarding to external SlapOS master.
* `slapos_bin` -- slapos executable to use, default to "slapos" (thus depending on the runtime PATH). * `slapos_bin` -- slapos executable to use, default to "slapos" (thus depending on the runtime PATH).
* `local_software_release_root` -- root for local Software Releases paths in the SlapOS proxy, default to `/`.
Error cases: Error cases:
* `PathTooDeepError` when `base_directory` is too deep. Because of limitation * `PathTooDeepError` when `base_directory` is too deep. Because of limitation
...@@ -344,6 +347,7 @@ class StandaloneSlapOS(object): ...@@ -344,6 +347,7 @@ class StandaloneSlapOS(object):
self._server_ip = server_ip self._server_ip = server_ip
self._server_port = server_port self._server_port = server_port
self._master_url = "http://{server_ip}:{server_port}".format(**locals()) self._master_url = "http://{server_ip}:{server_port}".format(**locals())
self._local_software_release_root = local_software_release_root
self._base_directory = base_directory self._base_directory = base_directory
self._shared_part_list = list(shared_part_list) self._shared_part_list = list(shared_part_list)
......
...@@ -79,35 +79,39 @@ class BasicMixin(object): ...@@ -79,35 +79,39 @@ class BasicMixin(object):
Will set files and start slapproxy Will set files and start slapproxy
""" """
self._tempdir = tempfile.mkdtemp() self._tempdir = tempfile.mkdtemp()
self._rootdir = self.initRootDir()
logging.basicConfig(level=logging.DEBUG) logging.basicConfig(level=logging.DEBUG)
self.setFiles() self.setFiles()
self.startProxy() self.startProxy()
os.environ.pop('SLAPGRID_INSTANCE_ROOT', None) os.environ.pop('SLAPGRID_INSTANCE_ROOT', None)
def initRootDir(self):
return self._tempdir
def createSlapOSConfigurationFile(self): def createSlapOSConfigurationFile(self):
with open(self.slapos_cfg, 'w') as f: with open(self.slapos_cfg, 'w') as f:
f.write("""[slapos] f.write("""[slapos]
software_root = %(tempdir)s/opt/slapgrid software_root = %(rootdir)s/opt/slapgrid
instance_root = %(tempdir)s/srv/slapgrid instance_root = %(rootdir)s/srv/slapgrid
master_url = %(proxyaddr)s master_url = %(proxyaddr)s
computer_id = computer computer_id = computer
[slapproxy] [slapproxy]
host = 127.0.0.1 host = 127.0.0.1
port = 8080 port = 8080
database_uri = %(tempdir)s/lib/proxy.db database_uri = %(rootdir)s/lib/proxy.db
""" % {'tempdir': self._tempdir, 'proxyaddr': self.proxyaddr}) """ % {'rootdir': self._rootdir, 'proxyaddr': self.proxyaddr})
def setFiles(self): def setFiles(self):
""" """
Set environment to run slapproxy Set environment to run slapproxy
""" """
self.slapos_cfg = os.path.join(self._tempdir, 'slapos.cfg') self.slapos_cfg = os.path.join(self._rootdir, 'slapos.cfg')
self.proxy_db = os.path.join(self._tempdir, 'lib', 'proxy.db') self.proxy_db = os.path.join(self._rootdir, 'lib', 'proxy.db')
self.proxyaddr = 'http://localhost:80/' self.proxyaddr = 'http://localhost:80/'
self.computer_id = 'computer' self.computer_id = 'computer'
self.createSlapOSConfigurationFile() self.createSlapOSConfigurationFile()
for directory in ['opt', 'srv', 'lib']: for directory in ['opt', 'srv', 'lib']:
path = os.path.join(self._tempdir, directory) path = os.path.join(self._rootdir, directory)
os.mkdir(path) os.mkdir(path)
def startProxy(self): def startProxy(self):
...@@ -1192,16 +1196,16 @@ class CliMasterMixin(MasterMixin): ...@@ -1192,16 +1196,16 @@ class CliMasterMixin(MasterMixin):
self.proxyaddr = 'http://%s:8080' % host self.proxyaddr = 'http://%s:8080' % host
with open(self.slapos_cfg, 'w') as f: with open(self.slapos_cfg, 'w') as f:
f.write("""[slapos] f.write("""[slapos]
software_root = %(tempdir)s/opt/slapgrid software_root = %(rootdir)s/opt/slapgrid
instance_root = %(tempdir)s/srv/slapgrid instance_root = %(rootdir)s/srv/slapgrid
master_url = %(proxyaddr)s master_url = %(proxyaddr)s
master_rest_url = %(proxyaddr)s/hateoas master_rest_url = %(proxyaddr)s/hateoas
computer_id = computer computer_id = computer
[slapproxy] [slapproxy]
host = %(host)s host = %(host)s
port = 8080 port = 8080
database_uri = %(tempdir)s/lib/proxy.db database_uri = %(rootdir)s/lib/proxy.db
""" % {'tempdir': self._tempdir, 'proxyaddr': self.proxyaddr, 'host': host}) """ % {'rootdir': self._rootdir, 'proxyaddr': self.proxyaddr, 'host': host})
def cliDoSlapos(self, command, method=subprocess.check_output, **kwargs): def cliDoSlapos(self, command, method=subprocess.check_output, **kwargs):
return method( return method(
...@@ -1317,7 +1321,7 @@ class TestCliInformation(CliMasterMixin): ...@@ -1317,7 +1321,7 @@ class TestCliInformation(CliMasterMixin):
], ],
) )
try: try:
output2 = self.cliDoSlapos(('service', 'info', 'MyInstance2'), stderr=subprocess.STDOUT) self.cliDoSlapos(('service', 'info', 'MyInstance2'), stderr=subprocess.STDOUT)
self.fail() self.fail()
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
self.assertIn('Instance MyInstance2 does not exist.', e.output) self.assertIn('Instance MyInstance2 does not exist.', e.output)
...@@ -1655,7 +1659,7 @@ class TestMultiMasterSupport(MasterMixin): ...@@ -1655,7 +1659,7 @@ class TestMultiMasterSupport(MasterMixin):
self.db = sqlite_connect(self.proxy_db) self.db = sqlite_connect(self.proxy_db)
self.external_slapproxy_configuration_file_location = os.path.join( self.external_slapproxy_configuration_file_location = os.path.join(
self._tempdir, 'external_slapos.cfg') self._rootdir, 'external_slapos.cfg')
self.createExternalProxyConfigurationFile() self.createExternalProxyConfigurationFile()
self.startExternalProxy() self.startExternalProxy()
...@@ -1669,9 +1673,9 @@ computer_id = %(external_computer_id)s ...@@ -1669,9 +1673,9 @@ computer_id = %(external_computer_id)s
[slapproxy] [slapproxy]
host = %(host)s host = %(host)s
port = %(port)s port = %(port)s
database_uri = %(tempdir)s/lib/external_proxy.db database_uri = %(rootdir)s/lib/external_proxy.db
""" % { """ % {
'tempdir': self._tempdir, 'rootdir': self._rootdir,
'host': self.external_proxy_host, 'host': self.external_proxy_host,
'port': self.external_proxy_port, 'port': self.external_proxy_port,
'external_computer_id': self.external_computer_id 'external_computer_id': self.external_computer_id
...@@ -1682,16 +1686,15 @@ database_uri = %(tempdir)s/lib/external_proxy.db ...@@ -1682,16 +1686,15 @@ database_uri = %(tempdir)s/lib/external_proxy.db
Start external slapproxy Start external slapproxy
""" """
logging.getLogger().info('Starting external proxy, listening to %s:%s' % (self.external_proxy_host, self.external_proxy_port)) logging.getLogger().info('Starting external proxy, listening to %s:%s' % (self.external_proxy_host, self.external_proxy_port))
# XXX This uses a hack to run current code of slapos.core
import slapos
self.external_proxy_process = subprocess.Popen( self.external_proxy_process = subprocess.Popen(
[ [
sys.executable, '%s/../cli/entry.py' % os.path.dirname(slapos.tests.__file__), sys.executable, '-m', 'slapos.cli.entry',
'proxy', 'start', '--cfg', self.external_slapproxy_configuration_file_location 'proxy', 'start', '--cfg', self.external_slapproxy_configuration_file_location
], ],
stdout=subprocess.DEVNULL, stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL, stderr=subprocess.DEVNULL,
env={"PYTHONPATH": ':'.join(sys.path)} env={"PYTHONPATH": ':'.join(sys.path)},
cwd=os.chdir(os.path.join(os.path.dirname(slapos.proxy.__file__), os.pardir, os.pardir)),
) )
# Wait a bit for proxy to be started # Wait a bit for proxy to be started
attempts = 0 attempts = 0
...@@ -1717,7 +1720,7 @@ database_uri = %(tempdir)s/lib/external_proxy.db ...@@ -1717,7 +1720,7 @@ database_uri = %(tempdir)s/lib/external_proxy.db
configuration = bytes2str(pkg_resources.resource_string( configuration = bytes2str(pkg_resources.resource_string(
'slapos.tests', os.path.join('test_slapproxy', 'slapos_multimaster.cfg.in') 'slapos.tests', os.path.join('test_slapproxy', 'slapos_multimaster.cfg.in')
)) % { )) % {
'tempdir': self._tempdir, 'proxyaddr': self.proxyaddr, 'rootdir': self._rootdir, 'proxyaddr': self.proxyaddr,
'external_proxy_host': self.external_proxy_host, 'external_proxy_host': self.external_proxy_host,
'external_proxy_port': self.external_proxy_port 'external_proxy_port': self.external_proxy_port
} }
...@@ -1926,7 +1929,7 @@ database_uri = %(tempdir)s/lib/external_proxy.db ...@@ -1926,7 +1929,7 @@ database_uri = %(tempdir)s/lib/external_proxy.db
self.assertEqual({}, partition.getConnectionParameterDict()) self.assertEqual({}, partition.getConnectionParameterDict())
with sqlite3.connect(os.path.join( with sqlite3.connect(os.path.join(
self._tempdir, self._rootdir,
'lib', 'lib',
'external_proxy.db', 'external_proxy.db',
)) as db: )) as db:
...@@ -2015,7 +2018,7 @@ database_uri = %(tempdir)s/lib/external_proxy.db ...@@ -2015,7 +2018,7 @@ database_uri = %(tempdir)s/lib/external_proxy.db
self.assertEqual({}, partition.getConnectionParameterDict()) self.assertEqual({}, partition.getConnectionParameterDict())
with sqlite3.connect(os.path.join( with sqlite3.connect(os.path.join(
self._tempdir, self._rootdir,
'lib', 'lib',
'external_proxy.db', 'external_proxy.db',
)) as db: )) as db:
...@@ -2044,13 +2047,144 @@ database_uri = %(tempdir)s/lib/external_proxy.db ...@@ -2044,13 +2047,144 @@ database_uri = %(tempdir)s/lib/external_proxy.db
}], requested_by) }], requested_by)
class TestLocalSoftwareReleaseRootPathMigration(MasterMixin):
"""
Test local URL adaptation based on the local software release root path.
"""
def initRootDir(self):
rootdir = os.path.join(self._tempdir, '0')
os.mkdir(rootdir)
return rootdir
def newRootDir(self):
return os.path.join(self._tempdir, str(1 + int(os.path.basename(self._rootdir))))
def createSlapOSConfigurationFile(self):
super(TestLocalSoftwareReleaseRootPathMigration, self).createSlapOSConfigurationFile()
with open(self.slapos_cfg, 'a') as f:
f.write("\nlocal_software_release_root = %s/opt" % self._rootdir)
def moveProxy(self, rootdir=None):
if not rootdir:
rootdir = self.newRootDir()
os.rename(self._rootdir, rootdir)
self._rootdir = rootdir
self.slapos_cfg = os.path.join(self._rootdir, 'slapos.cfg')
self.proxy_db = os.path.join(self._rootdir, 'lib', 'proxy.db')
self.createSlapOSConfigurationFile()
views.is_schema_already_executed = False
self.startProxy()
os.environ.pop('SLAPGRID_INSTANCE_ROOT', None)
def assertSoftwareUrls(self, *expected_urls):
sr_list = tuple(sr.getURI() for sr in self.getFullComputerInformation()._software_release_list)
self.assertEqual(sr_list, expected_urls)
def assertPartitionUrl(self, partition_id, expected_url):
self.assertEqual(self.getPartitionInformation(partition_id).getSoftwareRelease().getURI(), expected_url)
def checkSupplyUrl(self, initial_url, expected_url, rootdir=None):
self.supply(initial_url)
self.assertSoftwareUrls(initial_url)
self.moveProxy(rootdir)
self.assertSoftwareUrls(expected_url)
def checkRequestUrl(self, initial_url, expected_url, rootdir=None):
self.format_for_number_of_partitions(1)
partition = self.request(initial_url, None, 'MyInstance', 'slappart0')
self.assertPartitionUrl(partition._partition_id, initial_url)
self.moveProxy(rootdir)
self.assertPartitionUrl(partition._partition_id, expected_url)
def test_supply_local_url(self):
initial_url = os.path.join(self._rootdir, 'opt', 'software.cfg')
new_rootdir = self.newRootDir()
expected_url = os.path.join(new_rootdir, 'opt', 'software.cfg')
self.checkSupplyUrl(initial_url, expected_url, new_rootdir)
def test_supply_not_in_root_url(self):
url = os.path.join(self._rootdir, 'srv', 'software.cfg')
self.checkSupplyUrl(url, url)
def test_supply_http_url(self):
url = "http://sr//"
self.checkSupplyUrl(url, url)
def test_supply_https_url(self):
url = "https://sr//"
self.checkSupplyUrl(url, url)
def test_request_local_url(self):
initial_url = os.path.join(self._rootdir, 'opt', 'software.cfg')
new_rootdir = self.newRootDir()
expected_url = os.path.join(new_rootdir, 'opt', 'software.cfg')
self.checkRequestUrl(initial_url, expected_url, new_rootdir)
def test_request_not_in_root_url(self):
url = os.path.join(self._rootdir, 'srv', 'software.cfg')
self.checkRequestUrl(url, url)
def test_request_http_url(self):
url = "http://sr//"
self.checkRequestUrl(url, url)
def test_request_https_url(self):
url = "https://sr//"
self.checkRequestUrl(url, url)
def checkMultipleMoves(self, checkUrl):
initial_url = os.path.join(self._rootdir, 'opt', 'software.cfg')
for _ in range(5):
new_rootdir = self.newRootDir()
expected_url = os.path.join(new_rootdir, 'opt', 'software.cfg')
checkUrl(initial_url, expected_url, new_rootdir)
initial_url = expected_url
def test_supply_multiple_moves(self):
self.checkMultipleMoves(self.checkSupplyUrl)
def test_request_multiple_moves(self):
self.checkMultipleMoves(self.checkRequestUrl)
def test_move_logs(self):
local_sr_root = os.path.join(self._rootdir, 'opt')
subpath_url = os.path.join(local_sr_root, 'software.cfg')
path_not_subpath_url = os.path.join(self._rootdir, 'srv', 'software.cfg')
http_url = "https://sr//"
self.format_for_number_of_partitions(3)
for i, initial_url in enumerate((subpath_url, path_not_subpath_url, http_url)):
self.supply(initial_url)
self.request(initial_url, None, 'instance%d' % i, None)
self.moveProxy()
new_local_sr_root = os.path.join(self._rootdir, 'opt')
new_subpath_url = os.path.join(new_local_sr_root, 'software.cfg')
with mock.patch.object(views.app, 'logger') as logger:
# Request something to trigger update
self.getFullComputerInformation()
logger.info.assert_called_once_with(
'Updating local software release root path: %s --> %s',
local_sr_root,
new_local_sr_root,
)
logger.debug.assert_has_calls([
mock.call('Migrate URL ? Y: %s -> %s', subpath_url, new_subpath_url),
mock.call('Migrate URL ? N: %s is not a subpath', path_not_subpath_url),
mock.call('Migrate URL ? N: %s is not a path', http_url)
]*2, any_order=True)
class _MigrationTestCase(TestInformation, TestRequest, TestSlaveRequest, TestMultiNodeSupport): class _MigrationTestCase(TestInformation, TestRequest, TestSlaveRequest, TestMultiNodeSupport):
""" """
Test that old database version are automatically migrated without failure Test that old database version are automatically migrated without failure
""" """
dump_filename = NotImplemented dump_filename = NotImplemented
initial_table_list = NotImplemented initial_table_list = NotImplemented
current_version = '14' current_version = '15'
def setUp(self): def setUp(self):
TestInformation.setUp(self) TestInformation.setUp(self)
...@@ -2136,6 +2270,7 @@ class _MigrationTestCase(TestInformation, TestRequest, TestSlaveRequest, TestMul ...@@ -2136,6 +2270,7 @@ class _MigrationTestCase(TestInformation, TestRequest, TestSlaveRequest, TestMul
self.assertEqual([x[0] for x in table_list], self.assertEqual([x[0] for x in table_list],
['computer{}'.format(self.current_version), ['computer{}'.format(self.current_version),
'forwarded_partition_request{}'.format(self.current_version), 'forwarded_partition_request{}'.format(self.current_version),
'local_software_release_root{}'.format(self.current_version),
'partition{}'.format(self.current_version), 'partition{}'.format(self.current_version),
'partition_network{}'.format(self.current_version), 'partition_network{}'.format(self.current_version),
'slave{}'.format(self.current_version), 'slave{}'.format(self.current_version),
...@@ -2184,4 +2319,9 @@ class TestMigrateVersion13ToLatest(_MigrationTestCase): ...@@ -2184,4 +2319,9 @@ class TestMigrateVersion13ToLatest(_MigrationTestCase):
initial_table_list = ['computer13', 'forwarded_partition_request13', 'partition13', 'partition_network13', 'slave13', 'software13', ] initial_table_list = ['computer13', 'forwarded_partition_request13', 'partition13', 'partition_network13', 'slave13', 'software13', ]
class TestMigrateVersion14ToLatest(_MigrationTestCase):
dump_filename = 'database_dump_version_14.sql'
initial_table_list = ['computer14', 'forwarded_partition_request14', 'partition14', 'partition_network14', 'slave14', 'software14', ]
del _MigrationTestCase del _MigrationTestCase
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE software14 (
url VARCHAR(255),
computer_reference VARCHAR(255) DEFAULT 'computer',
requested_state VARCHAR(255) DEFAULT 'available',
CONSTRAINT uniq PRIMARY KEY (url, computer_reference)
);
INSERT INTO "software14" VALUES('/srv/slapgrid//srv//runner/project//slapos/software.cfg','computer','available');
CREATE TABLE computer14 (
reference VARCHAR(255) DEFAULT 'computer',
address VARCHAR(255),
netmask VARCHAR(255),
CONSTRAINT uniq PRIMARY KEY (reference)
);
INSERT INTO "computer14" VALUES('computer','127.0.0.1','255.255.255.255');
CREATE TABLE partition14 (
reference VARCHAR(255),
computer_reference VARCHAR(255) DEFAULT 'computer',
slap_state VARCHAR(255) DEFAULT 'free',
software_release VARCHAR(255),
xml TEXT,
connection_xml TEXT,
slave_instance_list TEXT,
software_type VARCHAR(255),
partition_reference VARCHAR(255), -- name of the instance
requested_by VARCHAR(255), -- only used for debugging,
-- slapproxy does not support proper scope
requested_state VARCHAR(255) NOT NULL DEFAULT 'started',
timestamp REAL,
CONSTRAINT uniq PRIMARY KEY (reference, computer_reference)
);
INSERT INTO "partition14" VALUES('slappart0','computer','busy','/srv/slapgrid//srv//runner/project//slapos/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?>
<instance>
<parameter id="json">{
"site-id": "erp5"
}
}</parameter>
</instance>
',NULL,NULL,'production','slapos',NULL,'started',NULL);
INSERT INTO "partition14" VALUES('slappart1','computer','busy','/srv/slapgrid//srv//runner/project//slapos/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?>
<instance/>
','<?xml version=''1.0'' encoding=''utf-8''?>
<instance>
<parameter id="url">mysql://127.0.0.1:45678/erp5</parameter>
</instance>
',NULL,'mariadb','MariaDB DataBase','slappart0','started',NULL);
INSERT INTO "partition14" VALUES('slappart2','computer','busy','/srv/slapgrid//srv//runner/project//slapos/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?>
<instance>
<parameter id="cloudooo-json"></parameter>
</instance>
','<?xml version=''1.0'' encoding=''utf-8''?>
<instance>
<parameter id="url">cloudooo://127.0.0.1:23000/</parameter>
</instance>
',NULL,'cloudooo','Cloudooo','slappart0','started',NULL);
INSERT INTO "partition14" VALUES('slappart3','computer','busy','/srv/slapgrid//srv//runner/project//slapos/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?>
<instance/>
','<?xml version=''1.0'' encoding=''utf-8''?>
<instance>
<parameter id="url">memcached://127.0.0.1:11000/</parameter>
</instance>
',NULL,'memcached','Memcached','slappart0','started',NULL);
INSERT INTO "partition14" VALUES('slappart4','computer','busy','/srv/slapgrid//srv//runner/project//slapos/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?>
<instance/>
','<?xml version=''1.0'' encoding=''utf-8''?>
<instance>
<parameter id="url">memcached://127.0.0.1:13301/</parameter>
</instance>
',NULL,'kumofs','KumoFS','slappart0','started',NULL);
INSERT INTO "partition14" VALUES('slappart5','computer','busy','/srv/slapgrid//srv//runner/project//slapos/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?>
<instance>
<parameter id="kumofs-url">memcached://127.0.0.1:13301/</parameter>
<parameter id="memcached-url">memcached://127.0.0.1:11000/</parameter>
<parameter id="cloudooo-url">cloudooo://127.0.0.1:23000/</parameter>
</instance>
','<?xml version=''1.0'' encoding=''utf-8''?>
<instance>
<parameter id="url">https://[fc00::1]:10001</parameter>
</instance>
',NULL,'tidstorage','TidStorage','slappart0','started',NULL);
INSERT INTO "partition14" VALUES('slappart6','computer','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started',NULL);
INSERT INTO "partition14" VALUES('slappart7','computer','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started',NULL);
INSERT INTO "partition14" VALUES('slappart8','computer','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started',NULL);
INSERT INTO "partition14" VALUES('slappart9','computer','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started',NULL);
CREATE TABLE slave14 (
reference VARCHAR(255), -- unique slave reference
computer_reference VARCHAR(255) DEFAULT 'computer',
connection_xml TEXT,
hosted_by VARCHAR(255),
asked_by VARCHAR(255) -- only used for debugging,
-- slapproxy does not support proper scope
);
CREATE TABLE partition_network14 (
partition_reference VARCHAR(255),
computer_reference VARCHAR(255) DEFAULT 'computer',
reference VARCHAR(255),
address VARCHAR(255),
netmask VARCHAR(255)
);
INSERT INTO "partition_network14" VALUES('slappart0','computer','slappart0','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart0','computer','slappart0','fc00::1','ffff:ffff:ffff::');
INSERT INTO "partition_network14" VALUES('slappart1','computer','slappart1','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart1','computer','slappart1','fc00::1','ffff:ffff:ffff::');
INSERT INTO "partition_network14" VALUES('slappart2','computer','slappart2','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart2','computer','slappart2','fc00::1','ffff:ffff:ffff::');
INSERT INTO "partition_network14" VALUES('slappart3','computer','slappart3','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart3','computer','slappart3','fc00::1','ffff:ffff:ffff::');
INSERT INTO "partition_network14" VALUES('slappart4','computer','slappart4','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart4','computer','slappart4','fc00::1','ffff:ffff:ffff::');
INSERT INTO "partition_network14" VALUES('slappart5','computer','slappart5','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart5','computer','slappart5','fc00::1','ffff:ffff:ffff::');
INSERT INTO "partition_network14" VALUES('slappart6','computer','slappart6','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart6','computer','slappart6','fc00::1','ffff:ffff:ffff::');
INSERT INTO "partition_network14" VALUES('slappart7','computer','slappart7','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart7','computer','slappart7','fc00::1','ffff:ffff:ffff::');
INSERT INTO "partition_network14" VALUES('slappart8','computer','slappart8','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart8','computer','slappart8','fc00::1','ffff:ffff:ffff::');
INSERT INTO "partition_network14" VALUES('slappart9','computer','slappart9','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart9','computer','slappart9','fc00::1','ffff:ffff:ffff::');
CREATE TABLE forwarded_partition_request14 (
partition_reference VARCHAR(255), -- a.k.a source_instance_id
master_url VARCHAR(255)
);
COMMIT;
PRAGMA foreign_keys=OFF; PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION; BEGIN TRANSACTION;
CREATE TABLE software14 ( CREATE TABLE local_software_release_root15 (
path VARCHAR(255)
);
INSERT INTO "local_software_release_root15" VALUES('/');
CREATE TABLE software15 (
url VARCHAR(255), url VARCHAR(255),
computer_reference VARCHAR(255) DEFAULT 'slaprunner', computer_reference VARCHAR(255) DEFAULT 'slaprunner',
requested_state VARCHAR(255) DEFAULT 'available', requested_state VARCHAR(255) DEFAULT 'available',
CONSTRAINT uniq PRIMARY KEY (url, computer_reference) CONSTRAINT uniq PRIMARY KEY (url, computer_reference)
); );
INSERT INTO "software14" VALUES('/srv/slapgrid/slappart8/srv/runner/project/slapos/software/seleniumrunner/software.cfg','slaprunner','available'); INSERT INTO "software15" VALUES('/srv/slapgrid/slappart8/srv/runner/project/slapos/software/seleniumrunner/software.cfg','slaprunner','available');
INSERT INTO "software14" VALUES('/srv/slapgrid/slappart8/srv/runner/project/slapos/software/evil/software.cfg','slaprunner','available'); INSERT INTO "software15" VALUES('/srv/slapgrid/slappart8/srv/runner/project/slapos/software/evil/software.cfg','slaprunner','available');
INSERT INTO "software14" VALUES('/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','slaprunner','available'); INSERT INTO "software15" VALUES('/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','slaprunner','available');
CREATE TABLE computer14 ( CREATE TABLE computer15 (
reference VARCHAR(255) DEFAULT 'slaprunner', reference VARCHAR(255) DEFAULT 'slaprunner',
address VARCHAR(255), address VARCHAR(255),
netmask VARCHAR(255), netmask VARCHAR(255),
CONSTRAINT uniq PRIMARY KEY (reference) CONSTRAINT uniq PRIMARY KEY (reference)
); );
INSERT INTO "computer14" VALUES('slaprunner','10.0.30.235','255.255.255.255'); INSERT INTO "computer15" VALUES('slaprunner','10.0.30.235','255.255.255.255');
CREATE TABLE partition14 ( CREATE TABLE partition15 (
reference VARCHAR(255), reference VARCHAR(255),
computer_reference VARCHAR(255) DEFAULT 'slaprunner', computer_reference VARCHAR(255) DEFAULT 'slaprunner',
slap_state VARCHAR(255) DEFAULT 'free', slap_state VARCHAR(255) DEFAULT 'free',
...@@ -32,7 +36,7 @@ CREATE TABLE partition14 ( ...@@ -32,7 +36,7 @@ CREATE TABLE partition14 (
timestamp REAL, timestamp REAL,
CONSTRAINT uniq PRIMARY KEY (reference, computer_reference) CONSTRAINT uniq PRIMARY KEY (reference, computer_reference)
); );
INSERT INTO "partition14" VALUES('slappart0','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?> INSERT INTO "partition15" VALUES('slappart0','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?>
<instance> <instance>
<parameter id="_">{ <parameter id="_">{
"mariadb": { "mariadb": {
...@@ -80,7 +84,7 @@ INSERT INTO "partition14" VALUES('slappart0','slaprunner','busy','/srv/slapgrid/ ...@@ -80,7 +84,7 @@ INSERT INTO "partition14" VALUES('slappart0','slaprunner','busy','/srv/slapgrid/
<parameter id="_">{"hosts-dict": {"erp5-cloudooo": "cloudooo.erp5.net", "erp5-smtp": "127.0.0.2", "erp5-catalog-0": "10.0.30.235", "erp5-memcached-volatile": "10.0.30.235", "erp5-memcached-persistent": "10.0.30.235"}, "login-test-runner-url-list": ["https://10.0.30.235:2157/unit_test_0/", "https://10.0.30.235:2157/unit_test_1/", "https://10.0.30.235:2157/unit_test_2/"], "monitor-setup-url": "https://monitor.app.officejs.com/#page=settings_configurator&amp;url=/public/feeds&amp;username=admin&amp;password=password", "family-login-v6": "https://[::1]:2159", "deadlock-debugger-password": "password", "family-login": "https://10.0.30.235:2159", "inituser-login": "zope", "inituser-password": "password", "family-activities": "https://10.0.30.235:2155", "monitor-base-url": "", "site-id": "erp5", "mariadb-test-database-list": ["mysql://testuser_0:testpassword0@10.0.30.235:2099/erp5_test_0", "mysql://testuser_1:testpassword1@10.0.30.235:2099/erp5_test_1", "mysql://testuser_2:testpassword2@10.0.30.235:2099/erp5_test_2", "mysql://testuser_3:testpassword3@10.0.30.235:2099/erp5_test_3", "mysql://testuser_4:testpassword4@10.0.30.235:2099/erp5_test_4", "mysql://testuser_5:testpassword5@10.0.30.235:2099/erp5_test_5", "mysql://testuser_6:testpassword6@10.0.30.235:2099/erp5_test_6", "mysql://testuser_7:testpassword7@10.0.30.235:2099/erp5_test_7", "mysql://testuser_8:testpassword8@10.0.30.235:2099/erp5_test_8", "mysql://testuser_9:testpassword9@10.0.30.235:2099/erp5_test_9", "mysql://testuser_10:testpassword10@10.0.30.235:2099/erp5_test_10", "mysql://testuser_11:testpassword11@10.0.30.235:2099/erp5_test_11"], "mariadb-database-list": ["mysql://user:insecure@10.0.30.235:2099/erp5"], "memcached-volatile-url": "memcached://10.0.30.235:2013/", "memcached-persistent-url": "memcached://10.0.30.235:2003/", "caucase-http-url": "http://[::1]:8890", "activities-test-runner-url-list": ["https://10.0.30.235:2153/unit_test_0/", "https://10.0.30.235:2153/unit_test_1/", "https://10.0.30.235:2153/unit_test_2/"], "family-activities-v6": "https://[::1]:2155"}</parameter> <parameter id="_">{"hosts-dict": {"erp5-cloudooo": "cloudooo.erp5.net", "erp5-smtp": "127.0.0.2", "erp5-catalog-0": "10.0.30.235", "erp5-memcached-volatile": "10.0.30.235", "erp5-memcached-persistent": "10.0.30.235"}, "login-test-runner-url-list": ["https://10.0.30.235:2157/unit_test_0/", "https://10.0.30.235:2157/unit_test_1/", "https://10.0.30.235:2157/unit_test_2/"], "monitor-setup-url": "https://monitor.app.officejs.com/#page=settings_configurator&amp;url=/public/feeds&amp;username=admin&amp;password=password", "family-login-v6": "https://[::1]:2159", "deadlock-debugger-password": "password", "family-login": "https://10.0.30.235:2159", "inituser-login": "zope", "inituser-password": "password", "family-activities": "https://10.0.30.235:2155", "monitor-base-url": "", "site-id": "erp5", "mariadb-test-database-list": ["mysql://testuser_0:testpassword0@10.0.30.235:2099/erp5_test_0", "mysql://testuser_1:testpassword1@10.0.30.235:2099/erp5_test_1", "mysql://testuser_2:testpassword2@10.0.30.235:2099/erp5_test_2", "mysql://testuser_3:testpassword3@10.0.30.235:2099/erp5_test_3", "mysql://testuser_4:testpassword4@10.0.30.235:2099/erp5_test_4", "mysql://testuser_5:testpassword5@10.0.30.235:2099/erp5_test_5", "mysql://testuser_6:testpassword6@10.0.30.235:2099/erp5_test_6", "mysql://testuser_7:testpassword7@10.0.30.235:2099/erp5_test_7", "mysql://testuser_8:testpassword8@10.0.30.235:2099/erp5_test_8", "mysql://testuser_9:testpassword9@10.0.30.235:2099/erp5_test_9", "mysql://testuser_10:testpassword10@10.0.30.235:2099/erp5_test_10", "mysql://testuser_11:testpassword11@10.0.30.235:2099/erp5_test_11"], "mariadb-database-list": ["mysql://user:insecure@10.0.30.235:2099/erp5"], "memcached-volatile-url": "memcached://10.0.30.235:2013/", "memcached-persistent-url": "memcached://10.0.30.235:2003/", "caucase-http-url": "http://[::1]:8890", "activities-test-runner-url-list": ["https://10.0.30.235:2153/unit_test_0/", "https://10.0.30.235:2153/unit_test_1/", "https://10.0.30.235:2153/unit_test_2/"], "family-activities-v6": "https://[::1]:2155"}</parameter>
</instance> </instance>
',NULL,'default','slaprunner-dev-local-frontend-2',NULL,'started',NULL); ',NULL,'default','slaprunner-dev-local-frontend-2',NULL,'started',NULL);
INSERT INTO "partition14" VALUES('slappart1','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?> INSERT INTO "partition15" VALUES('slappart1','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?>
<instance> <instance>
<parameter id="_">{"use-ipv6": false, "auto-sign-csr-amount": 2, "server-port": 8890, "name": "caucase", "server-https-port": 8891}</parameter> <parameter id="_">{"use-ipv6": false, "auto-sign-csr-amount": 2, "server-port": 8890, "name": "caucase", "server-https-port": 8891}</parameter>
</instance> </instance>
...@@ -89,7 +93,7 @@ INSERT INTO "partition14" VALUES('slappart1','slaprunner','busy','/srv/slapgrid/ ...@@ -89,7 +93,7 @@ INSERT INTO "partition14" VALUES('slappart1','slaprunner','busy','/srv/slapgrid/
<parameter id="_">{"http-url": "http://[::1]:8890", "https-url": "https://[::1]:8891", "init-user": "admin"}</parameter> <parameter id="_">{"http-url": "http://[::1]:8890", "https-url": "https://[::1]:8891", "init-user": "admin"}</parameter>
</instance> </instance>
',NULL,'caucase','caucase','slappart0','started',NULL); ',NULL,'caucase','caucase','slappart0','started',NULL);
INSERT INTO "partition14" VALUES('slappart2','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?> INSERT INTO "partition15" VALUES('slappart2','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?>
<instance> <instance>
<parameter id="_">{"use-ipv6": false, "monitor-passwd": "password", "tcpv4-port": 2000, "name": "memcached-persistent"}</parameter> <parameter id="_">{"use-ipv6": false, "monitor-passwd": "password", "tcpv4-port": 2000, "name": "memcached-persistent"}</parameter>
</instance> </instance>
...@@ -98,7 +102,7 @@ INSERT INTO "partition14" VALUES('slappart2','slaprunner','busy','/srv/slapgrid/ ...@@ -98,7 +102,7 @@ INSERT INTO "partition14" VALUES('slappart2','slaprunner','busy','/srv/slapgrid/
<parameter id="_">{"url": "memcached://10.0.30.235:2003/", "monitor-base-url": ""}</parameter> <parameter id="_">{"url": "memcached://10.0.30.235:2003/", "monitor-base-url": ""}</parameter>
</instance> </instance>
',NULL,'kumofs','memcached-persistent','slappart0','started',NULL); ',NULL,'kumofs','memcached-persistent','slappart0','started',NULL);
INSERT INTO "partition14" VALUES('slappart3','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?> INSERT INTO "partition15" VALUES('slappart3','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?>
<instance> <instance>
<parameter id="_">{"use-ipv6": false, "monitor-passwd": "password", "tcpv4-port": 2010, "name": "memcached-volatile", "ram-storage-size": 64}</parameter> <parameter id="_">{"use-ipv6": false, "monitor-passwd": "password", "tcpv4-port": 2010, "name": "memcached-volatile", "ram-storage-size": 64}</parameter>
</instance> </instance>
...@@ -107,7 +111,7 @@ INSERT INTO "partition14" VALUES('slappart3','slaprunner','busy','/srv/slapgrid/ ...@@ -107,7 +111,7 @@ INSERT INTO "partition14" VALUES('slappart3','slaprunner','busy','/srv/slapgrid/
<parameter id="_">{"url": "memcached://10.0.30.235:2013/", "monitor-base-url": ""}</parameter> <parameter id="_">{"url": "memcached://10.0.30.235:2013/", "monitor-base-url": ""}</parameter>
</instance> </instance>
',NULL,'kumofs','memcached-volatile','slappart0','started',NULL); ',NULL,'kumofs','memcached-volatile','slappart0','started',NULL);
INSERT INTO "partition14" VALUES('slappart4','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?> INSERT INTO "partition15" VALUES('slappart4','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?>
<instance> <instance>
<parameter id="_">{"monitor-passwd": "password", "name": "mariadb", "use-ipv6": false, "tcpv4-port": 2099, "test-database-amount": 12, "innodb-log-file-size": 134217728, "slowest-query-threshold": "", "innodb-buffer-pool-size": 1073741824, "max-slowqueries-threshold": 1000}</parameter> <parameter id="_">{"monitor-passwd": "password", "name": "mariadb", "use-ipv6": false, "tcpv4-port": 2099, "test-database-amount": 12, "innodb-log-file-size": 134217728, "slowest-query-threshold": "", "innodb-buffer-pool-size": 1073741824, "max-slowqueries-threshold": 1000}</parameter>
</instance> </instance>
...@@ -116,7 +120,7 @@ INSERT INTO "partition14" VALUES('slappart4','slaprunner','busy','/srv/slapgrid/ ...@@ -116,7 +120,7 @@ INSERT INTO "partition14" VALUES('slappart4','slaprunner','busy','/srv/slapgrid/
<parameter id="_">{"monitor-base-url": "", "server-id": 3739295806, "database-list": ["mysql://user:insecure@10.0.30.235:2099/erp5"], "test-database-list": ["mysql://testuser_0:testpassword0@10.0.30.235:2099/erp5_test_0", "mysql://testuser_1:testpassword1@10.0.30.235:2099/erp5_test_1", "mysql://testuser_2:testpassword2@10.0.30.235:2099/erp5_test_2", "mysql://testuser_3:testpassword3@10.0.30.235:2099/erp5_test_3", "mysql://testuser_4:testpassword4@10.0.30.235:2099/erp5_test_4", "mysql://testuser_5:testpassword5@10.0.30.235:2099/erp5_test_5", "mysql://testuser_6:testpassword6@10.0.30.235:2099/erp5_test_6", "mysql://testuser_7:testpassword7@10.0.30.235:2099/erp5_test_7", "mysql://testuser_8:testpassword8@10.0.30.235:2099/erp5_test_8", "mysql://testuser_9:testpassword9@10.0.30.235:2099/erp5_test_9", "mysql://testuser_10:testpassword10@10.0.30.235:2099/erp5_test_10", "mysql://testuser_11:testpassword11@10.0.30.235:2099/erp5_test_11"]}</parameter> <parameter id="_">{"monitor-base-url": "", "server-id": 3739295806, "database-list": ["mysql://user:insecure@10.0.30.235:2099/erp5"], "test-database-list": ["mysql://testuser_0:testpassword0@10.0.30.235:2099/erp5_test_0", "mysql://testuser_1:testpassword1@10.0.30.235:2099/erp5_test_1", "mysql://testuser_2:testpassword2@10.0.30.235:2099/erp5_test_2", "mysql://testuser_3:testpassword3@10.0.30.235:2099/erp5_test_3", "mysql://testuser_4:testpassword4@10.0.30.235:2099/erp5_test_4", "mysql://testuser_5:testpassword5@10.0.30.235:2099/erp5_test_5", "mysql://testuser_6:testpassword6@10.0.30.235:2099/erp5_test_6", "mysql://testuser_7:testpassword7@10.0.30.235:2099/erp5_test_7", "mysql://testuser_8:testpassword8@10.0.30.235:2099/erp5_test_8", "mysql://testuser_9:testpassword9@10.0.30.235:2099/erp5_test_9", "mysql://testuser_10:testpassword10@10.0.30.235:2099/erp5_test_10", "mysql://testuser_11:testpassword11@10.0.30.235:2099/erp5_test_11"]}</parameter>
</instance> </instance>
',NULL,'mariadb','mariadb','slappart0','started',NULL); ',NULL,'mariadb','mariadb','slappart0','started',NULL);
INSERT INTO "partition14" VALUES('slappart5','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?> INSERT INTO "partition15" VALUES('slappart5','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?>
<instance> <instance>
<parameter id="_">{"use-ipv6": false, "monitor-passwd": "password", "tcpv4-port": 2100, "name": "zodb", "zodb-dict": {"root": {"family": "1"}}}</parameter> <parameter id="_">{"use-ipv6": false, "monitor-passwd": "password", "tcpv4-port": 2100, "name": "zodb", "zodb-dict": {"root": {"family": "1"}}}</parameter>
</instance> </instance>
...@@ -125,7 +129,7 @@ INSERT INTO "partition14" VALUES('slappart5','slaprunner','busy','/srv/slapgrid/ ...@@ -125,7 +129,7 @@ INSERT INTO "partition14" VALUES('slappart5','slaprunner','busy','/srv/slapgrid/
<parameter id="_">{"storage-dict": {"root": {"storage": "root", "server": "10.0.30.235:2100"}}, "tidstorage-ip": "", "monitor-base-url": "", "tidstorage-port": ""}</parameter> <parameter id="_">{"storage-dict": {"root": {"storage": "root", "server": "10.0.30.235:2100"}}, "tidstorage-ip": "", "monitor-base-url": "", "tidstorage-port": ""}</parameter>
</instance> </instance>
',NULL,'zodb-zeo','zodb','slappart0','started',NULL); ',NULL,'zodb-zeo','zodb','slappart0','started',NULL);
INSERT INTO "partition14" VALUES('slappart6','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?> INSERT INTO "partition15" VALUES('slappart6','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?>
<instance> <instance>
<parameter id="_">{"zodb-dict": {"root": {"storage-dict": {"cache-size": "20MB"}, "mount-point": "/", "type": "zeo", "cache-size": 50000}}, "site-id": "erp5", "webdav": false, "saucelabs-dict": {}, "tidstorage-port": "", "hosts-dict": {}, "hostalias-dict": {}, "large-file-threshold": "10MB", "bt5-repository-url": "/srv/slapgrid/slappart8/srv/runner/software/287375f0cba269902ba1bc50242839d7/parts/erp5/bt5 /srv/slapgrid/slappart8/srv/runner/software/287375f0cba269902ba1bc50242839d7/parts/erp5/product/ERP5/bootstrap", "test-runner-apache-url-list": ["https://10.0.30.235:2153/unit_test_0/", "https://10.0.30.235:2153/unit_test_1/", "https://10.0.30.235:2153/unit_test_2/"], "timezone": "Asia/Tokyo", "cloudooo-url": "https://cloudooo.erp5.net/", "mysql-test-url-list": ["mysql://testuser_0:testpassword0@10.0.30.235:2099/erp5_test_0", "mysql://testuser_1:testpassword1@10.0.30.235:2099/erp5_test_1", "mysql://testuser_2:testpassword2@10.0.30.235:2099/erp5_test_2", "mysql://testuser_3:testpassword3@10.0.30.235:2099/erp5_test_3", "mysql://testuser_4:testpassword4@10.0.30.235:2099/erp5_test_4", "mysql://testuser_5:testpassword5@10.0.30.235:2099/erp5_test_5", "mysql://testuser_6:testpassword6@10.0.30.235:2099/erp5_test_6", "mysql://testuser_7:testpassword7@10.0.30.235:2099/erp5_test_7", "mysql://testuser_8:testpassword8@10.0.30.235:2099/erp5_test_8", "mysql://testuser_9:testpassword9@10.0.30.235:2099/erp5_test_9", "mysql://testuser_10:testpassword10@10.0.30.235:2099/erp5_test_10", "mysql://testuser_11:testpassword11@10.0.30.235:2099/erp5_test_11"], "inituser-password": "password", "deadlock-debugger-password": "password", "port-base": 2200, "longrequest-logger-interval": -1, "memcached-url": "memcached://10.0.30.235:2013/", "smtp-url": "smtp://127.0.0.2:0/", "test-runner-enabled": true, "kumofs-url": "memcached://10.0.30.235:2003/", "inituser-login": "zope", "thread-amount": 2, "zodb-zeo": {"root": {"storage": "root", "server": "10.0.30.235:2100"}}, "id-store-interval": null, "caucase-url": "http://[::1]:8890", "test-runner-node-count": 3, "cloudooo-retry-count": "2", "mysql-url-list": ["mysql://user:insecure@10.0.30.235:2099/erp5"], "wendelin-core-zblk-fmt": "", "timerserver-interval": 1, "monitor-passwd": "password", "name": "activities", "tidstorage-ip": "", "bt5": "erp5_full_text_myisam_catalog erp5_configurator_standard erp5_configurator_maxma_demo erp5_configurator_run_my_doc", "private-dev-shm": "", "developer-list": ["zope"], "use-ipv6": false, "instance-count": 4, "longrequest-logger-timeout": 1}</parameter> <parameter id="_">{"zodb-dict": {"root": {"storage-dict": {"cache-size": "20MB"}, "mount-point": "/", "type": "zeo", "cache-size": 50000}}, "site-id": "erp5", "webdav": false, "saucelabs-dict": {}, "tidstorage-port": "", "hosts-dict": {}, "hostalias-dict": {}, "large-file-threshold": "10MB", "bt5-repository-url": "/srv/slapgrid/slappart8/srv/runner/software/287375f0cba269902ba1bc50242839d7/parts/erp5/bt5 /srv/slapgrid/slappart8/srv/runner/software/287375f0cba269902ba1bc50242839d7/parts/erp5/product/ERP5/bootstrap", "test-runner-apache-url-list": ["https://10.0.30.235:2153/unit_test_0/", "https://10.0.30.235:2153/unit_test_1/", "https://10.0.30.235:2153/unit_test_2/"], "timezone": "Asia/Tokyo", "cloudooo-url": "https://cloudooo.erp5.net/", "mysql-test-url-list": ["mysql://testuser_0:testpassword0@10.0.30.235:2099/erp5_test_0", "mysql://testuser_1:testpassword1@10.0.30.235:2099/erp5_test_1", "mysql://testuser_2:testpassword2@10.0.30.235:2099/erp5_test_2", "mysql://testuser_3:testpassword3@10.0.30.235:2099/erp5_test_3", "mysql://testuser_4:testpassword4@10.0.30.235:2099/erp5_test_4", "mysql://testuser_5:testpassword5@10.0.30.235:2099/erp5_test_5", "mysql://testuser_6:testpassword6@10.0.30.235:2099/erp5_test_6", "mysql://testuser_7:testpassword7@10.0.30.235:2099/erp5_test_7", "mysql://testuser_8:testpassword8@10.0.30.235:2099/erp5_test_8", "mysql://testuser_9:testpassword9@10.0.30.235:2099/erp5_test_9", "mysql://testuser_10:testpassword10@10.0.30.235:2099/erp5_test_10", "mysql://testuser_11:testpassword11@10.0.30.235:2099/erp5_test_11"], "inituser-password": "password", "deadlock-debugger-password": "password", "port-base": 2200, "longrequest-logger-interval": -1, "memcached-url": "memcached://10.0.30.235:2013/", "smtp-url": "smtp://127.0.0.2:0/", "test-runner-enabled": true, "kumofs-url": "memcached://10.0.30.235:2003/", "inituser-login": "zope", "thread-amount": 2, "zodb-zeo": {"root": {"storage": "root", "server": "10.0.30.235:2100"}}, "id-store-interval": null, "caucase-url": "http://[::1]:8890", "test-runner-node-count": 3, "cloudooo-retry-count": "2", "mysql-url-list": ["mysql://user:insecure@10.0.30.235:2099/erp5"], "wendelin-core-zblk-fmt": "", "timerserver-interval": 1, "monitor-passwd": "password", "name": "activities", "tidstorage-ip": "", "bt5": "erp5_full_text_myisam_catalog erp5_configurator_standard erp5_configurator_maxma_demo erp5_configurator_run_my_doc", "private-dev-shm": "", "developer-list": ["zope"], "use-ipv6": false, "instance-count": 4, "longrequest-logger-timeout": 1}</parameter>
</instance> </instance>
...@@ -134,7 +138,7 @@ INSERT INTO "partition14" VALUES('slappart6','slaprunner','busy','/srv/slapgrid/ ...@@ -134,7 +138,7 @@ INSERT INTO "partition14" VALUES('slappart6','slaprunner','busy','/srv/slapgrid/
<parameter id="_">{"hosts-dict": {"erp5-cloudooo": "cloudooo.erp5.net", "erp5-smtp": "127.0.0.2", "erp5-catalog-0": "10.0.30.235", "erp5-memcached-volatile": "10.0.30.235", "erp5-memcached-persistent": "10.0.30.235"}, "test-runner-address-list": [["10.0.30.235", 2200], ["10.0.30.235", 2201], ["10.0.30.235", 2202]], "monitor-base-url": "", "zope-address-list": [["10.0.30.235:2203", 2, false], ["10.0.30.235:2204", 2, false], ["10.0.30.235:2205", 2, false], ["10.0.30.235:2206", 2, false]]}</parameter> <parameter id="_">{"hosts-dict": {"erp5-cloudooo": "cloudooo.erp5.net", "erp5-smtp": "127.0.0.2", "erp5-catalog-0": "10.0.30.235", "erp5-memcached-volatile": "10.0.30.235", "erp5-memcached-persistent": "10.0.30.235"}, "test-runner-address-list": [["10.0.30.235", 2200], ["10.0.30.235", 2201], ["10.0.30.235", 2202]], "monitor-base-url": "", "zope-address-list": [["10.0.30.235:2203", 2, false], ["10.0.30.235:2204", 2, false], ["10.0.30.235:2205", 2, false], ["10.0.30.235:2206", 2, false]]}</parameter>
</instance> </instance>
',NULL,'zope','zope-activities','slappart0','started',NULL); ',NULL,'zope','zope-activities','slappart0','started',NULL);
INSERT INTO "partition14" VALUES('slappart7','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?> INSERT INTO "partition15" VALUES('slappart7','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?>
<instance> <instance>
<parameter id="_">{"zodb-dict": {"root": {"storage-dict": {"cache-size": "20MB"}, "mount-point": "/", "type": "zeo", "cache-size": 50000}}, "site-id": "erp5", "webdav": false, "saucelabs-dict": {}, "tidstorage-port": "", "hosts-dict": {}, "hostalias-dict": {}, "large-file-threshold": "10MB", "bt5-repository-url": "/srv/slapgrid/slappart8/srv/runner/software/287375f0cba269902ba1bc50242839d7/parts/erp5/bt5 /srv/slapgrid/slappart8/srv/runner/software/287375f0cba269902ba1bc50242839d7/parts/erp5/product/ERP5/bootstrap", "test-runner-apache-url-list": ["https://10.0.30.235:2157/unit_test_0/", "https://10.0.30.235:2157/unit_test_1/", "https://10.0.30.235:2157/unit_test_2/"], "timezone": "Asia/Tokyo", "cloudooo-url": "https://cloudooo.erp5.net/", "mysql-test-url-list": ["mysql://testuser_0:testpassword0@10.0.30.235:2099/erp5_test_0", "mysql://testuser_1:testpassword1@10.0.30.235:2099/erp5_test_1", "mysql://testuser_2:testpassword2@10.0.30.235:2099/erp5_test_2", "mysql://testuser_3:testpassword3@10.0.30.235:2099/erp5_test_3", "mysql://testuser_4:testpassword4@10.0.30.235:2099/erp5_test_4", "mysql://testuser_5:testpassword5@10.0.30.235:2099/erp5_test_5", "mysql://testuser_6:testpassword6@10.0.30.235:2099/erp5_test_6", "mysql://testuser_7:testpassword7@10.0.30.235:2099/erp5_test_7", "mysql://testuser_8:testpassword8@10.0.30.235:2099/erp5_test_8", "mysql://testuser_9:testpassword9@10.0.30.235:2099/erp5_test_9", "mysql://testuser_10:testpassword10@10.0.30.235:2099/erp5_test_10", "mysql://testuser_11:testpassword11@10.0.30.235:2099/erp5_test_11"], "inituser-password": "password", "deadlock-debugger-password": "password", "port-base": 2200, "longrequest-logger-interval": -1, "memcached-url": "memcached://10.0.30.235:2013/", "smtp-url": "smtp://127.0.0.2:0/", "test-runner-enabled": true, "kumofs-url": "memcached://10.0.30.235:2003/", "inituser-login": "zope", "thread-amount": 10, "zodb-zeo": {"root": {"storage": "root", "server": "10.0.30.235:2100"}}, "id-store-interval": null, "caucase-url": "http://[::1]:8890", "test-runner-node-count": 3, "cloudooo-retry-count": "2", "mysql-url-list": ["mysql://user:insecure@10.0.30.235:2099/erp5"], "wendelin-core-zblk-fmt": "", "timerserver-interval": 1, "monitor-passwd": "password", "name": "backend", "tidstorage-ip": "", "bt5": "erp5_full_text_myisam_catalog erp5_configurator_standard erp5_configurator_maxma_demo erp5_configurator_run_my_doc", "private-dev-shm": "", "developer-list": ["zope"], "use-ipv6": false, "instance-count": 2, "longrequest-logger-timeout": 1}</parameter> <parameter id="_">{"zodb-dict": {"root": {"storage-dict": {"cache-size": "20MB"}, "mount-point": "/", "type": "zeo", "cache-size": 50000}}, "site-id": "erp5", "webdav": false, "saucelabs-dict": {}, "tidstorage-port": "", "hosts-dict": {}, "hostalias-dict": {}, "large-file-threshold": "10MB", "bt5-repository-url": "/srv/slapgrid/slappart8/srv/runner/software/287375f0cba269902ba1bc50242839d7/parts/erp5/bt5 /srv/slapgrid/slappart8/srv/runner/software/287375f0cba269902ba1bc50242839d7/parts/erp5/product/ERP5/bootstrap", "test-runner-apache-url-list": ["https://10.0.30.235:2157/unit_test_0/", "https://10.0.30.235:2157/unit_test_1/", "https://10.0.30.235:2157/unit_test_2/"], "timezone": "Asia/Tokyo", "cloudooo-url": "https://cloudooo.erp5.net/", "mysql-test-url-list": ["mysql://testuser_0:testpassword0@10.0.30.235:2099/erp5_test_0", "mysql://testuser_1:testpassword1@10.0.30.235:2099/erp5_test_1", "mysql://testuser_2:testpassword2@10.0.30.235:2099/erp5_test_2", "mysql://testuser_3:testpassword3@10.0.30.235:2099/erp5_test_3", "mysql://testuser_4:testpassword4@10.0.30.235:2099/erp5_test_4", "mysql://testuser_5:testpassword5@10.0.30.235:2099/erp5_test_5", "mysql://testuser_6:testpassword6@10.0.30.235:2099/erp5_test_6", "mysql://testuser_7:testpassword7@10.0.30.235:2099/erp5_test_7", "mysql://testuser_8:testpassword8@10.0.30.235:2099/erp5_test_8", "mysql://testuser_9:testpassword9@10.0.30.235:2099/erp5_test_9", "mysql://testuser_10:testpassword10@10.0.30.235:2099/erp5_test_10", "mysql://testuser_11:testpassword11@10.0.30.235:2099/erp5_test_11"], "inituser-password": "password", "deadlock-debugger-password": "password", "port-base": 2200, "longrequest-logger-interval": -1, "memcached-url": "memcached://10.0.30.235:2013/", "smtp-url": "smtp://127.0.0.2:0/", "test-runner-enabled": true, "kumofs-url": "memcached://10.0.30.235:2003/", "inituser-login": "zope", "thread-amount": 10, "zodb-zeo": {"root": {"storage": "root", "server": "10.0.30.235:2100"}}, "id-store-interval": null, "caucase-url": "http://[::1]:8890", "test-runner-node-count": 3, "cloudooo-retry-count": "2", "mysql-url-list": ["mysql://user:insecure@10.0.30.235:2099/erp5"], "wendelin-core-zblk-fmt": "", "timerserver-interval": 1, "monitor-passwd": "password", "name": "backend", "tidstorage-ip": "", "bt5": "erp5_full_text_myisam_catalog erp5_configurator_standard erp5_configurator_maxma_demo erp5_configurator_run_my_doc", "private-dev-shm": "", "developer-list": ["zope"], "use-ipv6": false, "instance-count": 2, "longrequest-logger-timeout": 1}</parameter>
</instance> </instance>
...@@ -143,7 +147,7 @@ INSERT INTO "partition14" VALUES('slappart7','slaprunner','busy','/srv/slapgrid/ ...@@ -143,7 +147,7 @@ INSERT INTO "partition14" VALUES('slappart7','slaprunner','busy','/srv/slapgrid/
<parameter id="_">{"hosts-dict": {"erp5-cloudooo": "cloudooo.erp5.net", "erp5-smtp": "127.0.0.2", "erp5-catalog-0": "10.0.30.235", "erp5-memcached-volatile": "10.0.30.235", "erp5-memcached-persistent": "10.0.30.235"}, "test-runner-address-list": [["10.0.30.235", 2200], ["10.0.30.235", 2201], ["10.0.30.235", 2202]], "monitor-base-url": "", "zope-address-list": [["10.0.30.235:2203", 10, false], ["10.0.30.235:2204", 10, false]]}</parameter> <parameter id="_">{"hosts-dict": {"erp5-cloudooo": "cloudooo.erp5.net", "erp5-smtp": "127.0.0.2", "erp5-catalog-0": "10.0.30.235", "erp5-memcached-volatile": "10.0.30.235", "erp5-memcached-persistent": "10.0.30.235"}, "test-runner-address-list": [["10.0.30.235", 2200], ["10.0.30.235", 2201], ["10.0.30.235", 2202]], "monitor-base-url": "", "zope-address-list": [["10.0.30.235:2203", 10, false], ["10.0.30.235:2204", 10, false]]}</parameter>
</instance> </instance>
',NULL,'zope','zope-backend','slappart0','started',NULL); ',NULL,'zope','zope-backend','slappart0','started',NULL);
INSERT INTO "partition14" VALUES('slappart8','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?> INSERT INTO "partition15" VALUES('slappart8','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?>
<instance> <instance>
<parameter id="_">{"haproxy-server-check-path": "/", "apachedex-configuration": "--erp5-base +erp5 .*/VirtualHostRoot/erp5(/|\\?|$) --base +other / --skip-user-agent Zabbix --error-detail --js-embed --quiet", "backend-path-dict": {"activities": "/", "login": "/"}, "name": "balancer", "zope-family-entry-request-zope-activities-test-runner-address-list": [["10.0.30.235", 2200], ["10.0.30.235", 2201], ["10.0.30.235", 2202]], "crl-update-periodicity": "daily", "ssl-authentication-dict": {"activities": false, "login": false}, "zope-family-entry-request-zope-activities": [["10.0.30.235:2203", 2, false], ["10.0.30.235:2204", 2, false], ["10.0.30.235:2205", 2, false], ["10.0.30.235:2206", 2, false]], "zope-family-entry-request-zope-backend": [["10.0.30.235:2203", 10, false], ["10.0.30.235:2204", 10, false]], "zope-family-dict": {"activities": ["zope-family-entry-request-zope-activities"], "login": ["zope-family-entry-request-zope-backend"]}, "zope-family-entry-request-zope-backend-test-runner-address-list": [["10.0.30.235", 2200], ["10.0.30.235", 2201], ["10.0.30.235", 2202]], "ssl": {}, "caucase-url": "http://[::1]:8890", "monitor-passwd": "password", "use-ipv6": false, "apachedex-promise-threshold": 70, "tcpv4-port": 2150}</parameter> <parameter id="_">{"haproxy-server-check-path": "/", "apachedex-configuration": "--erp5-base +erp5 .*/VirtualHostRoot/erp5(/|\\?|$) --base +other / --skip-user-agent Zabbix --error-detail --js-embed --quiet", "backend-path-dict": {"activities": "/", "login": "/"}, "name": "balancer", "zope-family-entry-request-zope-activities-test-runner-address-list": [["10.0.30.235", 2200], ["10.0.30.235", 2201], ["10.0.30.235", 2202]], "crl-update-periodicity": "daily", "ssl-authentication-dict": {"activities": false, "login": false}, "zope-family-entry-request-zope-activities": [["10.0.30.235:2203", 2, false], ["10.0.30.235:2204", 2, false], ["10.0.30.235:2205", 2, false], ["10.0.30.235:2206", 2, false]], "zope-family-entry-request-zope-backend": [["10.0.30.235:2203", 10, false], ["10.0.30.235:2204", 10, false]], "zope-family-dict": {"activities": ["zope-family-entry-request-zope-activities"], "login": ["zope-family-entry-request-zope-backend"]}, "zope-family-entry-request-zope-backend-test-runner-address-list": [["10.0.30.235", 2200], ["10.0.30.235", 2201], ["10.0.30.235", 2202]], "ssl": {}, "caucase-url": "http://[::1]:8890", "monitor-passwd": "password", "use-ipv6": false, "apachedex-promise-threshold": 70, "tcpv4-port": 2150}</parameter>
</instance> </instance>
...@@ -152,7 +156,7 @@ INSERT INTO "partition14" VALUES('slappart8','slaprunner','busy','/srv/slapgrid/ ...@@ -152,7 +156,7 @@ INSERT INTO "partition14" VALUES('slappart8','slaprunner','busy','/srv/slapgrid/
<parameter id="_">{"activities": "https://10.0.30.235:2155", "login-test-runner-url-list": ["https://10.0.30.235:2157/unit_test_0/", "https://10.0.30.235:2157/unit_test_1/", "https://10.0.30.235:2157/unit_test_2/"], "monitor-base-url": "", "login-v6": "https://[::1]:2159", "activities-v6": "https://[::1]:2155", "login": "https://10.0.30.235:2159", "activities-test-runner-url-list": ["https://10.0.30.235:2153/unit_test_0/", "https://10.0.30.235:2153/unit_test_1/", "https://10.0.30.235:2153/unit_test_2/"]}</parameter> <parameter id="_">{"activities": "https://10.0.30.235:2155", "login-test-runner-url-list": ["https://10.0.30.235:2157/unit_test_0/", "https://10.0.30.235:2157/unit_test_1/", "https://10.0.30.235:2157/unit_test_2/"], "monitor-base-url": "", "login-v6": "https://[::1]:2159", "activities-v6": "https://[::1]:2155", "login": "https://10.0.30.235:2159", "activities-test-runner-url-list": ["https://10.0.30.235:2153/unit_test_0/", "https://10.0.30.235:2153/unit_test_1/", "https://10.0.30.235:2153/unit_test_2/"]}</parameter>
</instance> </instance>
',NULL,'balancer','balancer','slappart0','started',NULL); ',NULL,'balancer','balancer','slappart0','started',NULL);
INSERT INTO "partition14" VALUES('slappart9','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/seleniumrunner/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?> INSERT INTO "partition15" VALUES('slappart9','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/seleniumrunner/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?>
<instance/> <instance/>
','<?xml version=''1.0'' encoding=''utf-8''?> ','<?xml version=''1.0'' encoding=''utf-8''?>
<instance> <instance>
...@@ -160,22 +164,22 @@ INSERT INTO "partition14" VALUES('slappart9','slaprunner','busy','/srv/slapgrid/ ...@@ -160,22 +164,22 @@ INSERT INTO "partition14" VALUES('slappart9','slaprunner','busy','/srv/slapgrid/
<parameter id="display">:123</parameter> <parameter id="display">:123</parameter>
</instance> </instance>
',NULL,'RootSoftwareInstance','seleniumrunner',NULL,'started',NULL); ',NULL,'RootSoftwareInstance','seleniumrunner',NULL,'started',NULL);
INSERT INTO "partition14" VALUES('slappart10','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/evil/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?> INSERT INTO "partition15" VALUES('slappart10','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/evil/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?>
<instance/>','<?xml version=''1.0'' encoding=''utf-8''?> <instance/>','<?xml version=''1.0'' encoding=''utf-8''?>
<instance> <instance>
<parameter id="_">Ahah this is not json 😜 </parameter> <parameter id="_">Ahah this is not json 😜 </parameter>
</instance> </instance>
',NULL,'RootSoftwareInstance','evil-instance-with-_-not-json',NULL,'started',NULL); ',NULL,'RootSoftwareInstance','evil-instance-with-_-not-json',NULL,'started',NULL);
INSERT INTO "partition14" VALUES('slappart11','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started',NULL); INSERT INTO "partition15" VALUES('slappart11','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started',NULL);
INSERT INTO "partition14" VALUES('slappart12','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started',NULL); INSERT INTO "partition15" VALUES('slappart12','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started',NULL);
INSERT INTO "partition14" VALUES('slappart13','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started',NULL); INSERT INTO "partition15" VALUES('slappart13','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started',NULL);
INSERT INTO "partition14" VALUES('slappart14','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started',NULL); INSERT INTO "partition15" VALUES('slappart14','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started',NULL);
INSERT INTO "partition14" VALUES('slappart15','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started',NULL); INSERT INTO "partition15" VALUES('slappart15','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started',NULL);
INSERT INTO "partition14" VALUES('slappart16','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started',NULL); INSERT INTO "partition15" VALUES('slappart16','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started',NULL);
INSERT INTO "partition14" VALUES('slappart17','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started',NULL); INSERT INTO "partition15" VALUES('slappart17','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started',NULL);
INSERT INTO "partition14" VALUES('slappart18','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started',NULL); INSERT INTO "partition15" VALUES('slappart18','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started',NULL);
INSERT INTO "partition14" VALUES('slappart19','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started',NULL); INSERT INTO "partition15" VALUES('slappart19','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started',NULL);
CREATE TABLE slave14 ( CREATE TABLE slave15 (
reference VARCHAR(255), -- unique slave reference reference VARCHAR(255), -- unique slave reference
computer_reference VARCHAR(255) DEFAULT 'slaprunner', computer_reference VARCHAR(255) DEFAULT 'slaprunner',
connection_xml TEXT, connection_xml TEXT,
...@@ -183,54 +187,54 @@ CREATE TABLE slave14 ( ...@@ -183,54 +187,54 @@ CREATE TABLE slave14 (
asked_by VARCHAR(255) -- only used for debugging, asked_by VARCHAR(255) -- only used for debugging,
-- slapproxy does not support proper scope -- slapproxy does not support proper scope
); );
CREATE TABLE partition_network14 ( CREATE TABLE partition_network15 (
partition_reference VARCHAR(255), partition_reference VARCHAR(255),
computer_reference VARCHAR(255) DEFAULT 'slaprunner', computer_reference VARCHAR(255) DEFAULT 'slaprunner',
reference VARCHAR(255), reference VARCHAR(255),
address VARCHAR(255), address VARCHAR(255),
netmask VARCHAR(255) netmask VARCHAR(255)
); );
INSERT INTO "partition_network14" VALUES('slappart0','slaprunner','slappart0','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network15" VALUES('slappart0','slaprunner','slappart0','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart0','slaprunner','slappart0','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network15" VALUES('slappart0','slaprunner','slappart0','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network14" VALUES('slappart1','slaprunner','slappart1','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network15" VALUES('slappart1','slaprunner','slappart1','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart1','slaprunner','slappart1','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network15" VALUES('slappart1','slaprunner','slappart1','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network14" VALUES('slappart2','slaprunner','slappart2','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network15" VALUES('slappart2','slaprunner','slappart2','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart2','slaprunner','slappart2','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network15" VALUES('slappart2','slaprunner','slappart2','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network14" VALUES('slappart3','slaprunner','slappart3','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network15" VALUES('slappart3','slaprunner','slappart3','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart3','slaprunner','slappart3','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network15" VALUES('slappart3','slaprunner','slappart3','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network14" VALUES('slappart4','slaprunner','slappart4','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network15" VALUES('slappart4','slaprunner','slappart4','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart4','slaprunner','slappart4','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network15" VALUES('slappart4','slaprunner','slappart4','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network14" VALUES('slappart5','slaprunner','slappart5','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network15" VALUES('slappart5','slaprunner','slappart5','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart5','slaprunner','slappart5','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network15" VALUES('slappart5','slaprunner','slappart5','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network14" VALUES('slappart6','slaprunner','slappart6','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network15" VALUES('slappart6','slaprunner','slappart6','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart6','slaprunner','slappart6','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network15" VALUES('slappart6','slaprunner','slappart6','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network14" VALUES('slappart7','slaprunner','slappart7','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network15" VALUES('slappart7','slaprunner','slappart7','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart7','slaprunner','slappart7','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network15" VALUES('slappart7','slaprunner','slappart7','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network14" VALUES('slappart8','slaprunner','slappart8','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network15" VALUES('slappart8','slaprunner','slappart8','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart8','slaprunner','slappart8','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network15" VALUES('slappart8','slaprunner','slappart8','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network14" VALUES('slappart9','slaprunner','slappart9','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network15" VALUES('slappart9','slaprunner','slappart9','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart9','slaprunner','slappart9','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network15" VALUES('slappart9','slaprunner','slappart9','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network14" VALUES('slappart10','slaprunner','slappart10','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network15" VALUES('slappart10','slaprunner','slappart10','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart10','slaprunner','slappart10','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network15" VALUES('slappart10','slaprunner','slappart10','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network14" VALUES('slappart11','slaprunner','slappart11','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network15" VALUES('slappart11','slaprunner','slappart11','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart11','slaprunner','slappart11','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network15" VALUES('slappart11','slaprunner','slappart11','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network14" VALUES('slappart12','slaprunner','slappart12','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network15" VALUES('slappart12','slaprunner','slappart12','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart12','slaprunner','slappart12','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network15" VALUES('slappart12','slaprunner','slappart12','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network14" VALUES('slappart13','slaprunner','slappart13','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network15" VALUES('slappart13','slaprunner','slappart13','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart13','slaprunner','slappart13','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network15" VALUES('slappart13','slaprunner','slappart13','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network14" VALUES('slappart14','slaprunner','slappart14','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network15" VALUES('slappart14','slaprunner','slappart14','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart14','slaprunner','slappart14','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network15" VALUES('slappart14','slaprunner','slappart14','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network14" VALUES('slappart15','slaprunner','slappart15','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network15" VALUES('slappart15','slaprunner','slappart15','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart15','slaprunner','slappart15','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network15" VALUES('slappart15','slaprunner','slappart15','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network14" VALUES('slappart16','slaprunner','slappart16','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network15" VALUES('slappart16','slaprunner','slappart16','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart16','slaprunner','slappart16','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network15" VALUES('slappart16','slaprunner','slappart16','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network14" VALUES('slappart17','slaprunner','slappart17','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network15" VALUES('slappart17','slaprunner','slappart17','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart17','slaprunner','slappart17','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network15" VALUES('slappart17','slaprunner','slappart17','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network14" VALUES('slappart18','slaprunner','slappart18','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network15" VALUES('slappart18','slaprunner','slappart18','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart18','slaprunner','slappart18','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network15" VALUES('slappart18','slaprunner','slappart18','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network14" VALUES('slappart19','slaprunner','slappart19','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network15" VALUES('slappart19','slaprunner','slappart19','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network14" VALUES('slappart19','slaprunner','slappart19','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network15" VALUES('slappart19','slaprunner','slappart19','::1','ffff:ffff:ffff::');
CREATE TABLE forwarded_partition_request14 ( CREATE TABLE forwarded_partition_request15 (
partition_reference VARCHAR(255), -- a.k.a source_instance_id partition_reference VARCHAR(255), -- a.k.a source_instance_id
master_url VARCHAR(255) master_url VARCHAR(255)
); );
......
...@@ -41,6 +41,13 @@ EOF ...@@ -41,6 +41,13 @@ EOF
sqlite3 ${TMPD}/proxy.db < $DUMP_BEFORE sqlite3 ${TMPD}/proxy.db < $DUMP_BEFORE
slapos proxy start --cfg ${TMPD}/slapos.cfg & slapos proxy start --cfg ${TMPD}/slapos.cfg &
# If you are running tests locally and you want to refer to the slapos being tested,
# you can use the test python executable in this way:
# cd ../../..
# python -m slapos.cli.entry proxy start --cfg ${TMPD}/slapos.cfg &
# cd -
SLAPOS_PROXY_PID=$! SLAPOS_PROXY_PID=$!
curl --silent --retry-connrefused --retry 3 http://127.0.0.1:${PORT}/getComputerInformation?computer_id=$COMPUTER_ID curl --silent --retry-connrefused --retry 3 http://127.0.0.1:${PORT}/getComputerInformation?computer_id=$COMPUTER_ID
......
[slapos] [slapos]
software_root = %(tempdir)s/opt/slapgrid software_root = %(rootdir)s/opt/slapgrid
instance_root = %(tempdir)s/srv/slapgrid instance_root = %(rootdir)s/srv/slapgrid
master_url = %(proxyaddr)s master_url = %(proxyaddr)s
computer_id = computer computer_id = computer
[slapproxy] [slapproxy]
host = 127.0.0.1 host = 127.0.0.1
port = 8080 port = 8080
database_uri = %(tempdir)s/lib/proxy.db database_uri = %(rootdir)s/lib/proxy.db
# Here goes the list of slapos masters that slapproxy can contact # Here goes the list of slapos masters that slapproxy can contact
# Each section beginning by multimaster is a different SlapOS Master, represented by arbitrary name. # Each section beginning by multimaster is a different SlapOS Master, represented by arbitrary name.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment