InvalidVersionError: 103 is not 105
I have an empty posgresql database: psql -c "create database galaxy;" I'm trying to launch run.sh from the latest version of galaxy-dist. Migration proceeds normally up to this point: ######### galaxy.model.migrate.check INFO 2014-05-16 19:11:17,121 galaxy.model.migrate.check INFO 2014-05-16 19:11:17,121 Migration script to add the cleanup_event* tables. galaxy.model.migrate.check INFO 2014-05-16 19:11:17,121 galaxy.model.migrate.check INFO 2014-05-16 19:11:17,121 galaxy.model.migrate.check INFO 2014-05-16 19:11:17,121 Migrating 105 -> 106... galaxy.model.migrate.check INFO 2014-05-16 19:11:17,121 Traceback (most recent call last): File "/opt/galaxy/web/lib/galaxy/webapps/galaxy/buildapp.py", line 39, in app_factory app = UniverseApplication( global_conf = global_conf, **kwargs ) File "/opt/galaxy/web/lib/galaxy/app.py", line 45, in __init__ self._configure_models( check_migrate_databases=True, check_migrate_tools=check_migrate_tools, config_file=config_file ) File "/opt/galaxy/web/lib/galaxy/config.py", line 629, in _configure_models create_or_verify_database( db_url, config_file, self.config.database_engine_options, app=self ) File "/opt/galaxy/web/lib/galaxy/model/migrate/check.py", line 73, in create_or_verify_database migrate() File "/opt/galaxy/web/lib/galaxy/model/migrate/check.py", line 57, in migrate migrate_to_current_version( engine, db_schema ) File "/opt/galaxy/web/lib/galaxy/model/migrate/check.py", line 131, in migrate_to_current_version schema.runchange( ver, change, changeset.step ) File "/opt/galaxy/web/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/versioning/schema.py", line 89, in runchange (self.version, startver)) InvalidVersionError: 103 is not 105 ######### I re-run run.sh and get: ######### migrate.versioning.repository DEBUG 2014-05-16 19:12:22,132 Repository lib/galaxy/model/migrate loaded successfully migrate.versioning.repository DEBUG 2014-05-16 19:12:22,132 Config: OrderedDict([('db_settings', OrderedDict([('__name__', 'db_settings'), ('repository_id', 'Galaxy'), ('version_table', 'migrate_version'), ('required_dbs', '[]')]))]) galaxy.model.migrate.check DEBUG 2014-05-16 19:12:22,136 psycopg2 egg successfully loaded for postgres dialect /opt/galaxy/web/eggs/SQLAlchemy-0.7.9-py2.7-linux-x86_64-ucs4.egg/sqlalchemy/engine/url.py:105: SADeprecationWarning: The SQLAlchemy PostgreSQL dialect has been renamed from 'postgres' to 'postgresql'. The new URL format is postgresql[+driver]://<user>:<pass>@<host>/<dbname> Traceback (most recent call last): File "/opt/galaxy/web/lib/galaxy/webapps/galaxy/buildapp.py", line 39, in app_factory app = UniverseApplication( global_conf = global_conf, **kwargs ) File "/opt/galaxy/web/lib/galaxy/app.py", line 45, in __init__ self._configure_models( check_migrate_databases=True, check_migrate_tools=check_migrate_tools, config_file=config_file ) File "/opt/galaxy/web/lib/galaxy/config.py", line 629, in _configure_models create_or_verify_database( db_url, config_file, self.config.database_engine_options, app=self ) File "/opt/galaxy/web/lib/galaxy/model/migrate/check.py", line 111, in create_or_verify_database % ( db_schema.version, migrate_repository.versions.latest, config_arg ) ) Exception: Your database has version '103' but this code expects version '120'. Please backup your database and then migrate the schema by running 'sh manage_db.sh upgrade'. ######### I manually run manage_db.sh upgrade. This step passes, and then I run run.sh a third time and galaxy finally starts properly. My question is: why can't the manage_db.sh upgrade step be included automatically when the initial DB build fails? This is the first time a DB is being built, so it should be dead simple.... Cheers, -Evan Bollig Research Associate | Application Developer | User Support Consultant Minnesota Supercomputing Institute 599 Walter Library 612 624 1447 evan@msi.umn.edu boll0107@umn.edu
I have an empty posgresql database: psql -c "create database galaxy;" I'm trying to launch run.sh from the latest version of galaxy-dist. Migration proceeds normally up to this point: ######### galaxy.model.migrate.check INFO 2014-05-16 19:11:17,121 galaxy.model.migrate.check INFO 2014-05-16 19:11:17,121 Migration script to add the cleanup_event* tables. galaxy.model.migrate.check INFO 2014-05-16 19:11:17,121 galaxy.model.migrate.check INFO 2014-05-16 19:11:17,121 galaxy.model.migrate.check INFO 2014-05-16 19:11:17,121 Migrating 105 -> 106... galaxy.model.migrate.check INFO 2014-05-16 19:11:17,121 Traceback (most recent call last): File "/opt/galaxy/web/lib/galaxy/webapps/galaxy/buildapp.py", line 39, in app_factory app = UniverseApplication( global_conf = global_conf, **kwargs ) File "/opt/galaxy/web/lib/galaxy/app.py", line 45, in __init__ self._configure_models( check_migrate_databases=True, check_migrate_tools=check_migrate_tools, config_file=config_file ) File "/opt/galaxy/web/lib/galaxy/config.py", line 629, in _configure_models create_or_verify_database( db_url, config_file, self.config.database_engine_options, app=self ) File "/opt/galaxy/web/lib/galaxy/model/migrate/check.py", line 73, in create_or_verify_database migrate() File "/opt/galaxy/web/lib/galaxy/model/migrate/check.py", line 57, in migrate migrate_to_current_version( engine, db_schema ) File "/opt/galaxy/web/lib/galaxy/model/migrate/check.py", line 131, in migrate_to_current_version schema.runchange( ver, change, changeset.step ) File "/opt/galaxy/web/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/versioning/schema.py", line 89, in runchange (self.version, startver)) InvalidVersionError: 103 is not 105 ######### I re-run run.sh and get: ######### migrate.versioning.repository DEBUG 2014-05-16 19:12:22,132 Repository lib/galaxy/model/migrate loaded successfully migrate.versioning.repository DEBUG 2014-05-16 19:12:22,132 Config: OrderedDict([('db_settings', OrderedDict([('__name__', 'db_settings'), ('repository_id', 'Galaxy'), ('version_table', 'migrate_version'), ('required_dbs', '[]')]))]) galaxy.model.migrate.check DEBUG 2014-05-16 19:12:22,136 psycopg2 egg successfully loaded for postgres dialect /opt/galaxy/web/eggs/SQLAlchemy-0.7.9-py2.7-linux-x86_64-ucs4.egg/sqlalchemy/engine/url.py:105: SADeprecationWarning: The SQLAlchemy PostgreSQL dialect has been renamed from 'postgres' to 'postgresql'. The new URL format is postgresql[+driver]://<user>:<pass>@<host>/<dbname> Traceback (most recent call last): File "/opt/galaxy/web/lib/galaxy/webapps/galaxy/buildapp.py", line 39, in app_factory app = UniverseApplication( global_conf = global_conf, **kwargs ) File "/opt/galaxy/web/lib/galaxy/app.py", line 45, in __init__ self._configure_models( check_migrate_databases=True, check_migrate_tools=check_migrate_tools, config_file=config_file ) File "/opt/galaxy/web/lib/galaxy/config.py", line 629, in _configure_models create_or_verify_database( db_url, config_file, self.config.database_engine_options, app=self ) File "/opt/galaxy/web/lib/galaxy/model/migrate/check.py", line 111, in create_or_verify_database % ( db_schema.version, migrate_repository.versions.latest, config_arg ) ) Exception: Your database has version '103' but this code expects version '120'. Please backup your database and then migrate the schema by running 'sh manage_db.sh upgrade'. ######### I manually run manage_db.sh upgrade. This step passes, and then I run run.sh a third time and galaxy finally starts properly. My question is: why can't the manage_db.sh upgrade step be included automatically when the initial DB build fails? This is the first time a DB is being built, so it should be dead simple.... Cheers, -Evan Bollig Research Associate | Application Developer | User Support Consultant Minnesota Supercomputing Institute 599 Walter Library 612 624 1447 evan@msi.umn.edu boll0107@umn.edu
On Fri, May 16, 2014 at 3:33 PM, Evan Bollig <boll0107@umn.edu> wrote:
InvalidVersionError: 103 is not 105
This would indicate to me that migration script 104 failed. My question is: why can't the manage_db.sh upgrade step be included
automatically when the initial DB build fails?
It is, in a sense, hence all the other migration steps. Can you provide more details about your configuration? Postgres version, whether you're using a virtualenv (or not), or anything else you think seems relevant? -Dannon
Hey Dannon, I managed to resolve this on my own. The postgres version is 9.1, and I'm on Ubuntu 12.04. The instance is an OpenStack VM. It turned out that the dir contained files that were outdated from a previous version of galaxy-dist. After I realized that they were part of hgignore, I ran "hg clean --all" to make sure I was working with a fresh install. Cheers, -E -Evan Bollig Research Associate | Application Developer | User Support Consultant Minnesota Supercomputing Institute 599 Walter Library 612 624 1447 evan@msi.umn.edu boll0107@umn.edu On Fri, May 16, 2014 at 2:39 PM, Dannon Baker <dannon.baker@gmail.com> wrote:
On Fri, May 16, 2014 at 3:33 PM, Evan Bollig <boll0107@umn.edu> wrote:
InvalidVersionError: 103 is not 105
This would indicate to me that migration script 104 failed.
My question is: why can't the manage_db.sh upgrade step be included automatically when the initial DB build fails?
It is, in a sense, hence all the other migration steps. Can you provide more details about your configuration? Postgres version, whether you're using a virtualenv (or not), or anything else you think seems relevant?
-Dannon
Ok, great, glad you're up and running! I'll scratch this one off the list of things to think about. On Mon, May 19, 2014 at 4:00 PM, Evan Bollig <boll0107@umn.edu> wrote:
Hey Dannon,
I managed to resolve this on my own.
The postgres version is 9.1, and I'm on Ubuntu 12.04. The instance is an OpenStack VM. It turned out that the dir contained files that were outdated from a previous version of galaxy-dist. After I realized that they were part of hgignore, I ran "hg clean --all" to make sure I was working with a fresh install.
Cheers,
-E -Evan Bollig Research Associate | Application Developer | User Support Consultant Minnesota Supercomputing Institute 599 Walter Library 612 624 1447 evan@msi.umn.edu boll0107@umn.edu
On Fri, May 16, 2014 at 2:39 PM, Dannon Baker <dannon.baker@gmail.com> wrote:
On Fri, May 16, 2014 at 3:33 PM, Evan Bollig <boll0107@umn.edu> wrote:
InvalidVersionError: 103 is not 105
This would indicate to me that migration script 104 failed.
My question is: why can't the manage_db.sh upgrade step be included automatically when the initial DB build fails?
It is, in a sense, hence all the other migration steps. Can you provide more details about your configuration? Postgres version, whether you're using a virtualenv (or not), or anything else you think seems relevant?
-Dannon
participants (2)
-
Dannon Baker
-
Evan Bollig