Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Not able to upload the image to the Image service

I am installing openstack newton on my centos 7 machine.

when i am trying to upload test image to image service getting following error.

"[root@controller ~]# openstack image create "cirros" --file cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare --public

500 Internal Server Error The server has either erred or is incapable of performing the requested operation. (HTTP 500) "

Here is the log message from the file - /var/log/glance/api.log

" 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 2109, in _flush 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi flush_context.execute() 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 373, in execute 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi rec.execute(self) 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 532, in execute 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi uow 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 174, in save_obj 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi mapper, table, insert) 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 767, in _emit_insert_statements 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi execute(statement, multiparams) 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi return meth(self, multiparams, params) 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi return connection._execute_clauseelement(self, multiparams, params) 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi compiled_sql, distilled_params 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi context) 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1337, in _handle_dbapi_exception 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi util.raise_from_cause(newraise, exc_info) 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi reraise(type(exception), exception, tb=exc_tb) 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi context) 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi cursor.execute(statement, parameters) 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi File "/usr/lib/python2.7/site-packages/pymysql/cursors.py", line 166, in execute 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi result = self._query(query) 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi File "/usr/lib/python2.7/site-packages/pymysql/cursors.py", line 322, in _query 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi conn.query(q) 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 841, in query 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi self._affected_rows = self._read_query_result(unbuffered=unbuffered) 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 1029, in _read_query_result 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi result.read() 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 1312, in read 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi first_packet = self.connection._read_packet() 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 991, in _read_packet 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi packet.check_error() 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 393, in check_error 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi err.raise_mysql_exception(self._data) 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi File "/usr/lib/python2.7/site-packages/pymysql/err.py", line 107, in raise_mysql_exception 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi raise errorclass(errno, errval) 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi ProgrammingError: (pymysql.err.ProgrammingError) (1146, u"Table 'glance.images' doesn't exist") [SQL: u'INSERT INTO images (created_at, updated_at, deleted_at, deleted, id, name, disk_format, container_format, size, virtual_size, status, is_public, checksum, min_disk, min_ram, owner, protected) VALUES (%(created_at)s, %(updated_at)s, %(deleted_at)s, %(deleted)s, %(id)s, %(name)s, %(disk_format)s, %(container_format)s, %(size)s, %(virtual_size)s, %(status)s, %(is_public)s, %(checksum)s, %(min_disk)s, %(min_ram)s, %(owner)s, %(protected)s)'] [parameters: {'status': 'queued', 'virtual_size': None, 'name': u'cirros', 'deleted': 0, 'container_format': u'bare', 'created_at': datetime.datetime(2016, 12, 21, 11, 56, 14, 228139), 'disk_format': u'qcow2', 'updated_at': datetime.datetime(2016, 12, 21, 11, 56, 14, 228139), 'owner': u'bf0655d24bce4dcba33ba549d5de9721', 'protected': 0, 'min_ram': 0, 'checksum': None, 'min_disk': 0, 'is_public': 1, 'deleted_at': None, 'id': '3e2e00e3-16b1-490c-b3bd-9f5e7e60e3c8', 'size': None}] 2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi 2016-12-21 06:56:14.233 9062 INFO eventlet.wsgi.server [req-ab3342ae-b86c-4b39-816a-6c5859411907 b22690131d0d40b09ad59eab61f4d3f1 bf0655d24bce4dcba33ba549d5de9721 - default default] 134.119.216.211 - - [21/Dec/2016 06:56:14] "POST /v2/images HTTP/1.1" 500 341 0.218425 "

Please suggest me where is the issue.

Thanks

Not able to upload the image to the Image service

I am installing openstack newton on my centos 7 machine.

when i am trying to upload test image to image service getting following error.

"[root@controller

[root@controller ~]# openstack image create "cirros" --file cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare --public

--public 500 Internal Server Error The server has either erred or is incapable of performing the requested operation. (HTTP 500) "

Here is the log message from the file - /var/log/glance/api.log

"

2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 2109, in _flush
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi     flush_context.execute()
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 373, in execute
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi     rec.execute(self)
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 532, in execute
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi     uow
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 174, in save_obj
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi     mapper, table, insert)
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 767, in _emit_insert_statements
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi     execute(statement, multiparams)
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi     return meth(self, multiparams, params)
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi   File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi     return connection._execute_clauseelement(self, multiparams, params)
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi     compiled_sql, distilled_params
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi     context)
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1337, in _handle_dbapi_exception
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi     util.raise_from_cause(newraise, exc_info)
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi   File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi     reraise(type(exception), exception, tb=exc_tb)
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi     context)
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi     cursor.execute(statement, parameters)
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi   File "/usr/lib/python2.7/site-packages/pymysql/cursors.py", line 166, in execute
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi     result = self._query(query)
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi   File "/usr/lib/python2.7/site-packages/pymysql/cursors.py", line 322, in _query
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi     conn.query(q)
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi   File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 841, in query
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi     self._affected_rows = self._read_query_result(unbuffered=unbuffered)
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi   File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 1029, in _read_query_result
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi     result.read()
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi   File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 1312, in read
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi     first_packet = self.connection._read_packet()
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi   File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 991, in _read_packet
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi     packet.check_error()
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi   File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 393, in check_error
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi     err.raise_mysql_exception(self._data)
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi   File "/usr/lib/python2.7/site-packages/pymysql/err.py", line 107, in raise_mysql_exception
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi     raise errorclass(errno, errval)
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi ProgrammingError: (pymysql.err.ProgrammingError) (1146, u"Table 'glance.images' doesn't exist") [SQL: u'INSERT INTO images (created_at, updated_at, deleted_at, deleted, id, name, disk_format, container_format, size, virtual_size, status, is_public, checksum, min_disk, min_ram, owner, protected) VALUES (%(created_at)s, %(updated_at)s, %(deleted_at)s, %(deleted)s, %(id)s, %(name)s, %(disk_format)s, %(container_format)s, %(size)s, %(virtual_size)s, %(status)s, %(is_public)s, %(checksum)s, %(min_disk)s, %(min_ram)s, %(owner)s, %(protected)s)'] [parameters: {'status': 'queued', 'virtual_size': None, 'name': u'cirros', 'deleted': 0, 'container_format': u'bare', 'created_at': datetime.datetime(2016, 12, 21, 11, 56, 14, 228139), 'disk_format': u'qcow2', 'updated_at': datetime.datetime(2016, 12, 21, 11, 56, 14, 228139), 'owner': u'bf0655d24bce4dcba33ba549d5de9721', 'protected': 0, 'min_ram': 0, 'checksum': None, 'min_disk': 0, 'is_public': 1, 'deleted_at': None, 'id': '3e2e00e3-16b1-490c-b3bd-9f5e7e60e3c8', 'size': None}]
2016-12-21 06:56:14.231 9062 ERROR glance.common.wsgi
2016-12-21 06:56:14.233 9062 INFO eventlet.wsgi.server [req-ab3342ae-b86c-4b39-816a-6c5859411907 b22690131d0d40b09ad59eab61f4d3f1 bf0655d24bce4dcba33ba549d5de9721 - default default] 134.119.216.211 - - [21/Dec/2016 06:56:14] "POST /v2/images HTTP/1.1" 500 341 0.218425
"

Please suggest me where is the issue.

Thanks