分享

Rocky版上传镜像错误

本帖最后由 lxhllf2005 于 2018-11-1 20:33 编辑

环境是:
CentOS-7.1.1503
OpenStack-Rocky






创建镜像:
[mw_shl_code=bash,true]glance image-create --name "cirros" --file /usr/local/src/cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare --visibility public --progress[/mw_shl_code]


返回:
[mw_shl_code=bash,true][=============================>] 100%
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | None                                 |
| container_format | bare                                 |
| created_at       | 2018-11-01T10:20:39Z                 |
| disk_format      | qcow2                                |
| id               | 590bd2b8-f158-410e-bc91-d6a41917a88d |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | cirros                               |
| os_hash_algo     | None                                 |
| os_hash_value    | None                                 |
| os_hidden        | False                                |
| owner            | 5f7a53c2e6ee4fd5b4d6bb4242d4e418     |
| protected        | False                                |
| size             | None                                 |
| status           | queued                               |
| tags             | []                                   |
| updated_at       | 2018-11-01T10:20:39Z                 |
| virtual_size     | Not available                        |
| visibility       | public                               |
+------------------+--------------------------------------+
500 Internal Server Error: The server has either erred or is incapable of performing the requested operation. (HTTP 500)[/mw_shl_code]

查询镜像:
openstack image list
+--------------------------------------+--------+--------+
| ID                                   | Name   | Status |
+--------------------------------------+--------+--------+
| 590bd2b8-f158-410e-bc91-d6a41917a88d | cirros | queued |
| b197f6a0-a895-4852-8d56-9ba877fa488d | cirros | queued |
+--------------------------------------+--------+--------+








这里是两个配置文件:
grep '^[a-Z]' /etc/glance/glance-api.conf
[mw_shl_code=bash,true]connection = mysql+pymysql://glance:glance@192.168.9.103/glance
stores = file,http
default_store = file
filesystem_store_datadir = /var/lib/glance/images
www_authenticate_uri = http://192.168.9.103:5000
auth_url = http://192.168.9.103:5000
memcached_servers = 192.168.9.103:11211
service_token_roles_required = true
auth_type = password
project_domain_name = Default
user_domain_name = Default
project_name = service
username = glance
password = glance
flavor = keystone[/mw_shl_code]


grep '^[a-Z]' /etc/glance/glance-registry.conf
[mw_shl_code=bash,true]connection = mysql+pymysql://glance:glance@192.168.9.103/glance
www_authenticate_uri = http://192.168.9.103:5000
auth_url = http://192.168.9.103:5000
memcached_servers = 192.168.9.103:11211
service_token_roles_required = true
auth_type = password
project_domain_name = Default
user_domain_name = Default
project_name = service
username = glance
password = glance
flavor = keystone[/mw_shl_code]


日志是:
/var/log/glance/api.log
[mw_shl_code=text,true]2018-11-01 17:20:25.260 7543 INFO eventlet.wsgi.server [req-2a24f61a-1b49-4b1b-8c2a-360cce9c76ef 3298658ac9ac44919510f99661463be6 5f7a53c2e6ee4fd5b4d6bb4242d4e418 - default default] 192.168.9.103 - - [01/Nov/2018 17:20:25] "GET /v2/images?limit=20&sort_key=name&sort_dir=asc HTTP/1.1" 200 919 2.388638
2018-11-01 17:20:25.649 7543 INFO eventlet.wsgi.server [req-96ea8abe-d125-4406-adfd-e4e52589ccb5 3298658ac9ac44919510f99661463be6 5f7a53c2e6ee4fd5b4d6bb4242d4e418 - default default] 192.168.9.103 - - [01/Nov/2018 17:20:25] "GET /v2/schemas/image HTTP/1.1" 200 4921 0.386097
2018-11-01 17:20:38.895 7543 INFO eventlet.wsgi.server [req-66db96d0-53a0-4dcd-8a8f-a7e900f1d5e1 3298658ac9ac44919510f99661463be6 5f7a53c2e6ee4fd5b4d6bb4242d4e418 - default default] 192.168.9.103 - - [01/Nov/2018 17:20:38] "GET /v2/schemas/image HTTP/1.1" 200 4921 0.265831
2018-11-01 17:20:39.107 7543 INFO eventlet.wsgi.server [req-04468d9b-da8f-49ee-ad98-ba101376eb05 3298658ac9ac44919510f99661463be6 5f7a53c2e6ee4fd5b4d6bb4242d4e418 - default default] 192.168.9.103 - - [01/Nov/2018 17:20:39] "GET /v2/schemas/image HTTP/1.1" 200 4921 0.209249
2018-11-01 17:20:39.439 7543 INFO eventlet.wsgi.server [req-b3ba5fc1-e621-41f5-b1b1-332dd107bc9a 3298658ac9ac44919510f99661463be6 5f7a53c2e6ee4fd5b4d6bb4242d4e418 - default default] 192.168.9.103 - - [01/Nov/2018 17:20:39] "POST /v2/images HTTP/1.1" 201 963 0.246326
2018-11-01 17:20:40.197 7543 ERROR glance.api.v2.image_data [req-9d9592cb-e878-4001-80d7-c52037d4b672 3298658ac9ac44919510f99661463be6 5f7a53c2e6ee4fd5b4d6bb4242d4e418 - default default] Failed to upload image data due to internal error
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi [req-9d9592cb-e878-4001-80d7-c52037d4b672 3298658ac9ac44919510f99661463be6 5f7a53c2e6ee4fd5b4d6bb4242d4e418 - default default] Caught error: 'module' object has no attribute 'algorithms_available': AttributeError: 'module' object has no attribute 'algorithms_available'
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi Traceback (most recent call last):
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi   File "/usr/lib/python2.7/site-packages/glance/common/wsgi.py", line 1274, in __call__
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi     request, **action_args)
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi   File "/usr/lib/python2.7/site-packages/glance/common/wsgi.py", line 1317, in dispatch
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi     return method(*args, **kwargs)
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi   File "/usr/lib/python2.7/site-packages/glance/common/utils.py", line 417, in wrapped
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi     return func(self, req, *args, **kwargs)
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi   File "/usr/lib/python2.7/site-packages/glance/api/v2/image_data.py", line 279, in upload
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi     self._restore(image_repo, image)
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi     self.force_reraise()
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi     six.reraise(self.type_, self.value, self.tb)
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi   File "/usr/lib/python2.7/site-packages/glance/api/v2/image_data.py", line 144, in upload
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi     image.set_data(data, size, backend=backend)
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi   File "/usr/lib/python2.7/site-packages/glance/domain/proxy.py", line 198, in set_data
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi     self.base.set_data(data, size, backend=backend)
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi   File "/usr/lib/python2.7/site-packages/glance/notifier.py", line 485, in set_data
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi     _send_notification(notify_error, 'image.upload', msg)
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi     self.force_reraise()
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi     six.reraise(self.type_, self.value, self.tb)
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi   File "/usr/lib/python2.7/site-packages/glance/notifier.py", line 432, in set_data
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi     self.repo.set_data(data, size, backend=backend)
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi   File "/usr/lib/python2.7/site-packages/glance/api/policy.py", line 193, in set_data
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi     return self.image.set_data(*args, **kwargs)
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi   File "/usr/lib/python2.7/site-packages/glance/quota/__init__.py", line 310, in set_data
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi     self.image.set_data(data, size=size, backend=backend)
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi   File "/usr/lib/python2.7/site-packages/glance/location.py", line 483, in set_data
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi     verifier=verifier)
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi   File "/usr/lib/python2.7/site-packages/glance_store/backend.py", line 541, in add_to_backend_with_multihash
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi     image_id, data, size, hashing_algo, store, context, verifier)
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi   File "/usr/lib/python2.7/site-packages/glance_store/backend.py", line 514, in store_add_to_backend_with_multihash
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi     if hashing_algo not in hashlib.algorithms_available:
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi AttributeError: 'module' object has no attribute 'algorithms_available'
2018-11-01 17:20:40.231 7543 ERROR glance.common.wsgi
2018-11-01 17:20:40.815 7543 INFO eventlet.wsgi.server [req-9d9592cb-e878-4001-80d7-c52037d4b672 3298658ac9ac44919510f99661463be6 5f7a53c2e6ee4fd5b4d6bb4242d4e418 - default default] 192.168.9.103 - - [01/Nov/2018 17:20:40] "PUT /v2/images/590bd2b8-f158-410e-bc91-d6a41917a88d/file HTTP/1.1" 500 454 1.356982
2018-11-01 17:20:46.099 7543 INFO eventlet.wsgi.server [req-5fa6c8e2-cf7f-4e54-9930-cdc2b875fd0f 3298658ac9ac44919510f99661463be6 5f7a53c2e6ee4fd5b4d6bb4242d4e418 - default default] 192.168.9.103 - - [01/Nov/2018 17:20:46] "GET /v2/images?limit=20&sort_key=name&sort_dir=asc HTTP/1.1" 200 1537 0.232332
2018-11-01 17:20:46.309 7543 INFO eventlet.wsgi.server [req-bf645321-cb06-4d16-b3b4-aa3b530e5110 3298658ac9ac44919510f99661463be6 5f7a53c2e6ee4fd5b4d6bb4242d4e418 - default default] 192.168.9.103 - - [01/Nov/2018 17:20:46] "GET /v2/schemas/image HTTP/1.1" 200 4921 0.206306
2018-11-01 17:21:01.401 7543 INFO eventlet.wsgi.server [req-09433372-a63e-4482-a42e-d8f1dca6f14a 3298658ac9ac44919510f99661463be6 5f7a53c2e6ee4fd5b4d6bb4242d4e418 - default default] 192.168.9.103 - - [01/Nov/2018 17:21:01] "GET /v2/images HTTP/1.1" 200 1501 0.241527
2018-11-01 17:21:01.673 7543 INFO eventlet.wsgi.server [req-25ca3113-ad3a-4495-a44b-4ba5da31e111 3298658ac9ac44919510f99661463be6 5f7a53c2e6ee4fd5b4d6bb4242d4e418 - default default] 192.168.9.103 - - [01/Nov/2018 17:21:01] "GET /v2/images?marker=b197f6a0-a895-4852-8d56-9ba877fa488d HTTP/1.1" 200 267 0.269164[/mw_shl_code]



/var/log/glance/registry.log
没有错误

已有(2)人评论

跳转到指定楼层
s060403072 发表于 2018-11-1 22:20:46
Failed to upload image data due to internal error
上传失败了,还需要详细看看,上传到服务器的日志。
回复

使用道具 举报

lxhllf2005 发表于 2018-11-2 10:22:19
s060403072 发表于 2018-11-1 22:20
Failed to upload image data due to internal error
上传失败了,还需要详细看看,上传到服务器的日志。 ...

那我再看看吧
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条