分享

上传大一点的镜像就失败

songyi1999 发表于 2016-9-2 08:23:44 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 3 12966
环境是fuel MirantisOpenStack-9.0, 物理机安装控制节点,
root@node-5:~# df -h
Filesystem                      Size  Used Avail Use% Mounted on
udev                            7.9G   16K  7.9G   1% /dev
tmpfs                           1.6G  1.2M  1.6G   1% /run
/dev/dm-4                        50G   21G   27G  44% /
none                            4.0K     0  4.0K   0% /sys/fs/cgroup
none                            5.0M     0  5.0M   0% /run/lock
none                            7.9G   60M  7.8G   1% /run/shm
none                            100M     0  100M   0% /run/user
/dev/sda3                       196M   59M  128M  32% /boot
/dev/mapper/logs-log            9.8G  2.2G  7.1G  24% /var/log
/dev/mapper/image-glance         87G  6.3G   80G   8% /var/lib/glance
/dev/mapper/mysql-root           20G  2.0G   17G  11% /var/lib/mysql
/dev/mapper/horizon-horizontmp   11G   33M   11G   1% /var/lib/horizon
上传测试用的cirros正常.
openstack image create "test3" --file cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare --public --debug   >ok.log 2>&1 &
可是上传大点的镜像就会失败,重装了好多遍解决不了,求大家帮忙看看.

result.zip (7.92 KB, 下载次数: 2)

已有(3)人评论

跳转到指定楼层
einhep 发表于 2016-9-2 10:47:14
原因很多,楼主可以一一排查

首先这个地址,应该不正确
HTTP/1.1 201 Created
Content-Length: 548
Connection: close
Location: http://172.16.0.4:9292/v2/images ... a-bac4-939cfdeb386c
Date: Fri, 02 Sep 2016 00:02:29 GMT
Content-Type: application/json; charset=UTF-8
X-Openstack-Request-Id: req-4c40187c-4b37-4346-b2ab-368755b180ac

{"status": "queued", "name": "win7", "tags": [], "container_format": "bare", "created_at": "2016-09-02T00:02:29Z", "size": null, "disk_format": "qcow2", "updated_at": "2016-09-02T00:02:29Z", "visibility": "public", "self": "/v2/images/1ad63b73-eee6-40fa-bac4-939cfdeb386c", "min_disk": 0, "protected": false, "id": "1ad63b73-eee6-40fa-bac4-939cfdeb386c", "file": "/v2/images/1ad63b73-eee6-40fa-bac4-939cfdeb386c/file", "checksum": null, "owner": "000d7ac3a388452bab4abb7e01dfdf54", "virtual_size": null, "min_ram": 0, "schema": "/v2/schemas/image"}

curl -g -i -X PUT -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'User-Agent: python-glanceclient' -H 'Connection: keep-alive' -H 'X-Auth-Token: {SHA1}74af232f8bf6e3533ed241497f78e4e67c221626' -H 'Content-Type: application/octet-stream' http://172.16.0.4:9292/v2/images ... 4-939cfdeb386c/file
Resetting dropped connection: 172.16.0.4
curl -g -i -X DELETE -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'User-Agent: python-glanceclient' -H 'Connection: keep-alive' -H 'X-Auth-Token: {SHA1}74af232f8bf6e3533ed241497f78e4e67c221626' -H 'Content-Type: application/octet-stream' http://172.16.0.4:9292/v2/images ... a-bac4-939cfdeb386c
Starting new HTTP connection (2): 172.16.0.4
"DELETE /v2/images/1ad63b73-eee6-40fa-bac4-939cfdeb386c HTTP/1.1" 204 0

HTTP/1.1 204 No Content
Date: Fri, 02 Sep 2016 00:02:57 GMT
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: 0
X-Openstack-Request-Id: req-d498454b-7508-4f0c-a1cf-2f37d996e7d4



Error finding address for http://172.16.0.4:9292/v2/images ... -939cfdeb386c/file: [Errno 32] Broken pipe
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 374, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/openstackclient/common/command.py", line 38, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/cliff/display.py", line 92, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/lib/python2.7/dist-packages/openstackclient/image/v2/image.py", line 346, in take_action
    raise e  # now, throw the upload exception again
CommunicationError: Error finding address for http://172.16.0.4:9292/v2/images ... -939cfdeb386c/file: [Errno 32] Broken pipe
clean_up CreateImage: Error finding address for http://172.16.0.4:9292/v2/images ... -939cfdeb386c/file: [Errno 32] Broken pipe



Error finding address for http://172.16.0.4:9292/v2/images ... a-bac4-939cfdeb386c/file: [Errno 32] Broken pipe

在http后面为何还有/file:

上面首先要解决这个问题。

然后,楼主还可以尝试上传第一次能成功的镜像,看是否成功。
1.如果成功说明是资源不足了,如磁盘空间等。
2.同时可能第二个问题,镜像有问题。
还可以换一个可靠的镜像







回复

使用道具 举报

starrycheng 发表于 2016-9-5 16:44:35
openstack应该有个设置,是对上传镜像大小的设置。

回复

使用道具 举报

lklkxcxc 发表于 2017-10-9 18:55:02
starrycheng 发表于 2016-9-5 16:44
openstack应该有个设置,是对上传镜像大小的设置。

我也遇到这个情况,上传小的镜像没有问题。已经设置了镜像大小限制,还是出现这个问题。
回复

使用道具 举报

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

本版积分规则

关闭

推荐上一条 /2 下一条