系统找不到liberasurecode_backend_available问题

来源:互联网 发布:心动网络工资 编辑:程序博客网 时间:2024/06/06 17:00
MakeItPossible

转载自:https://caden16.github.io/%E5%AF%B9%E8%B1%A1%E5%AD%98%E5%82%A8/ubuntu16.04%E6%90%AD%E5%BB%BAopenstack-swift%E5%8D%95%E6%9C%BA%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/

本人仅用于收藏


ubuntu16.04搭建openstack-swift单机开发环境

使用虚拟机进行远程调试电脑太卡,用着不爽,所以搭建单机板环境,按照SAIO搭建,在Ubuntu14.04上搭建没有啥问题,但在Ubuntu16.04上会出现问题,记录一下。

出现问题1

1
2
3
4
5
6
7
8
9
10
11
12
Traceback (most recent call last):
File "/usr/local/bin/swift-object-server", line 6, in <module>
exec(compile(open(__file__).read(), __file__, 'exec'))
File "/home/ubuntu/swift/bin/swift-object-server", line 19, in <module>
from swift.common.wsgi import run_wsgi
File "/home/ubuntu/swift/swift/common/wsgi.py", line 41, in <module>
from swift.common.storage_policy import BindPortsCache
File "/home/ubuntu/swift/swift/common/storage_policy.py", line 25, in <module>
from pyeclib.ec_iface import ECDriver, ECDriverError, VALID_EC_TYPES
File "/usr/local/lib/python2.7/dist-packages/pyeclib/ec_iface.py", line 29, in <module>
from pyeclib_c import check_backend_available
ImportError: /usr/local/lib/python2.7/dist-packages/pyeclib_c.so: undefined symbol: liberasurecode_backend_available

系统找不到liberasurecode_backend_available。

解决方法

参考openstack-swift bug反馈,得到解决方法:
根据Alex Usov 的回答:
Finally got it working. Had to compile liberasurecode from https://github.com/openstack/liberasurecode.git (https://github.com/openstack/liberasu…), add line /usr/local/lib to /etc/ld.so.conf, run ldconfig, and restart openstack-swift-proxy.

具体操作:

1
2
3
4
5
6
7
$ git clone https://github.com/openstack/liberasurecode.git
$ cd liberasurecode
$ ./autogen.sh
$ ./configure
$ make
$ make test
$ sudo make install

在 /etc/ld.so.conf中添加一行:/usr/local/lib
运行 ldconfig

创建container失败

错误提示: 404
Container PUT failed: http://127.0.0.1:8080/v1/AUTH_test/test 404 Not Found [first 60 chars of response]

Not Found

The resource could not be found.

解决方法

参考unable to create containers
错误出现原因: 删除了相关存储文件夹,即/mnt/sdb1 或 /srv 中相关文件夹,按照SAIO - Swift All In One重新搭建环境即可

502 Server dropped connection

发起请求时出现502错误:

1
2
$ swift stat
Auth GET failed: http://127.0.0.1:8080/auth/v1.0 502 Server dropped connection [first 60 chars of response] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//E

解决方法:

把代理关掉

linux文件存储机制
数据结构
原创粉丝点击