Unable to create DB (gearbox setup-db) from scratch (default branch)
Long Vu
long.vu at intelerad.com
Wed Apr 12 17:59:28 UTC 2017
Hi,
Running code from this PR
https://bitbucket.org/conservancy/kallithea/pull-requests/314
To reproduce:
docker run --name reprobug -d -p 8085:5000 tlvu/kallithea-evolve:2017-04-11
docker logs reprobug
Then clean up:
docker stop reprobug
docker rm -v reprobug
I might have the wrong way of invoking gearbox setup-db. Please let
me know what's the correct way.
root at a53ac866b92e:/kallithea/config# /bin/bash -x /kallithea/run.sh
+ KALLITHEA_ADMIN_USER=admin
+ KALLITHEA_ADMIN_PASS=secret
+ KALLITHEA_ADMIN_MAIL=admin at example.com
+ cd /kallithea/config
+ '[' '!' -e kallithea.ini ']'
+ echo 'Creating configuration file...'
Creating configuration file...
+ gearbox make-config kallithea.ini
Wrote new config file in /kallithea/config/kallithea.ini
+ '[' -n '' ']'
+ echo 'Creating database...'
Creating database...
+ gearbox setup-db -c kallithea.ini --user=admin --password=secret
--email=admin at example.com --repos=/kallithea/repos --force-yes
2017-04-12 17:01:27.872 INFO [kallithea.model.base] initializing db
for sqlite:////kallithea/config/kallithea.db?timeout=60
2017-04-12 17:01:27.875 INFO [kallithea.lib.auth] getting information
about all available permissions
2017-04-12 17:01:27.986 ERROR [gearbox] (sqlite3.OperationalError) no
such table: permissions [SQL: u'SELECT permissions.permission_id AS
permissions_permission_id, permissions.permission_name AS
permissions_per
mission_name \nFROM permissions']
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gearbox/main.py", line
167, in _run_subcommand
return cmd.run(parsed_args)
File "/kallithea/kallithea/kallithea/lib/paster_commands/common.py",
line 65, in run
self._bootstrap_config(args.config_file)
File "/kallithea/kallithea/kallithea/lib/paster_commands/common.py",
line 90, in _bootstrap_config
make_app(conf.global_conf, **conf.local_conf)
File "/kallithea/kallithea/kallithea/config/middleware.py", line 46,
in make_app
app = make_base_app(global_conf, full_stack=full_stack, **app_conf)
File "/usr/local/lib/python2.7/dist-packages/tg/configuration/app_config.py",
line 1240, in make_base_app
tg.hooks.notify('configure_new_app', args=(app,))
File "/usr/local/lib/python2.7/dist-packages/tg/configuration/hooks.py",
line 109, in notify
self._call_handler(hook_name, trap_exceptions, func, args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/tg/configuration/hooks.py",
line 33, in _call_handler
return func(*args, **kwargs)
File "/kallithea/kallithea/kallithea/config/app_cfg.py", line 142,
in setup_configuration
set_available_permissions(config)
File "/kallithea/kallithea/kallithea/lib/auth.py", line 728, in
set_available_permissions
all_perms = sa.query(Permission).all()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py",
line 2613, in all
return list(self)
File "/kallithea/kallithea/kallithea/lib/caching_query.py", line 81,
in __iter__
return Query.__iter__(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py",
line 2761, in __iter__
return self._execute_and_instances(context)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py",
line 2776, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
line 914, in execute
return meth(self, multiparams, params)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py",
line 323, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
line 1010, in _execute_clauseelement
compiled_sql, distilled_params
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
line 1146, in _execute_context
context)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
line 1341, in _handle_dbapi_exception
exc_info
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py",
line 203, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
line 1139, in _execute_context
context)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py",
line 450, in do_execute
cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) no such table:
permissions [SQL: u'SELECT permissions.permission_id AS
permissions_permission_id, permissions.permission_name AS
permissions_permission_name \nFROM pe
rmissions']
--
Long Vu | Build Controller | Intelerad | +1-514-931-6222 ext. 7743
--
This email or any attachments may contain confidential or legally
privileged information intended for the sole use of the addressees. Any
use, redistribution, disclosure, or reproduction of this information,
except as intended, is prohibited. If you received this email in error,
please notify the sender and remove all copies of the message, including
any attachments.
More information about the kallithea-general
mailing list