Ask Your Question
0

Populate the Image service database on Ubuntu 16.04 internalError

asked 2017-03-01 08:59:26 -0500

updated 2017-03-02 07:32:39 -0500

Hello,

At the moment I'm enrolling a OpenStack on a Ubuntu 16.04 following the https://docs.openstack.org/ocata/install-guide-ubuntu/glance-install.html (documentation) for the Ocata releasa. But while populating the image service database I get following error:

CRITI [glance] InternalError: (pymysql.err.InternalError) (1054, u"Unknown column 'is_public' in 'virtual column function'") [SQL: u'ALTER TABLE images DROP COLUMN is_public']

Has anyone an idea how to fix this? A simple Google hasn't helped me for founding a solution.

Thanks in advance!

Here is my full stacktrace:

root@jerico-01:~# su -s /bin/sh -c "glance-manage db_sync" glance
/usr/lib/python2.7/dist-packages/oslo_db/sqlalchemy/enginefacade.py:1241: OsloDBDeprecationWarning: EngineFacade is deprecated; please use oslo_db.sqlalchemy.enginefacade
  expire_on_commit=expire_on_commit, _conf=conf)
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.runtime.migration] Running upgrade  -> liberty, liberty initial
INFO  [alembic.runtime.migration] Running upgrade liberty -> mitaka01, add index on created_at and updated_at columns of 'images' table
/usr/lib/python2.7/dist-packages/sqlalchemy/dialects/mysql/base.py:3000: SAWarning: Unknown schema content: u'  CONSTRAINT `CONSTRAINT_1` CHECK (`is_public` in (0,1)),'
  util.warn("Unknown schema content: %r" % line)
/usr/lib/python2.7/dist-packages/sqlalchemy/dialects/mysql/base.py:3000: SAWarning: Unknown schema content: u'  CONSTRAINT `CONSTRAINT_2` CHECK (`deleted` in (0,1)),'
  util.warn("Unknown schema content: %r" % line)
/usr/lib/python2.7/dist-packages/sqlalchemy/dialects/mysql/base.py:3000: SAWarning: Unknown schema content: u'  CONSTRAINT `CONSTRAINT_3` CHECK (`protected` in (0,1))'
  util.warn("Unknown schema content: %r" % line)
INFO  [alembic.runtime.migration] Running upgrade mitaka01 -> mitaka02, update metadef os_nova_server
/usr/lib/python2.7/dist-packages/sqlalchemy/dialects/mysql/base.py:3000: SAWarning: Unknown schema content: u'  CONSTRAINT `CONSTRAINT_1` CHECK (`protected` in (0,1))'
  util.warn("Unknown schema content: %r" % line)
INFO  [alembic.runtime.migration] Running upgrade mitaka02 -> ocata01, add visibility to and remove is_public from images
/usr/lib/python2.7/dist-packages/sqlalchemy/dialects/mysql/base.py:3000: SAWarning: Unknown schema content: u'  CONSTRAINT `CONSTRAINT_1` CHECK (`is_public` in (0,1)),'
  util.warn("Unknown schema content: %r" % line)
/usr/lib/python2.7/dist-packages/sqlalchemy/dialects/mysql/base.py:3000: SAWarning: Unknown schema content: u'  CONSTRAINT `CONSTRAINT_2` CHECK (`deleted` in (0,1)),'
  util.warn("Unknown schema content: %r" % line)
/usr/lib/python2.7/dist-packages/sqlalchemy/dialects/mysql/base.py:3000: SAWarning: Unknown schema content: u'  CONSTRAINT `CONSTRAINT_3` CHECK (`protected` in (0,1))'
  util.warn("Unknown schema content: %r" % line)
/usr/lib/python2.7/dist-packages/sqlalchemy/dialects/mysql/base.py:3000: SAWarning: Unknown schema content: u'  CONSTRAINT `CONSTRAINT_1` CHECK (`can_share` in (0,1)),'
  util.warn("Unknown schema content: %r" % line)
/usr/lib/python2.7/dist-packages/sqlalchemy/dialects/mysql/base.py:3000: SAWarning: Unknown schema content: u'  CONSTRAINT `CONSTRAINT_2` CHECK (`deleted` in (0,1))'
  util.warn("Unknown schema content: %r" % line)
CRITI [glance] InternalError: (pymysql.err.InternalError) (1054, u"Unknown column 'is_public' in 'virtual column function'") [SQL: u'ALTER TABLE images DROP COLUMN is_public']
Traceback (most recent call last):
  File "/usr/bin/glance-manage", line 10, in <module>
    sys.exit ...
(more)
edit retag flag offensive close merge delete

Comments

Same issue with CentOS. Have you find the solution? thanks.

vicky yy gravatar imagevicky yy ( 2017-06-05 10:15:23 -0500 )edit

Yes, in CentOS we have same problem...I don't think that this is a version problem, we only use ocata rdo repo and base CentOS and we can't resolve this...

emorenofer gravatar imageemorenofer ( 2017-06-19 02:10:33 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2017-03-02 15:32:23 -0500

I used https://docs.openstack.org/developer/devstack/ (DevStack) to enroll OpenStack and then everything was working. If somebody knows the solution for the problem described above, feel free :)

edit flag offensive delete link more

Comments

To me, this looks like a version mismatch between glance-manage and other parts of the software. You could start by comparing versions between the Devstack deployment and the manual installation.

Bernd Bausch gravatar imageBernd Bausch ( 2017-03-02 23:46:29 -0500 )edit
0

answered 2017-08-01 10:39:05 -0500

chrigl gravatar image

Did you enable innodb_strict_mode in your config? Same error here with innodb_strict_mode ON, but works fine with innodb_strict_mode OFF.

Or do you run mariadb 10.2.X? The default of innodb_strict_mode changed to ON in this version. https://mariadb.com/kb/en/mariadb/xtradbinnodb-server-system-variables/#innodb_strict_mode (https://mariadb.com/kb/en/mariadb/xtr...)

Anyway, try to disable innodb_strict_mode.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2017-03-01 08:59:26 -0500

Seen: 468 times

Last updated: Mar 02 '17