本帖最后由 marsaber 于 2014-12-24 09:14 编辑
版主,您好。
我的是KVM的虚拟机,2G内存。
操作系统是CentOS6.5 x86_64的,用的是Icehouse版本。
我把iptables规则清空了,把SELinux关闭了。
[root@control openstack_bak]# cat /etc/glance/glance-api.conf
[DEFAULT]
[database]
connection = mysql://glance:waftest@controller/glance
[keystone_authtoken]
auth_uri = "http://controller:5000/v2.0/"
auth_host = controller
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = glance
admin_password = waftest
[paste_deploy]
flavor = keystone
[store_type_location_strategy]
[root@control openstack_bak]# cat /etc/glance/glance-registry.conf
[DEFAULT]
[database]
connection = mysql://glance:waftest@controller/glance
[keystone_authtoken]
auth_uri = "http://controller:5000/v2.0/"
auth_host = controller
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = glance
admin_password = waftest
[paste_deploy]
flavor = keystone
[root@control openstack_bak]# glance image-create --name "cirros-0.3.2-x86_64" --disk-format qcow2 --container-format bare --is-public True --progress < cirros-0.3.2-x86_64-disk.img
[=============================>] 100%
Request returned failure status.
HTTPInternalServerError (HTTP 500)
[root@control openstack_bak]#
日志如下:
/var/log/glance/api.log
2014-12-24 01:29:48.334 4968 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): controller
2014-12-24 01:29:48.528 4968 INFO glance.registry.client.v1.client [373d6a84-1fc1-46dd-a7a2-a3a31d9ec041 25d9fe78eccf46fa876c59bc6df7f7ae 6298af29bcf43489a051975b36df694 - - -] Registry client request POST /images raised ServerError
2014-12-24 01:29:48.530 4968 INFO glance.wsgi.server [373d6a84-1fc1-46dd-a7a2-a3a31d9ec041 25d9fe78eccf46fa876c59bc6df7f7ae 6298a6f29bcf43489a01975b36df694 - - -] Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/eventlet/wsgi.py", line 389, in handle_one_response
result = self.application(self.environ, start_response)
File "/usr/lib/python2.6/site-packages/webob/dec.py", line 130, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/python2.6/site-packages/webob/dec.py", line 195, in call_func
return self.func(req, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/glance/common/wsgi.py", line 378, in __call__
response = req.get_response(self.application)
File "/usr/lib/python2.6/site-packages/webob/request.py", line 1296, in send
application, catch_exc_info=False)
File "/usr/lib/python2.6/site-packages/webob/request.py", line 1260, in call_application
app_iter = application(self.environ, start_response)
File "/usr/lib/python2.6/site-packages/keystoneclient/middleware/auth_token.py", line 679, in __call__
return self.app(env, start_response)
File "/usr/lib/python2.6/site-packages/webob/dec.py", line 130, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/python2.6/site-packages/webob/dec.py", line 195, in call_func
return self.func(req, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/glance/common/wsgi.py", line 378, in __call__
response = req.get_response(self.application)
File "/usr/lib/python2.6/site-packages/webob/request.py", line 1296, in send
application, catch_exc_info=False)
File "/usr/lib/python2.6/site-packages/webob/request.py", line 1260, in call_application
app_iter = application(self.environ, start_response)
File "/usr/lib/python2.6/site-packages/paste/urlmap.py", line 203, in __call__
return app(environ, start_response)
File "/usr/lib/python2.6/site-packages/webob/dec.py", line 144, in __call__
return resp(environ, start_response)
File "/usr/lib/python2.6/site-packages/routes/middleware.py", line 131, in __call__
response = self.app(environ, start_response)
File "/usr/lib/python2.6/site-packages/webob/dec.py", line 144, in __call__
return resp(environ, start_response)
File "/usr/lib/python2.6/site-packages/webob/dec.py", line 130, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/python2.6/site-packages/webob/dec.py", line 195, in call_func
return self.func(req, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/glance/common/wsgi.py", line 644, in __call__
request, **action_args)
File "/usr/lib/python2.6/site-packages/glance/common/wsgi.py", line 668, in dispatch
return method(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/glance/common/utils.py", line 436, in wrapped
return func(self, req, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/glance/api/v1/images.py", line 794, in create
image_meta = self._reserve(req, image_meta)
File "/usr/lib/python2.6/site-packages/glance/api/v1/images.py", line 523, in _reserve
image_meta = registry.add_image_metadata(req.context, image_meta)
File "/usr/lib/python2.6/site-packages/glance/registry/client/v1/api.py", line 161, in add_image_metadata
return c.add_image(image_meta)
File "/usr/lib/python2.6/site-packages/glance/registry/client/v1/client.py", line 163, in add_image
res = self.do_request("POST", "/images", body=body, headers=headers)
File "/usr/lib/python2.6/site-packages/glance/registry/client/v1/client.py", line 107, in do_request
**kwargs)
File "/usr/lib/python2.6/site-packages/glance/common/client.py", line 66, in wrapped
return func(self, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/glance/common/client.py", line 386, in do_request
headers=copy.deepcopy(headers))
File "/usr/lib/python2.6/site-packages/glance/common/client.py", line 83, in wrapped
return func(self, method, url, body, headers)
File "/usr/lib/python2.6/site-packages/glance/common/client.py", line 542, in _do_request
raise exception.ServerError()
ServerError: The request returned 500 Internal Server Error.
2014-12-24 01:29:48.579 4968 INFO glance.wsgi.server [373d6a84-1fc1-46dd-a7a2-a3a31d9ec041 25d9fe78eccf46fa876c59bc6df7f7ae 6298a6f29bcf43489a01975b36df694 - - -] 192.168.25.7 - - [24/Dec/2014 01:29:48] "POST /v1/images HTTP/1.1" 500 139 0.247404
/var/log/glance/registry.log
2014-12-24 08:53:22.800 4994 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): controller
2014-12-24 08:53:22.989 4994 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): controller
2014-12-24 08:53:23.082 4994 ERROR glance.openstack.common.db.sqlalchemy.session [7a908147-fc35-4e1e-9962-9eb37e8a461a 25d9fe78eccf46fa876c59bc6df7f7ae 6298a6f29bcf43489a051975b36df694 - - -] DB exception wrapped.
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session Traceback (most recent call last):
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session File "/usr/lib/python2.6/site-packages/glance/openstack/common/db/sqlalchemy/session.py", line 439, in _wrap
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session return f(self, *args, **kwargs)
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session File "/usr/lib/python2.6/site-packages/glance/openstack/common/db/sqlalchemy/session.py", line 705, in flush
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session return super(Session, self).flush(*args, **kwargs)
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session File "/usr/lib64/python2.6/site-packages/sqlalchemy/orm/session.py", line 1818, in flush
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session self._flush(objects)
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session File "/usr/lib64/python2.6/site-packages/sqlalchemy/orm/session.py", line 1936, in _flush
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session transaction.rollback(_capture_exception=True)
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session File "/usr/lib64/python2.6/site-packages/sqlalchemy/util/langhelpers.py", line 58, in __exit__
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session compat.reraise(exc_type, exc_value, exc_tb)
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session File "/usr/lib64/python2.6/site-packages/sqlalchemy/orm/session.py", line 1900, in _flush
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session flush_context.execute()
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session File "/usr/lib64/python2.6/site-packages/sqlalchemy/orm/unitofwork.py", line 372, in execute
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session rec.execute(self)
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session File "/usr/lib64/python2.6/site-packages/sqlalchemy/orm/unitofwork.py", line 525, in execute
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session uow
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session File "/usr/lib64/python2.6/site-packages/sqlalchemy/orm/persistence.py", line 64, in save_obj
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session table, insert)
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session File "/usr/lib64/python2.6/site-packages/sqlalchemy/orm/persistence.py", line 569, in _emit_insert_statements
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session execute(statement, params)
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session File "/usr/lib64/python2.6/site-packages/sqlalchemy/engine/base.py", line 662, in execute
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session params)
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session File "/usr/lib64/python2.6/site-packages/sqlalchemy/engine/base.py", line 761, in _execute_clauseelement
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session compiled_sql, distilled_params
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session File "/usr/lib64/python2.6/site-packages/sqlalchemy/engine/base.py", line 874, in _execute_context
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session context)
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session File "/usr/lib64/python2.6/site-packages/sqlalchemy/engine/base.py", line 1024, in _handle_dbapi_exception
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session exc_info
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session File "/usr/lib64/python2.6/site-packages/sqlalchemy/util/compat.py", line 196, in raise_from_cause
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session reraise(type(exception), exception, tb=exc_tb)
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session File "/usr/lib64/python2.6/site-packages/sqlalchemy/engine/base.py", line 867, in _execute_context
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session context)
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session File "/usr/lib64/python2.6/site-packages/sqlalchemy/engine/default.py", line 324, in do_execute
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session cursor.execute(statement, parameters)
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session File "/usr/lib64/python2.6/site-packages/MySQLdb/cursors.py", line 173, in execute
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session self.errorhandler(self, exc, value)
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session raise errorclass, errorvalue
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session ProgrammingError: (ProgrammingError) (1146, "Table 'glance.images' doesn't exist") '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 (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)' (datetime.datetime(2014, 12, 24, 0, 53, 23, 82285), datetime.datetime(2014, 12, 24, 0, 53, 23, 82294), None, 0, '5a5f4e8d-1553-4c04-a03b-34b27a005fcd', 'cirros-0.3.2-x86_64', 'qcow2', 'bare', 13167616, None, 'queued', 1, None, 0, 0, '6298a6f29bcf43489a051975b36df694', 0)
2014-12-24 08:53:23.082 4994 TRACE glance.openstack.common.db.sqlalchemy.session
2014-12-24 08:53:23.084 4994 ERROR glance.registry.api.v1.images [7a908147-fc35-4e1e-9962-9eb37e8a461a 25d9fe78eccf46fa876c59bc6df7f7ae 6298a6f29bcf43489a051975b36df694 - - -] Unable to create image None
2014-12-24 08:53:23.084 4994 TRACE glance.registry.api.v1.images Traceback (most recent call last):
2014-12-24 08:53:23.084 4994 TRACE glance.registry.api.v1.images File "/usr/lib/python2.6/site-packages/glance/registry/api/v1/images.py", line 403, in create
2014-12-24 08:53:23.084 4994 TRACE glance.registry.api.v1.images image_data = self.db_api.image_create(req.context, image_data)
2014-12-24 08:53:23.084 4994 TRACE glance.registry.api.v1.images File "/usr/lib/python2.6/site-packages/glance/db/sqlalchemy/api.py", line 96, in image_create
2014-12-24 08:53:23.084 4994 TRACE glance.registry.api.v1.images return _image_update(context, values, None, purge_props=False)
2014-12-24 08:53:23.084 4994 TRACE glance.registry.api.v1.images File "/usr/lib/python2.6/site-packages/glance/db/sqlalchemy/api.py", line 700, in _image_update
2014-12-24 08:53:23.084 4994 TRACE glance.registry.api.v1.images image_ref.save(session=session)
2014-12-24 08:53:23.084 4994 TRACE glance.registry.api.v1.images File "/usr/lib/python2.6/site-packages/glance/db/sqlalchemy/models.py", line 77, in save
2014-12-24 08:53:23.084 4994 TRACE glance.registry.api.v1.images super(GlanceBase, self).save(session or db_api.get_session())
2014-12-24 08:53:23.084 4994 TRACE glance.registry.api.v1.images File "/usr/lib/python2.6/site-packages/glance/openstack/common/db/sqlalchemy/models.py", line 49, in save
2014-12-24 08:53:23.084 4994 TRACE glance.registry.api.v1.images session.flush()
2014-12-24 08:53:23.084 4994 TRACE glance.registry.api.v1.images File "/usr/lib/python2.6/site-packages/glance/openstack/common/db/sqlalchemy/session.py", line 461, in _wrap
2014-12-24 08:53:23.084 4994 TRACE glance.registry.api.v1.images raise exception.DBError(e)
2014-12-24 08:53:23.084 4994 TRACE glance.registry.api.v1.images DBError: (ProgrammingError) (1146, "Table 'glance.images' doesn't exist") '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 (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)' (datetime.datetime(2014, 12, 24, 0, 53, 23, 82285), datetime.datetime(2014, 12, 24, 0, 53, 23, 82294), None, 0, '5a5f4e8d-1553-4c04-a03b-34b27a005fcd', 'cirros-0.3.2-x86_64', 'qcow2', 'bare', 13167616, None, 'queued', 1, None, 0, 0, '6298a6f29bcf43489a051975b36df694', 0)
2014-12-24 08:53:23.084 4994 TRACE glance.registry.api.v1.images
2014-12-24 08:53:23.085 4994 INFO glance.wsgi.server [7a908147-fc35-4e1e-9962-9eb37e8a461a 25d9fe78eccf46fa876c59bc6df7f7ae 6298a6f29bcf43489a051975b36df694 - - -] Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/eventlet/wsgi.py", line 389, in handle_one_response
result = self.application(self.environ, start_response)
File "/usr/lib/python2.6/site-packages/keystoneclient/middleware/auth_token.py", line 679, in __call__
return self.app(env, start_response)
File "/usr/lib/python2.6/site-packages/webob/dec.py", line 130, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/python2.6/site-packages/webob/dec.py", line 195, in call_func
return self.func(req, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/glance/common/wsgi.py", line 378, in __call__
response = req.get_response(self.application)
File "/usr/lib/python2.6/site-packages/webob/request.py", line 1296, in send
application, catch_exc_info=False)
File "/usr/lib/python2.6/site-packages/webob/request.py", line 1260, in call_application
app_iter = application(self.environ, start_response)
File "/usr/lib/python2.6/site-packages/webob/dec.py", line 144, in __call__
return resp(environ, start_response)
File "/usr/lib/python2.6/site-packages/routes/middleware.py", line 131, in __call__
response = self.app(environ, start_response)
File "/usr/lib/python2.6/site-packages/webob/dec.py", line 144, in __call__
return resp(environ, start_response)
File "/usr/lib/python2.6/site-packages/webob/dec.py", line 130, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/python2.6/site-packages/webob/dec.py", line 195, in call_func
return self.func(req, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/glance/common/wsgi.py", line 644, in __call__
request, **action_args)
File "/usr/lib/python2.6/site-packages/glance/common/wsgi.py", line 668, in dispatch
return method(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/glance/common/utils.py", line 436, in wrapped
return func(self, req, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/glance/registry/api/v1/images.py", line 403, in create
image_data = self.db_api.image_create(req.context, image_data)
File "/usr/lib/python2.6/site-packages/glance/db/sqlalchemy/api.py", line 96, in image_create
return _image_update(context, values, None, purge_props=False)
File "/usr/lib/python2.6/site-packages/glance/db/sqlalchemy/api.py", line 700, in _image_update
image_ref.save(session=session)
File "/usr/lib/python2.6/site-packages/glance/db/sqlalchemy/models.py", line 77, in save
super(GlanceBase, self).save(session or db_api.get_session())
File "/usr/lib/python2.6/site-packages/glance/openstack/common/db/sqlalchemy/models.py", line 49, in save
session.flush()
File "/usr/lib/python2.6/site-packages/glance/openstack/common/db/sqlalchemy/session.py", line 461, in _wrap
raise exception.DBError(e)
DBError: (ProgrammingError) (1146, "Table 'glance.images' doesn't exist") '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 (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)' (datetime.datetime(2014, 12, 24, 0, 53, 23, 82285), datetime.datetime(2014, 12, 24, 0, 53, 23, 82294), None, 0, '5a5f4e8d-1553-4c04-a03b-34b27a005fcd', 'cirros-0.3.2-x86_64', 'qcow2', 'bare', 13167616, None, 'queued', 1, None, 0, 0, '6298a6f29bcf43489a051975b36df694', 0)
2014-12-24 08:53:23.088 4994 INFO glance.wsgi.server [7a908147-fc35-4e1e-9962-9eb37e8a461a 25d9fe78eccf46fa876c59bc6df7f7ae 6298a6f29bcf43489a051975b36df694 - - -] 127.0.0.1 - - [24/Dec/2014 08:53:23] "POST /images HTTP/1.1" 500 139 0.289534
|