在Xenserver上安装Devstack会触发urllib3.connectionpool警告,然后是409 Conflict:无法上传到未排队的图像

时间:2014-10-02 23:56:06

标签: xen devstack

我尝试执行的项目涉及将devstack安装到Xenserver 6.5上。这看起来非常简单, 至少如https://github.com/openstack-dev/devstack/blob/master/tools/xen/README.md所述。但是我遇到了一些错误。大多数我已经能够通过各种论坛帖子修复,但这个特殊的问题已经避开了答案。

我的配置是安装在服务器上的XenServer 6.5,并在主机上下载了最新版本的devstack。按照README中的指导,我触发./install_os_domU.sh,它会创建将运行devstack的DevStackOSDomU vm(在这种情况下,IP:192.168.2.230)。但是,当在DevStackOSDomU上运行stack.sh(作为run.sh的一部分)时,会发生以下错误并关闭安装:

+ [[ x86_64 == \p\p\c\6\4 ]]
+ '[' '' = bare ']'
+ local kernel_id= ramdisk_id=
+ '[' -n /opt/stack/devstack/files/images/cirros-0.3.2-x86_64-uec/cirros-0.3.2-x86_64-vmlinuz ']'
++ openstack --os-token b6269cdf2e154d0c94d130db522da200 --os-url http://192.168.2.230:9292 image create cirros-0.3.2-x86_64-uec-kernel --public --container-forma$
++ grep ' id '
++ get_field 2
++ local data field
++ read data
WARNING: urllib3.connectionpool HttpConnectionPool is full, discarding connection: 192.168.2.230
ERROR: openstack <html>
  <head>
  <title>409 Conflict</title>
 </head>
 <body>
  <h1>409 Conflict</h1>
  There was a conflict when trying to complete your request.<br /><br />
  Cannot upload to an unqueued image

</body>
</html> (HTTP 409)
+ kernel_id=
+ '[' -n /opt/stack/devstack/files/images/cirros-0.3.2-x86_64-uec/cirros-0.3.2-x86_64-initrd ']'
++ openstack --os-token b6269cdf2e154d0c94d130db522da200 --os-url http://192.168.2.230:9292 image create cirros-0.3.2-x86_64-uec-ramdisk --public --container-form$
++ grep ' id '
++ get_field 2
++ local data field
++ read data
WARNING: urllib3.connectionpool HttpConnectionPool is full, discarding connection: 192.168.2.230
ERROR: openstack <html>
 <head>
 <title>409 Conflict</title>
  </head>
 <body>
  <h1>409 Conflict</h1>
  There was a conflict when trying to complete your request.<br /><br />
Cannot upload to an unqueued image

 </body>
</html> (HTTP 409)
+ ramdisk_id=
+ openstack --os-token b6269cdf2e154d0c94d130db522da200 --os-url http://192.168.2.230:9292 image create cirros-0.3.2-x86_64-uec --public --container-format ami --$
WARNING: urllib3.connectionpool HttpConnectionPool is full, discarding connection: 192.168.2.230
ERROR: openstack <html>
 <head>
   <title>409 Conflict</title>
  </head>
 <body>
  <h1>409 Conflict</h1>
  There was a conflict when trying to complete your request.<br /><br />
  Cannot upload to an unqueued image

  </body>
 </html> (HTTP 409)
 + exit_trap
 + local r=1
++ jobs -p
+ jobs=
+ [[ -n '' ]]
+ kill_spinner
+ '[' '!' -z '' ']'
+ [[ 1 -ne 0 ]]
+ echo 'Error on exit'
 Error on exit
+ [[ -z /opt/stack/logs ]]
+ /opt/stack/devstack/tools/worlddump.py -d /opt/stack/logs
+ exit 1

如您所见,错误重复三次,然后出错。 Devstack最终没有安装,无法运行。我似乎无法理解为什么 HttpConnectionPool将从进程的日志中填满,这似乎不是在Xenserver上安装devstack时的常见错误。 我想知道警告是否与错误有关。有没有人遇到这个问题,或者了解解决它的潜在方法?

感谢您的时间。

1 个答案:

答案 0 :(得分:1)

我相信我刚刚解决了这个问题。显然,stack.sh脚本多次遍历我在localrc中设置的IMAGE_URLS变量的最后一个元素。当我删除该列表中的逗号,并将stack.sh更改为只读取空格作为列表的元素分隔符(默认情况下),脚本完成后没有进一步的错误。

举例说明:

(在localrc

IMAGE_URLS="\
https://github.com/downloads/citrix-openstack/warehouse/cirros-0.3.0-x86_64-disk.vhd.tgz,\
http://download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-uec.tar.gz" 

(来自devstack/tools/xen/readme

成了

IMAGE_URLS="https://github.com/downloads/citrix-openstack/warehouse/cirros-0.3.0-x86_64-disk.vhd.tgz http://download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-uec.tar.gz"

(并在stack.sh

for image_url in ${IMAGE_URLS//,/ }; do

成了

for image_url in ${IMAGE_URLS}; do