Excerpts from Shawn Doherty's message of 2017-07-25 14:35 -04:00:
Thanks for the description
something flukey here for me.
I have auto generated 3dd091c46d50 as head using alembic revision, but
db version stays at f18df089261. Using methods described above,
including beaker-init (--downgrade)have no affect on the db version.
I can interact with the db with the alembic stamp command but only to
maniuplate the version_number. Other db changes do not seem to be
Are you possibly running this on a system where you have your git
checkout, but you *also* have a copy of Beaker installed system-wide in
/usr/lib/python2.6/site-packages from the beaker-server RPM?
If so, beaker-init might be loading the migrations from site-packages
instead of from the source checkout. It uses pkg_resources which obeys
sys.path, sometimes '/usr/lib/python2.6/site-packages' sneaks itself
onto the front of sys.path, usually due to hackery with *.pth files from
some package or other.
The alembic command is looking in its .ini file to find the migrations,
which would be why it sees the ones in the git checkout as you expect.
Whereas beaker-init uses pkg_resources to find them, so that it works
even when it is installed as an RPM package.
Rev: 3dd091c46d50 (head)
Revision ID: 3dd091c46d50
Create Date: 2017-07-25 18:03:04.320470
associate a floating ip to each OpenStack instance
Revision ID: f18df089261
Create Date: 2016-12-05 05:59:28.858413
root@beaker-server-lc Server]# PYTHONPATH=../Common:. python
2017-07-25 18:06:40,981 __main__ INFO Upgrading schema to head revision
2017-07-25 18:06:40,981 alembic.migration INFO Context impl MySQLImpl.
2017-07-25 18:06:40,981 alembic.migration INFO Will assume
2017-07-25 18:06:40,987 __main__ INFO Upgrade completed
2017-07-25 18:06:40,987 __main__ INFO Populating tables with
pre-defined values if necessary
2017-07-25 18:06:41,225 __main__ INFO Pre-defined values populated
2017-07-25 18:06:41,226 __main__ INFO Exiting
SELECT * FROM alembic_version;
| version_num |
| f18df089261 |
> Dan Callaghan <dcallagh(a)redhat.com>
> Senior Software Engineer, Products & Technologies Operations
> Red Hat
Dan Callaghan <dcallagh(a)redhat.com>
Senior Software Engineer, Products & Technologies Operations