Commit c0912336 authored by Jérome Perrin's avatar Jérome Perrin Committed by Thomas Gambier

Remove old slapproxy tables when migrating to new version

Some tools are using directly slapproxy sqlite database and they stopped working when table number was increased in !76 .

We made a quick improvement to the tools so that they can autodetect the current table names instead of hardcoding ( slapos@b8c895cd ) but this failed, because slapproxy remove did not remove the old tables after migration. This branch is about removing the table, to quickly repair these tools.

The long term plan is (hopefully) to improve these tools so that they don't use the private tables like this.

/reviewed-on !105
parents 3343cbea d0ce721b
--version:12 --version:13
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',
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
from lxml import etree from lxml import etree
import random import random
import string import string
from datetime import datetime
from slapos.slap.slap import Computer, ComputerPartition, \ from slapos.slap.slap import Computer, ComputerPartition, \
SoftwareRelease, SoftwareInstance, NotFoundError SoftwareRelease, SoftwareInstance, NotFoundError
from slapos.proxy.db_version import DB_VERSION from slapos.proxy.db_version import DB_VERSION
...@@ -176,6 +177,22 @@ def _upgradeDatabaseIfNeeded(): ...@@ -176,6 +177,22 @@ def _upgradeDatabaseIfNeeded():
if current_schema_version == DB_VERSION: if current_schema_version == DB_VERSION:
return return
previous_table_list = _getTableList()
# first, make a backup of current database
if current_schema_version != '-1':
backup_file_name = "{}-backup-{}to{}-{}.sql".format(
app.config['DATABASE_URI'],
current_schema_version,
DB_VERSION,
datetime.now().isoformat())
app.logger.info(
'Old schema detected: Creating a backup of current tables at %s',
backup_file_name
)
with open(backup_file_name, 'w') as f:
for line in g.db.iterdump():
f.write('%s\n' % line)
with app.open_resource('schema.sql', 'r') as f: with app.open_resource('schema.sql', 'r') as f:
schema = f.read() % dict(version=DB_VERSION, computer=app.config['computer_id']) schema = f.read() % dict(version=DB_VERSION, computer=app.config['computer_id'])
g.db.cursor().executescript(schema) g.db.cursor().executescript(schema)
...@@ -186,14 +203,15 @@ def _upgradeDatabaseIfNeeded(): ...@@ -186,14 +203,15 @@ 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...')
app.logger.info('Note that old tables are not alterated.')
for table in ('software', 'computer', 'partition', 'slave', 'partition_network'): for table in ('software', 'computer', 'partition', 'slave', 'partition_network'):
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())
query = 'INSERT INTO %s (%s) VALUES (%s)' % ('%s', columns, placeholders) query = 'INSERT INTO %s (%s) VALUES (%s)' % ('%s', columns, placeholders)
execute_db(table, query, row) execute_db(table, query, row)
# then drop old tables
for previous_table in previous_table_list:
g.db.execute("DROP table %s" % previous_table)
g.db.commit() g.db.commit()
is_schema_already_executed = False is_schema_already_executed = False
......
...@@ -98,7 +98,8 @@ class TestCliProxyShow(CliMixin): ...@@ -98,7 +98,8 @@ class TestCliProxyShow(CliMixin):
# load database # load database
schema = bytes2str(pkg_resources.resource_string( schema = bytes2str(pkg_resources.resource_string(
'slapos.tests.test_slapproxy', 'database_dump_version_current.sql')) 'slapos.tests',
os.path.join('test_slapproxy', 'database_dump_version_current.sql')))
db = sqlite_connect(self.db_file.name) db = sqlite_connect(self.db_file.name)
db.cursor().executescript(schema) db.cursor().executescript(schema)
db.commit() db.commit()
...@@ -124,7 +125,7 @@ class TestCliProxyShow(CliMixin): ...@@ -124,7 +125,7 @@ class TestCliProxyShow(CliMixin):
# installed softwares are listed # installed softwares are listed
logger.info.assert_any_call( logger.info.assert_any_call(
' /srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg available slaprunner 287375f0cba269902ba1bc50242839d7 ' ) ' /srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg slaprunner available 287375f0cba269902ba1bc50242839d7 ')
# instance parameters are listed # instance parameters are listed
# _ parameter is json formatted # _ parameter is json formatted
......
...@@ -42,6 +42,7 @@ import sys ...@@ -42,6 +42,7 @@ import sys
import tempfile import tempfile
import time import time
import unittest import unittest
import mock
import slapos.proxy import slapos.proxy
import slapos.proxy.views as views import slapos.proxy.views as views
...@@ -475,19 +476,19 @@ class TestRequest(MasterMixin): ...@@ -475,19 +476,19 @@ class TestRequest(MasterMixin):
partition_parent = self.request('http://sr//', None, 'MyFirstInstance') partition_parent = self.request('http://sr//', None, 'MyFirstInstance')
parent_dict = partition_parent.__dict__ parent_dict = partition_parent.__dict__
partition_child = self.request('http://sr//', None, 'MySubInstance', parent_dict['_partition_id']) partition_child = self.request('http://sr//', None, 'MySubInstance', parent_dict['_partition_id'])
self.assertEqual(partition_parent.getState(), 'started') self.assertEqual(partition_parent.getState(), 'started')
self.assertEqual(partition_child.getState(), 'started') self.assertEqual(partition_child.getState(), 'started')
partition_parent = self.request('http://sr//', None, 'MyFirstInstance', state='stopped') partition_parent = self.request('http://sr//', None, 'MyFirstInstance', state='stopped')
partition_child = self.request('http://sr//', None, 'MySubInstance', parent_dict['_partition_id']) partition_child = self.request('http://sr//', None, 'MySubInstance', parent_dict['_partition_id'])
self.assertEqual(partition_parent.getState(), 'stopped') self.assertEqual(partition_parent.getState(), 'stopped')
self.assertEqual(partition_child.getState(), 'stopped') self.assertEqual(partition_child.getState(), 'stopped')
partition_parent = self.request('http://sr//', None, 'MyFirstInstance', state='started') partition_parent = self.request('http://sr//', None, 'MyFirstInstance', state='started')
partition_child = self.request('http://sr//', None, 'MySubInstance', parent_dict['_partition_id']) partition_child = self.request('http://sr//', None, 'MySubInstance', parent_dict['_partition_id'])
self.assertEqual(partition_parent.getState(), 'started') self.assertEqual(partition_parent.getState(), 'started')
self.assertEqual(partition_child.getState(), 'started') self.assertEqual(partition_child.getState(), 'started')
...@@ -499,13 +500,13 @@ class TestRequest(MasterMixin): ...@@ -499,13 +500,13 @@ class TestRequest(MasterMixin):
partition_parent = self.request('http://sr//', None, 'MyFirstInstance') partition_parent = self.request('http://sr//', None, 'MyFirstInstance')
parent_dict = partition_parent.__dict__ parent_dict = partition_parent.__dict__
partition_child = self.request('http://sr//', None, 'MySubInstance', parent_dict['_partition_id']) partition_child = self.request('http://sr//', None, 'MySubInstance', parent_dict['_partition_id'])
self.assertEqual(partition_parent.getState(), 'started') self.assertEqual(partition_parent.getState(), 'started')
self.assertEqual(partition_child.getState(), 'started') self.assertEqual(partition_child.getState(), 'started')
partition_parent = self.request('http://sr//', None, 'MyFirstInstance') partition_parent = self.request('http://sr//', None, 'MyFirstInstance')
partition_child = self.request('http://sr//', None, 'MySubInstance', parent_dict['_partition_id'], state='stopped') partition_child = self.request('http://sr//', None, 'MySubInstance', parent_dict['_partition_id'], state='stopped')
self.assertEqual(partition_parent.getState(), 'started') self.assertEqual(partition_parent.getState(), 'started')
self.assertEqual(partition_child.getState(), 'stopped') self.assertEqual(partition_child.getState(), 'stopped')
...@@ -1161,7 +1162,7 @@ database_uri = %(tempdir)s/lib/external_proxy.db ...@@ -1161,7 +1162,7 @@ database_uri = %(tempdir)s/lib/external_proxy.db
behaviours. behaviours.
""" """
configuration = bytes2str(pkg_resources.resource_string( configuration = bytes2str(pkg_resources.resource_string(
'slapos.tests.test_slapproxy', 'slapos_multimaster.cfg.in' 'slapos.tests', os.path.join('test_slapproxy', 'slapos_multimaster.cfg.in')
)) % { )) % {
'tempdir': self._tempdir, 'proxyaddr': self.proxyaddr, 'tempdir': self._tempdir, 'proxyaddr': self.proxyaddr,
'external_proxy_host': self.external_proxy_host, 'external_proxy_host': self.external_proxy_host,
...@@ -1369,29 +1370,48 @@ database_uri = %(tempdir)s/lib/external_proxy.db ...@@ -1369,29 +1370,48 @@ database_uri = %(tempdir)s/lib/external_proxy.db
) )
# XXX: when testing new schema version,
# rename to "TestMigrateVersion10ToLatest" and test accordingly. class _MigrationTestCase(TestInformation, TestRequest, TestSlaveRequest, TestMultiNodeSupport):
# Of course, also test version 12 to latest (should be 13).
class TestMigrateVersion10To12(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
initial_table_list = NotImplemented
current_version = '13'
def setUp(self): def setUp(self):
super(TestMigrateVersion10To12, self).setUp() TestInformation.setUp(self)
schema = bytes2str(pkg_resources.resource_string( schema = bytes2str(pkg_resources.resource_string(
'slapos.tests.test_slapproxy', 'slapos.tests',
'database_dump_version_10.sql' os.path.join('test_slapproxy', self.dump_filename)
)) % dict(version='12') ))
self.db = sqlite_connect(self.proxy_db) self.db = sqlite_connect(self.proxy_db)
self.db.cursor().executescript(schema) self.db.cursor().executescript(schema)
self.db.commit() self.db.commit()
def test_automatic_migration(self): def test_automatic_migration(self):
table_list = ('software12', 'computer12', 'partition12', 'slave12', 'partition_network12') # Make sure that in the initial state we only have current version of the tables.
for table in table_list: table_list = self.db.execute("SELECT name FROM sqlite_master WHERE type='table' ORDER BY name").fetchall()
self.assertRaises(sqlite3.OperationalError, self.db.execute, "SELECT name FROM computer12") self.assertEqual([x[0] for x in table_list], self.initial_table_list)
# create an old table, to assert it is also properly removed.
self.db.execute("create table software9 (int a)")
self.db.commit()
# Run a dummy request to cause migration # Run a dummy request to cause migration
self.app.get('/getComputerInformation?computer_id=computer') from slapos.proxy.views import app
with mock.patch.object(app.logger, 'info') as logger:
self.app.get('/getComputerInformation?computer_id=computer')
# This creates a backup dump
logger.assert_has_calls((
mock.call('Old schema detected: Creating a backup of current tables at %s', mock.ANY),
mock.call('Old schema detected: Migrating old tables...')))
backup_name = logger.call_args_list[0][0][1]
with open(backup_name, 'rt') as f:
dump = f.read()
self.assertIn("CREATE TABLE", dump)
self.assertIn('INSERT INTO', dump)
# Check some partition parameters # Check some partition parameters
self.assertEqual( self.assertEqual(
...@@ -1400,36 +1420,47 @@ class TestMigrateVersion10To12(TestInformation, TestRequest, TestSlaveRequest, T ...@@ -1400,36 +1420,47 @@ class TestMigrateVersion10To12(TestInformation, TestRequest, TestSlaveRequest, T
) )
# Lower level tests # Lower level tests
computer_list = self.db.execute("SELECT * FROM computer12").fetchall() computer_list = self.db.execute("SELECT * FROM computer{}".format(self.current_version)).fetchall()
self.assertEqual( self.assertEqual(
computer_list, computer_list,
[(u'computer', u'127.0.0.1', u'255.255.255.255')] [(u'computer', u'127.0.0.1', u'255.255.255.255')]
) )
software_list = self.db.execute("SELECT * FROM software12").fetchall() software_list = self.db.execute("SELECT * FROM software{}".format(self.current_version)).fetchall()
self.assertEqual( self.assertEqual(
software_list, software_list,
[(u'/srv/slapgrid//srv//runner/project//slapos/software.cfg', u'computer', u'available')] [(u'/srv/slapgrid//srv//runner/project//slapos/software.cfg', u'computer', u'available')]
) )
partition_list = self.db.execute("select * from partition12").fetchall() partition_list = self.db.execute("select * from partition{}".format(self.current_version)).fetchall()
self.assertEqual( self.assertEqual(
partition_list, partition_list,
[(u'slappart0', u'computer', u'busy', u'/srv/slapgrid//srv//runner/project//slapos/software.cfg', u'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<instance>\n <parameter id="json">{\n "site-id": "erp5"\n }\n}</parameter>\n</instance>\n', None, None, u'production', u'slapos', None, u'started'), (u'slappart1', u'computer', u'busy', u'/srv/slapgrid//srv//runner/project//slapos/software.cfg', u"<?xml version='1.0' encoding='utf-8'?>\n<instance/>\n", u'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<instance>\n <parameter id="url">mysql://127.0.0.1:45678/erp5</parameter>\n</instance>\n', None, u'mariadb', u'MariaDB DataBase', u'slappart0', u'started'), (u'slappart2', u'computer', u'busy', u'/srv/slapgrid//srv//runner/project//slapos/software.cfg', u'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<instance>\n <parameter id="cloudooo-json"></parameter>\n</instance>\n', u'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<instance>\n <parameter id="url">cloudooo://127.0.0.1:23000/</parameter>\n</instance>\n', None, u'cloudooo', u'Cloudooo', u'slappart0', u'started'), (u'slappart3', u'computer', u'busy', u'/srv/slapgrid//srv//runner/project//slapos/software.cfg', u"<?xml version='1.0' encoding='utf-8'?>\n<instance/>\n", u'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<instance>\n <parameter id="url">memcached://127.0.0.1:11000/</parameter>\n</instance>\n', None, u'memcached', u'Memcached', u'slappart0', u'started'), (u'slappart4', u'computer', u'busy', u'/srv/slapgrid//srv//runner/project//slapos/software.cfg', u"<?xml version='1.0' encoding='utf-8'?>\n<instance/>\n", u'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<instance>\n <parameter id="url">memcached://127.0.0.1:13301/</parameter>\n</instance>\n', None, u'kumofs', u'KumoFS', u'slappart0', u'started'), (u'slappart5', u'computer', u'busy', u'/srv/slapgrid//srv//runner/project//slapos/software.cfg', u'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<instance>\n <parameter id="kumofs-url">memcached://127.0.0.1:13301/</parameter>\n <parameter id="memcached-url">memcached://127.0.0.1:11000/</parameter>\n <parameter id="cloudooo-url">cloudooo://127.0.0.1:23000/</parameter>\n</instance>\n', u'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<instance>\n <parameter id="url">https://[fc00::1]:10001</parameter>\n</instance>\n', None, u'tidstorage', u'TidStorage', u'slappart0', u'started'), (u'slappart6', u'computer', u'free', None, None, None, None, None, None, None, u'started'), (u'slappart7', u'computer', u'free', None, None, None, None, None, None, None, u'started'), (u'slappart8', u'computer', u'free', None, None, None, None, None, None, None, u'started'), (u'slappart9', u'computer', u'free', None, None, None, None, None, None, None, u'started')] [(u'slappart0', u'computer', u'busy', u'/srv/slapgrid//srv//runner/project//slapos/software.cfg', u'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<instance>\n <parameter id="json">{\n "site-id": "erp5"\n }\n}</parameter>\n</instance>\n', None, None, u'production', u'slapos', None, u'started'), (u'slappart1', u'computer', u'busy', u'/srv/slapgrid//srv//runner/project//slapos/software.cfg', u"<?xml version='1.0' encoding='utf-8'?>\n<instance/>\n", u'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<instance>\n <parameter id="url">mysql://127.0.0.1:45678/erp5</parameter>\n</instance>\n', None, u'mariadb', u'MariaDB DataBase', u'slappart0', u'started'), (u'slappart2', u'computer', u'busy', u'/srv/slapgrid//srv//runner/project//slapos/software.cfg', u'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<instance>\n <parameter id="cloudooo-json"></parameter>\n</instance>\n', u'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<instance>\n <parameter id="url">cloudooo://127.0.0.1:23000/</parameter>\n</instance>\n', None, u'cloudooo', u'Cloudooo', u'slappart0', u'started'), (u'slappart3', u'computer', u'busy', u'/srv/slapgrid//srv//runner/project//slapos/software.cfg', u"<?xml version='1.0' encoding='utf-8'?>\n<instance/>\n", u'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<instance>\n <parameter id="url">memcached://127.0.0.1:11000/</parameter>\n</instance>\n', None, u'memcached', u'Memcached', u'slappart0', u'started'), (u'slappart4', u'computer', u'busy', u'/srv/slapgrid//srv//runner/project//slapos/software.cfg', u"<?xml version='1.0' encoding='utf-8'?>\n<instance/>\n", u'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<instance>\n <parameter id="url">memcached://127.0.0.1:13301/</parameter>\n</instance>\n', None, u'kumofs', u'KumoFS', u'slappart0', u'started'), (u'slappart5', u'computer', u'busy', u'/srv/slapgrid//srv//runner/project//slapos/software.cfg', u'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<instance>\n <parameter id="kumofs-url">memcached://127.0.0.1:13301/</parameter>\n <parameter id="memcached-url">memcached://127.0.0.1:11000/</parameter>\n <parameter id="cloudooo-url">cloudooo://127.0.0.1:23000/</parameter>\n</instance>\n', u'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<instance>\n <parameter id="url">https://[fc00::1]:10001</parameter>\n</instance>\n', None, u'tidstorage', u'TidStorage', u'slappart0', u'started'), (u'slappart6', u'computer', u'free', None, None, None, None, None, None, None, u'started'), (u'slappart7', u'computer', u'free', None, None, None, None, None, None, None, u'started'), (u'slappart8', u'computer', u'free', None, None, None, None, None, None, None, u'started'), (u'slappart9', u'computer', u'free', None, None, None, None, None, None, None, u'started')]
) )
slave_list = self.db.execute("select * from slave12").fetchall() slave_list = self.db.execute("select * from slave{}".format(self.current_version)).fetchall()
self.assertEqual( self.assertEqual(
slave_list, slave_list,
[] []
) )
partition_network_list = self.db.execute("select * from partition_network12").fetchall() partition_network_list = self.db.execute("select * from partition_network{}".format(self.current_version)).fetchall()
self.assertEqual( self.assertEqual(
partition_network_list, partition_network_list,
[(u'slappart0', u'computer', u'slappart0', u'127.0.0.1', u'255.255.255.255'), (u'slappart0', u'computer', u'slappart0', u'fc00::1', u'ffff:ffff:ffff::'), (u'slappart1', u'computer', u'slappart1', u'127.0.0.1', u'255.255.255.255'), (u'slappart1', u'computer', u'slappart1', u'fc00::1', u'ffff:ffff:ffff::'), (u'slappart2', u'computer', u'slappart2', u'127.0.0.1', u'255.255.255.255'), (u'slappart2', u'computer', u'slappart2', u'fc00::1', u'ffff:ffff:ffff::'), (u'slappart3', u'computer', u'slappart3', u'127.0.0.1', u'255.255.255.255'), (u'slappart3', u'computer', u'slappart3', u'fc00::1', u'ffff:ffff:ffff::'), (u'slappart4', u'computer', u'slappart4', u'127.0.0.1', u'255.255.255.255'), (u'slappart4', u'computer', u'slappart4', u'fc00::1', u'ffff:ffff:ffff::'), (u'slappart5', u'computer', u'slappart5', u'127.0.0.1', u'255.255.255.255'), (u'slappart5', u'computer', u'slappart5', u'fc00::1', u'ffff:ffff:ffff::'), (u'slappart6', u'computer', u'slappart6', u'127.0.0.1', u'255.255.255.255'), (u'slappart6', u'computer', u'slappart6', u'fc00::1', u'ffff:ffff:ffff::'), (u'slappart7', u'computer', u'slappart7', u'127.0.0.1', u'255.255.255.255'), (u'slappart7', u'computer', u'slappart7', u'fc00::1', u'ffff:ffff:ffff::'), (u'slappart8', u'computer', u'slappart8', u'127.0.0.1', u'255.255.255.255'), (u'slappart8', u'computer', u'slappart8', u'fc00::1', u'ffff:ffff:ffff::'), (u'slappart9', u'computer', u'slappart9', u'127.0.0.1', u'255.255.255.255'), (u'slappart9', u'computer', u'slappart9', u'fc00::1', u'ffff:ffff:ffff::')] [(u'slappart0', u'computer', u'slappart0', u'127.0.0.1', u'255.255.255.255'), (u'slappart0', u'computer', u'slappart0', u'fc00::1', u'ffff:ffff:ffff::'), (u'slappart1', u'computer', u'slappart1', u'127.0.0.1', u'255.255.255.255'), (u'slappart1', u'computer', u'slappart1', u'fc00::1', u'ffff:ffff:ffff::'), (u'slappart2', u'computer', u'slappart2', u'127.0.0.1', u'255.255.255.255'), (u'slappart2', u'computer', u'slappart2', u'fc00::1', u'ffff:ffff:ffff::'), (u'slappart3', u'computer', u'slappart3', u'127.0.0.1', u'255.255.255.255'), (u'slappart3', u'computer', u'slappart3', u'fc00::1', u'ffff:ffff:ffff::'), (u'slappart4', u'computer', u'slappart4', u'127.0.0.1', u'255.255.255.255'), (u'slappart4', u'computer', u'slappart4', u'fc00::1', u'ffff:ffff:ffff::'), (u'slappart5', u'computer', u'slappart5', u'127.0.0.1', u'255.255.255.255'), (u'slappart5', u'computer', u'slappart5', u'fc00::1', u'ffff:ffff:ffff::'), (u'slappart6', u'computer', u'slappart6', u'127.0.0.1', u'255.255.255.255'), (u'slappart6', u'computer', u'slappart6', u'fc00::1', u'ffff:ffff:ffff::'), (u'slappart7', u'computer', u'slappart7', u'127.0.0.1', u'255.255.255.255'), (u'slappart7', u'computer', u'slappart7', u'fc00::1', u'ffff:ffff:ffff::'), (u'slappart8', u'computer', u'slappart8', u'127.0.0.1', u'255.255.255.255'), (u'slappart8', u'computer', u'slappart8', u'fc00::1', u'ffff:ffff:ffff::'), (u'slappart9', u'computer', u'slappart9', u'127.0.0.1', u'255.255.255.255'), (u'slappart9', u'computer', u'slappart9', u'fc00::1', u'ffff:ffff:ffff::')]
) )
# Check that we only have new tables
table_list = self.db.execute("SELECT name FROM sqlite_master WHERE type='table' ORDER BY name").fetchall()
self.assertEqual([x[0] for x in table_list],
['computer{}'.format(self.current_version),
'forwarded_partition_request{}'.format(self.current_version),
'partition{}'.format(self.current_version),
'partition_network{}'.format(self.current_version),
'slave{}'.format(self.current_version),
'software{}'.format(self.current_version),
])
# Override several tests that needs an empty database # Override several tests that needs an empty database
@unittest.skip("Not implemented") @unittest.skip("Not implemented")
def test_multi_node_support_different_software_release_list(self): def test_multi_node_support_different_software_release_list(self):
...@@ -1451,3 +1482,20 @@ class TestMigrateVersion10To12(TestInformation, TestRequest, TestSlaveRequest, T ...@@ -1451,3 +1482,20 @@ class TestMigrateVersion10To12(TestInformation, TestRequest, TestSlaveRequest, T
def test_request_consistent_parameters(self): def test_request_consistent_parameters(self):
pass pass
class TestMigrateVersion10ToLatest(_MigrationTestCase):
dump_filename = 'database_dump_version_10.sql'
initial_table_list = ['computer10', 'partition10', 'partition_network10', 'slave10', 'software10', ]
class TestMigrateVersion11ToLatest(_MigrationTestCase):
dump_filename = 'database_dump_version_11.sql'
initial_table_list = ['computer11', 'forwarded_partition_request11', 'partition11', 'partition_network11', 'slave11', 'software11', ]
class TestMigrateVersion12ToLatest(_MigrationTestCase):
dump_filename = 'database_dump_version_12.sql'
initial_table_list = ['computer12', 'forwarded_partition_request12', 'partition12', 'partition_network12', 'slave12', 'software12', ]
del _MigrationTestCase
\ No newline at end of file
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE software11 (
url VARCHAR(255),
computer_reference VARCHAR(255) DEFAULT 'computer',
CONSTRAINT uniq PRIMARY KEY (url, computer_reference)
);
INSERT INTO "software11" VALUES('/srv/slapgrid//srv//runner/project//slapos/software.cfg','computer');
CREATE TABLE computer11 (
reference VARCHAR(255) DEFAULT 'computer',
address VARCHAR(255),
netmask VARCHAR(255),
CONSTRAINT uniq PRIMARY KEY (reference)
);
INSERT INTO "computer11" VALUES('computer','127.0.0.1','255.255.255.255');
CREATE TABLE partition11 (
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',
CONSTRAINT uniq PRIMARY KEY (reference, computer_reference)
);
INSERT INTO "partition11" 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');
INSERT INTO "partition11" 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');
INSERT INTO "partition11" 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');
INSERT INTO "partition11" 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');
INSERT INTO "partition11" 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');
INSERT INTO "partition11" 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');
INSERT INTO "partition11" VALUES('slappart6','computer','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started');
INSERT INTO "partition11" VALUES('slappart7','computer','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started');
INSERT INTO "partition11" VALUES('slappart8','computer','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started');
INSERT INTO "partition11" VALUES('slappart9','computer','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started');
CREATE TABLE slave11 (
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_network11 (
partition_reference VARCHAR(255),
computer_reference VARCHAR(255) DEFAULT 'computer',
reference VARCHAR(255),
address VARCHAR(255),
netmask VARCHAR(255)
);
INSERT INTO "partition_network11" VALUES('slappart0','computer','slappart0','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network11" VALUES('slappart0','computer','slappart0','fc00::1','ffff:ffff:ffff::');
INSERT INTO "partition_network11" VALUES('slappart1','computer','slappart1','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network11" VALUES('slappart1','computer','slappart1','fc00::1','ffff:ffff:ffff::');
INSERT INTO "partition_network11" VALUES('slappart2','computer','slappart2','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network11" VALUES('slappart2','computer','slappart2','fc00::1','ffff:ffff:ffff::');
INSERT INTO "partition_network11" VALUES('slappart3','computer','slappart3','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network11" VALUES('slappart3','computer','slappart3','fc00::1','ffff:ffff:ffff::');
INSERT INTO "partition_network11" VALUES('slappart4','computer','slappart4','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network11" VALUES('slappart4','computer','slappart4','fc00::1','ffff:ffff:ffff::');
INSERT INTO "partition_network11" VALUES('slappart5','computer','slappart5','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network11" VALUES('slappart5','computer','slappart5','fc00::1','ffff:ffff:ffff::');
INSERT INTO "partition_network11" VALUES('slappart6','computer','slappart6','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network11" VALUES('slappart6','computer','slappart6','fc00::1','ffff:ffff:ffff::');
INSERT INTO "partition_network11" VALUES('slappart7','computer','slappart7','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network11" VALUES('slappart7','computer','slappart7','fc00::1','ffff:ffff:ffff::');
INSERT INTO "partition_network11" VALUES('slappart8','computer','slappart8','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network11" VALUES('slappart8','computer','slappart8','fc00::1','ffff:ffff:ffff::');
INSERT INTO "partition_network11" VALUES('slappart9','computer','slappart9','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network11" VALUES('slappart9','computer','slappart9','fc00::1','ffff:ffff:ffff::');
CREATE TABLE forwarded_partition_request11 (
partition_reference VARCHAR(255), -- a.k.a source_instance_id
master_url VARCHAR(255)
);
COMMIT;
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE software12 (
url VARCHAR(255),
computer_reference VARCHAR(255) DEFAULT 'computer',
requested_state VARCHAR(255) DEFAULT 'available',
CONSTRAINT uniq PRIMARY KEY (url, computer_reference)
);
INSERT INTO "software12" VALUES('/srv/slapgrid//srv//runner/project//slapos/software.cfg','computer','available');
CREATE TABLE computer12 (
reference VARCHAR(255) DEFAULT 'computer',
address VARCHAR(255),
netmask VARCHAR(255),
CONSTRAINT uniq PRIMARY KEY (reference)
);
INSERT INTO "computer12" VALUES('computer','127.0.0.1','255.255.255.255');
CREATE TABLE partition12 (
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',
CONSTRAINT uniq PRIMARY KEY (reference, computer_reference)
);
INSERT INTO "partition12" 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');
INSERT INTO "partition12" 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');
INSERT INTO "partition12" 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');
INSERT INTO "partition12" 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');
INSERT INTO "partition12" 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');
INSERT INTO "partition12" 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');
INSERT INTO "partition12" VALUES('slappart6','computer','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started');
INSERT INTO "partition12" VALUES('slappart7','computer','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started');
INSERT INTO "partition12" VALUES('slappart8','computer','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started');
INSERT INTO "partition12" VALUES('slappart9','computer','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started');
CREATE TABLE slave12 (
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_network12 (
partition_reference VARCHAR(255),
computer_reference VARCHAR(255) DEFAULT 'computer',
reference VARCHAR(255),
address VARCHAR(255),
netmask VARCHAR(255)
);
INSERT INTO "partition_network12" VALUES('slappart0','computer','slappart0','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart0','computer','slappart0','fc00::1','ffff:ffff:ffff::');
INSERT INTO "partition_network12" VALUES('slappart1','computer','slappart1','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart1','computer','slappart1','fc00::1','ffff:ffff:ffff::');
INSERT INTO "partition_network12" VALUES('slappart2','computer','slappart2','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart2','computer','slappart2','fc00::1','ffff:ffff:ffff::');
INSERT INTO "partition_network12" VALUES('slappart3','computer','slappart3','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart3','computer','slappart3','fc00::1','ffff:ffff:ffff::');
INSERT INTO "partition_network12" VALUES('slappart4','computer','slappart4','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart4','computer','slappart4','fc00::1','ffff:ffff:ffff::');
INSERT INTO "partition_network12" VALUES('slappart5','computer','slappart5','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart5','computer','slappart5','fc00::1','ffff:ffff:ffff::');
INSERT INTO "partition_network12" VALUES('slappart6','computer','slappart6','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart6','computer','slappart6','fc00::1','ffff:ffff:ffff::');
INSERT INTO "partition_network12" VALUES('slappart7','computer','slappart7','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart7','computer','slappart7','fc00::1','ffff:ffff:ffff::');
INSERT INTO "partition_network12" VALUES('slappart8','computer','slappart8','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart8','computer','slappart8','fc00::1','ffff:ffff:ffff::');
INSERT INTO "partition_network12" VALUES('slappart9','computer','slappart9','127.0.0.1','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart9','computer','slappart9','fc00::1','ffff:ffff:ffff::');
CREATE TABLE forwarded_partition_request12 (
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 software12 ( CREATE TABLE software13 (
url VARCHAR(255), url VARCHAR(255),
requested_state VARCHAR(255) DEFAULT 'available',
computer_reference VARCHAR(255) DEFAULT 'slaprunner', computer_reference VARCHAR(255) DEFAULT 'slaprunner',
requested_state VARCHAR(255) DEFAULT 'available',
CONSTRAINT uniq PRIMARY KEY (url, computer_reference) CONSTRAINT uniq PRIMARY KEY (url, computer_reference)
); );
INSERT INTO "software12" VALUES('/srv/slapgrid/slappart8/srv/runner/project/slapos/software/seleniumrunner/software.cfg','available','slaprunner'); INSERT INTO "software13" VALUES('/srv/slapgrid/slappart8/srv/runner/project/slapos/software/seleniumrunner/software.cfg','slaprunner','available');
INSERT INTO "software12" VALUES('/srv/slapgrid/slappart8/srv/runner/project/slapos/software/evil/software.cfg','available','slaprunner'); INSERT INTO "software13" VALUES('/srv/slapgrid/slappart8/srv/runner/project/slapos/software/evil/software.cfg','slaprunner','available');
INSERT INTO "software12" VALUES('/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','available','slaprunner'); INSERT INTO "software13" VALUES('/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','slaprunner','available');
CREATE TABLE computer12 ( CREATE TABLE computer13 (
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 "computer12" VALUES('slaprunner','10.0.30.235','255.255.255.255'); INSERT INTO "computer13" VALUES('slaprunner','10.0.30.235','255.255.255.255');
CREATE TABLE partition12 ( CREATE TABLE partition13 (
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',
...@@ -31,7 +31,7 @@ CREATE TABLE partition12 ( ...@@ -31,7 +31,7 @@ CREATE TABLE partition12 (
requested_state VARCHAR(255) NOT NULL DEFAULT 'started', requested_state VARCHAR(255) NOT NULL DEFAULT 'started',
CONSTRAINT uniq PRIMARY KEY (reference, computer_reference) CONSTRAINT uniq PRIMARY KEY (reference, computer_reference)
); );
INSERT INTO "partition12" VALUES('slappart0','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?> INSERT INTO "partition13" 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": {
...@@ -79,7 +79,7 @@ INSERT INTO "partition12" VALUES('slappart0','slaprunner','busy','/srv/slapgrid/ ...@@ -79,7 +79,7 @@ INSERT INTO "partition12" 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,'default','slaprunner-dev-local-frontend-2',NULL,'started');
INSERT INTO "partition12" VALUES('slappart1','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?> INSERT INTO "partition13" 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>
...@@ -88,7 +88,7 @@ INSERT INTO "partition12" VALUES('slappart1','slaprunner','busy','/srv/slapgrid/ ...@@ -88,7 +88,7 @@ INSERT INTO "partition12" 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,'caucase','caucase','slappart0','started');
INSERT INTO "partition12" VALUES('slappart2','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?> INSERT INTO "partition13" 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>
...@@ -97,7 +97,7 @@ INSERT INTO "partition12" VALUES('slappart2','slaprunner','busy','/srv/slapgrid/ ...@@ -97,7 +97,7 @@ INSERT INTO "partition12" 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,'kumofs','memcached-persistent','slappart0','started');
INSERT INTO "partition12" VALUES('slappart3','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?> INSERT INTO "partition13" 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>
...@@ -106,7 +106,7 @@ INSERT INTO "partition12" VALUES('slappart3','slaprunner','busy','/srv/slapgrid/ ...@@ -106,7 +106,7 @@ INSERT INTO "partition12" 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,'kumofs','memcached-volatile','slappart0','started');
INSERT INTO "partition12" VALUES('slappart4','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?> INSERT INTO "partition13" 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>
...@@ -115,7 +115,7 @@ INSERT INTO "partition12" VALUES('slappart4','slaprunner','busy','/srv/slapgrid/ ...@@ -115,7 +115,7 @@ INSERT INTO "partition12" 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,'mariadb','mariadb','slappart0','started');
INSERT INTO "partition12" VALUES('slappart5','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?> INSERT INTO "partition13" 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>
...@@ -124,7 +124,7 @@ INSERT INTO "partition12" VALUES('slappart5','slaprunner','busy','/srv/slapgrid/ ...@@ -124,7 +124,7 @@ INSERT INTO "partition12" 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,'zodb-zeo','zodb','slappart0','started');
INSERT INTO "partition12" VALUES('slappart6','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?> INSERT INTO "partition13" 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>
...@@ -133,7 +133,7 @@ INSERT INTO "partition12" VALUES('slappart6','slaprunner','busy','/srv/slapgrid/ ...@@ -133,7 +133,7 @@ INSERT INTO "partition12" 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,'zope','zope-activities','slappart0','started');
INSERT INTO "partition12" VALUES('slappart7','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?> INSERT INTO "partition13" 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>
...@@ -142,7 +142,7 @@ INSERT INTO "partition12" VALUES('slappart7','slaprunner','busy','/srv/slapgrid/ ...@@ -142,7 +142,7 @@ INSERT INTO "partition12" 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,'zope','zope-backend','slappart0','started');
INSERT INTO "partition12" VALUES('slappart8','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/erp5/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?> INSERT INTO "partition13" 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>
...@@ -151,7 +151,7 @@ INSERT INTO "partition12" VALUES('slappart8','slaprunner','busy','/srv/slapgrid/ ...@@ -151,7 +151,7 @@ INSERT INTO "partition12" 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,'balancer','balancer','slappart0','started');
INSERT INTO "partition12" VALUES('slappart9','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/seleniumrunner/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?> INSERT INTO "partition13" 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>
...@@ -159,22 +159,22 @@ INSERT INTO "partition12" VALUES('slappart9','slaprunner','busy','/srv/slapgrid/ ...@@ -159,22 +159,22 @@ INSERT INTO "partition12" VALUES('slappart9','slaprunner','busy','/srv/slapgrid/
<parameter id="display">:123</parameter> <parameter id="display">:123</parameter>
</instance> </instance>
',NULL,'RootSoftwareInstance','seleniumrunner',NULL,'started'); ',NULL,'RootSoftwareInstance','seleniumrunner',NULL,'started');
INSERT INTO "partition12" VALUES('slappart10','slaprunner','busy','/srv/slapgrid/slappart8/srv/runner/project/slapos/software/evil/software.cfg','<?xml version=''1.0'' encoding=''utf-8''?> INSERT INTO "partition13" 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,'RootSoftwareInstance','evil-instance-with-_-not-json',NULL,'started');
INSERT INTO "partition12" VALUES('slappart11','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started'); INSERT INTO "partition13" VALUES('slappart11','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started');
INSERT INTO "partition12" VALUES('slappart12','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started'); INSERT INTO "partition13" VALUES('slappart12','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started');
INSERT INTO "partition12" VALUES('slappart13','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started'); INSERT INTO "partition13" VALUES('slappart13','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started');
INSERT INTO "partition12" VALUES('slappart14','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started'); INSERT INTO "partition13" VALUES('slappart14','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started');
INSERT INTO "partition12" VALUES('slappart15','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started'); INSERT INTO "partition13" VALUES('slappart15','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started');
INSERT INTO "partition12" VALUES('slappart16','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started'); INSERT INTO "partition13" VALUES('slappart16','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started');
INSERT INTO "partition12" VALUES('slappart17','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started'); INSERT INTO "partition13" VALUES('slappart17','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started');
INSERT INTO "partition12" VALUES('slappart18','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started'); INSERT INTO "partition13" VALUES('slappart18','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started');
INSERT INTO "partition12" VALUES('slappart19','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started'); INSERT INTO "partition13" VALUES('slappart19','slaprunner','free',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'started');
CREATE TABLE slave12 ( CREATE TABLE slave13 (
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,
...@@ -182,54 +182,54 @@ CREATE TABLE slave12 ( ...@@ -182,54 +182,54 @@ CREATE TABLE slave12 (
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_network12 ( CREATE TABLE partition_network13 (
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_network12" VALUES('slappart0','slaprunner','slappart0','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network13" VALUES('slappart0','slaprunner','slappart0','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart0','slaprunner','slappart0','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network13" VALUES('slappart0','slaprunner','slappart0','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network12" VALUES('slappart1','slaprunner','slappart1','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network13" VALUES('slappart1','slaprunner','slappart1','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart1','slaprunner','slappart1','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network13" VALUES('slappart1','slaprunner','slappart1','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network12" VALUES('slappart2','slaprunner','slappart2','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network13" VALUES('slappart2','slaprunner','slappart2','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart2','slaprunner','slappart2','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network13" VALUES('slappart2','slaprunner','slappart2','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network12" VALUES('slappart3','slaprunner','slappart3','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network13" VALUES('slappart3','slaprunner','slappart3','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart3','slaprunner','slappart3','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network13" VALUES('slappart3','slaprunner','slappart3','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network12" VALUES('slappart4','slaprunner','slappart4','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network13" VALUES('slappart4','slaprunner','slappart4','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart4','slaprunner','slappart4','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network13" VALUES('slappart4','slaprunner','slappart4','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network12" VALUES('slappart5','slaprunner','slappart5','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network13" VALUES('slappart5','slaprunner','slappart5','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart5','slaprunner','slappart5','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network13" VALUES('slappart5','slaprunner','slappart5','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network12" VALUES('slappart6','slaprunner','slappart6','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network13" VALUES('slappart6','slaprunner','slappart6','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart6','slaprunner','slappart6','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network13" VALUES('slappart6','slaprunner','slappart6','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network12" VALUES('slappart7','slaprunner','slappart7','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network13" VALUES('slappart7','slaprunner','slappart7','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart7','slaprunner','slappart7','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network13" VALUES('slappart7','slaprunner','slappart7','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network12" VALUES('slappart8','slaprunner','slappart8','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network13" VALUES('slappart8','slaprunner','slappart8','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart8','slaprunner','slappart8','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network13" VALUES('slappart8','slaprunner','slappart8','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network12" VALUES('slappart9','slaprunner','slappart9','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network13" VALUES('slappart9','slaprunner','slappart9','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart9','slaprunner','slappart9','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network13" VALUES('slappart9','slaprunner','slappart9','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network12" VALUES('slappart10','slaprunner','slappart10','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network13" VALUES('slappart10','slaprunner','slappart10','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart10','slaprunner','slappart10','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network13" VALUES('slappart10','slaprunner','slappart10','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network12" VALUES('slappart11','slaprunner','slappart11','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network13" VALUES('slappart11','slaprunner','slappart11','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart11','slaprunner','slappart11','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network13" VALUES('slappart11','slaprunner','slappart11','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network12" VALUES('slappart12','slaprunner','slappart12','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network13" VALUES('slappart12','slaprunner','slappart12','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart12','slaprunner','slappart12','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network13" VALUES('slappart12','slaprunner','slappart12','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network12" VALUES('slappart13','slaprunner','slappart13','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network13" VALUES('slappart13','slaprunner','slappart13','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart13','slaprunner','slappart13','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network13" VALUES('slappart13','slaprunner','slappart13','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network12" VALUES('slappart14','slaprunner','slappart14','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network13" VALUES('slappart14','slaprunner','slappart14','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart14','slaprunner','slappart14','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network13" VALUES('slappart14','slaprunner','slappart14','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network12" VALUES('slappart15','slaprunner','slappart15','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network13" VALUES('slappart15','slaprunner','slappart15','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart15','slaprunner','slappart15','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network13" VALUES('slappart15','slaprunner','slappart15','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network12" VALUES('slappart16','slaprunner','slappart16','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network13" VALUES('slappart16','slaprunner','slappart16','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart16','slaprunner','slappart16','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network13" VALUES('slappart16','slaprunner','slappart16','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network12" VALUES('slappart17','slaprunner','slappart17','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network13" VALUES('slappart17','slaprunner','slappart17','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart17','slaprunner','slappart17','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network13" VALUES('slappart17','slaprunner','slappart17','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network12" VALUES('slappart18','slaprunner','slappart18','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network13" VALUES('slappart18','slaprunner','slappart18','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart18','slaprunner','slappart18','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network13" VALUES('slappart18','slaprunner','slappart18','::1','ffff:ffff:ffff::');
INSERT INTO "partition_network12" VALUES('slappart19','slaprunner','slappart19','10.0.30.235','255.255.255.255'); INSERT INTO "partition_network13" VALUES('slappart19','slaprunner','slappart19','10.0.30.235','255.255.255.255');
INSERT INTO "partition_network12" VALUES('slappart19','slaprunner','slappart19','::1','ffff:ffff:ffff::'); INSERT INTO "partition_network13" VALUES('slappart19','slaprunner','slappart19','::1','ffff:ffff:ffff::');
CREATE TABLE forwarded_partition_request12 ( CREATE TABLE forwarded_partition_request13 (
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)
); );
......
#!/bin/bash
# Update an old dump to current format. Useful to update tests date
# when increasing database version number.
# Note that because it's what test expects, $COMPUTER_ID must be set to
# `computer` for slapos/tests/test_slapproxy/database_dump_version_??.sql
# and `slaprunner` for slapos/tests/test_slapproxy/database_dump_version_current.sql
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3"]; then
echo "Usage: $0 computer_id dump_before.sql dump_after.sql"
exit 1;
fi
COMPUTER_ID=$1
DUMP_BEFORE=$2
DUMP_AFTER=$3
PORT=6123
echo "Using slapos $(which slapos) : $(slapos --version)"
TMPD=$(mktemp -d)
if [ ! -e $TMPD ]; then
>&2 echo "Failed to create temp directory"
exit 1
fi
trap "exit 1" HUP INT PIPE QUIT TERM
trap 'rm -rf "$TMPD"' exit
cat <<EOF > ${TMPD}/slapos.cfg
[slapos]
computer_id = $COMPUTER_ID
[slapproxy]
host = 127.0.0.1
port = $PORT
database_uri = ${TMPD}/proxy.db
EOF
sqlite3 ${TMPD}/proxy.db < $DUMP_BEFORE
slapos proxy start --cfg ${TMPD}/slapos.cfg &
SLAPOS_PROXY_PID=$!
curl --silent --retry-connrefuse --retry 3 http://127.0.0.1:${PORT}/getComputerInformation?computer_id=$COMPUTER_ID
echo ".dump" | sqlite3 ${TMPD}/proxy.db > $DUMP_AFTER
kill $SLAPOS_PROXY_PID
wait
\ No newline at end of file
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