bug fix: openstack can not run swift for pyeclib and liberasurecode do not match

最近在使用devstack 安装openstack nimble项目。 

nimble项目是一个专业的baremetal管理项目。 

安装过程中,遇到这个问题

/opt/stack/swift/bin/swift-object-server /etc/swift/object-server/1.conf -v
Traceback (most recent call last):
File "/opt/stack/swift/bin/swift-object-server", line 19, in <module>
from swift.common.wsgi import run_wsgi
File "/opt/stack/swift/swift/common/wsgi.py", line 41, in <module>
from swift.common.storage_policy import BindPortsCache
File "/opt/stack/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 get_liberasurecode_version

ImportError: liberasurecode.so.1: cannot open shared object file: No such file or directory
s-object failed to start

这实际上是因为 pyeclib 和 liberasurecode 不匹配导致的。

具体原因不清楚。 

pyeclib 是使用pip 安装的。而liberasurecode 是是用apt-get 安装的。

google 了一下,发现有人建议自己build 一下pyeclib

https://ask.openstack.org/en/question/93267/unable-to-start-swift-proxy-liberasurecode-missing-libshssso/

发现新的问题产生了。liberasurecode找不到libshss了。

libshss是一个liberasurecode的插件。并不是官方提供的。 

 

使用的操作系统是ubuntu:

$ uname -a
Linux shhfeng-OptiPlex-9020 3.16.0-33-generic #44~14.04.1-Ubuntu SMP Fri Mar 13 10:33:29 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

 

反起到而行之,重新 build liberasurecode

 $ git clone https://github.com/openstack/liberasurecode.git
 $ cd liberasurecode
 $ ./autogen.sh                                                                 
 $ ./configure                                                                  
 $ make                                                                         
 $ make test                                                                    
 $ sudo make install

 $ sudo ln -s /usr/local/lib/libnullcode.so.1.0.1 /usr/lib/x86_64-linux-gnu/libnullcode.so.1.0.1
 $ sudo ln -s /usr/local/lib/liberasurecode_rs_vand.so.1.0.1 /usr/lib/x86_64-linux-gnu/liberasurecode_rs_vand.so.1.0.1
 $ sudo ln -s /usr/local/lib/liberasurecode.so.1.1.0 /usr/lib/x86_64-linux-gnu/liberasurecode.so.1.1.0
 $ sudo ln -s /usr/local/lib/libXorcode.so.1.0.1 /usr/lib/x86_64-linux-gnu/libXorcode.so.1.0.1
 $ sudo ln -s /usr/local/lib/liberasurecode.so.1 /usr/lib/x86_64-linux-gnu/liberasurecode.so.1
 $ sudo ln -s /usr/local/lib/liberasurecode_rs_vand.so.1 /usr/lib/x86_64-linux-gnu/liberasurecode_rs_vand.so.1
 $ sudo ln -s /usr/local/lib/libnullcode.so.1 /usr/lib/x86_64-linux-gnu/libnullcode.so.1
 $ sudo ln -s /usr/local/lib/libXorcode.so.1 /usr/lib/x86_64-linux-gnu/libXorcode.so.1   
posted @ 2016-10-19 19:59  lvmxh  阅读(896)  评论(0编辑  收藏  举报