Nov 202013
 

采用豆瓣的pypi进行安装。

目前Devstack脚本已经支持Centos 6.5,那么你可以选择是在Ubuntu 12.04或者CentOS 6.5下来安装,步骤基本都是一样。就是一个git命令安装的区别.

最小化安装CentOS 6.5,我是关闭了selinux,不关闭应该也是可以的。,用root账号登陆。

对于CentOS6.5来说,devstack脚本会添加EPEL和RDO源。

2014年6月6日:文档更新,已经可以支持siwft和trove。不过安装过程,你可能会遇到cliff的bughttps://review.openstack.org/#/c/95916/,如果你遇到horizon无法启动,那么你就去 /etc/httpd/conf.d/ 里把那个配置文件后缀disable去掉就ok。还有就是安装过程,由于启用了heat,会下载一个heat的镜像,会导致安装过程很慢,可以考虑修改stackrc文件,不让下载。另外csdn的git源,也应该没法使用,因为项目太多没有同步了。

修复cilff的bug,估计上游很快就会merge

cd /opt/stack/cliff/
git fetch https://review.openstack.org/openstack/cliff refs/changes/16/95916/4 && git checkout FETCH_HEAD

准备环境

设置使用豆瓣pypi源

mkdir $HOME/.pip
vi $HOME/.pip/pip.conf

输入下面内容

[global]
index-url = http://pypi.douban.com/simple/

简单的做法

mkdir /root/.pip
cat >/root/.pip/pip.conf <<EOF
[global]
index-url = http://pypi.douban.com/simple/
EOF

安装git

yum -y install git

设置iptables

我发现目前版本,devstack不会去打开iptables的80端口,所以在运行脚本前,我设置一下iptables,编辑 /etc/sysconfig/iptables,添加一行,打开80端口。

准备Devstack

下载代码

cd /home
git clone https://github.com/openstack-dev/devstack.git

目前Devstack脚本已经不支持直接使用root身份运行,你需要创建stack用户运行

cd /home/devstack/tools/
./create-stack-user.sh

修改devstack目录权限,让stack用户可以运行

chown -R stack:stack /home/devstack

切换的stack用户下

su stack
cd /home/devstack

devstack运行时候,检测到操作系统是CentOS,会额外添加RDO和EPEL源,由于我的os已经配置好,我需要把添加的步骤注释掉,修改一下 stack.sh 脚本就可以。

进入devstack目录下,创建localrc 文件,默认devstack会创建一个stack-volumes,用文件来模拟,我修改成cinder-volumes。

你还需要修改你的host ip. 我的localrc

# Misc
HOST_IP=172.28.1.132
DATABASE_PASSWORD=password
ADMIN_PASSWORD=password
SERVICE_PASSWORD=password
SERVICE_TOKEN=password
RABBIT_PASSWORD=password


#change from github to csdn
#GIT_BASE=https://code.csdn.net


## vnc

#enable_service n-spice
#enable_service n-novnc
#enable_service n-xvnc


# Reclone each time
#RECLONE=yes
RECLONE=no

## For Keystone
KEYSTONE_TOKEN_FORMAT=PKI

## For Swift
SWIFT_REPLICAS=1
SWIFT_HASH=011688b44136573e209e

# Enable Logging
LOGFILE=/opt/stack/logs/stack.sh.log
VERBOSE=True
LOG_COLOR=True
SCREEN_LOGDIR=/opt/stack/logs

# Pre-requisite
ENABLED_SERVICES=rabbit,mysql,key

## If you want ZeroMQ instead of RabbitMQ (don't forget to un-declare 'rabbit' from the pre-requesite)
#ENABLED_SERVICES+=,-rabbit,-qpid,zeromq

## If you want Qpid instead of RabbitMQ (don't forget to un-declare 'rabbit' from the pre-requesite)
#ENABLED_SERVICES+=,-rabbit,-zeromq,qpid

# Horizon (Dashboard UI) - (always use the trunk)
ENABLED_SERVICES+=,horizon
HORIZON_REPO=https://github.com/openstack/horizon
HORIZON_BRANCH=master

# Nova - Compute Service
ENABLED_SERVICES+=,n-api,n-crt,n-obj,n-cpu,n-cond,n-sch

######vnc
ENABLED_SERVICES+=,n-novnc,n-xvnc


IMAGE_URLS+=",https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img"
#IMAGE_URLS+=",http://172.28.0.1/image/cirros-0.3.0-x86_64-disk.img"


# Nova Network - If you don't want to use Neutron and need a simple network setup (old good stuff!)
#ENABLED_SERVICES+=,n-net

## Nova Cells
ENABLED_SERVICES+=,n-cell

# Glance - Image Service
ENABLED_SERVICES+=,g-api,g-reg

# Swift - Object Storage
ENABLED_SERVICES+=,s-proxy,s-object,s-container,s-account

# Neutron - Networking Service
# If Neutron is not declared the old good nova-network will be used
ENABLED_SERVICES+=,q-svc,q-agt,q-dhcp,q-l3,q-meta,neutron

## Neutron - Load Balancing
ENABLED_SERVICES+=,q-lbaas

## Neutron - VPN as a Service
ENABLED_SERVICES+=,q-vpn

## Neutron - Firewall as a Service
ENABLED_SERVICES+=,q-fwaas

# VLAN configuration
#Q_PLUGIN=ml2
#ENABLE_TENANT_VLANS=True

# GRE tunnel configuration
Q_PLUGIN=ml2
ENABLE_TENANT_TUNNELS=True

# VXLAN tunnel configuration
#Q_PLUGIN=ml2
#Q_ML2_TENANT_NETWORK_TYPE=vxlan   

# Cinder - Block Device Service
VOLUME_GROUP="cinder-volumes"
ENABLED_SERVICES+=,cinder,c-api,c-vol,c-sch,c-bak

# Heat - Orchestration Service
ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-api-cw,h-eng
#IMAGE_URLS+=",http://fedorapeople.org/groups/heat/prebuilt-jeos-images/F17-x86_64-cfntools.qcow2"

# Ceilometer - Metering Service (metering + alarming)
ENABLED_SERVICES+=,ceilometer-acompute,ceilometer-acentral,ceilometer-collector,ceilometer-api
ENABLED_SERVICES+=,ceilometer-alarm-notify,ceilometer-alarm-eval

ENABLED_SERVICES+=,trove,tr-api,tr-tmgr,tr-cond


# Apache fronted for WSGI
APACHE_ENABLED_SERVICES+=keystone,swift
#APACHE_ENABLED_SERVICES+=keystone

 

运行Devstack

记住,我们是使用stack用户运行的。

cd /home/devstack
./stack.sh

默认Devstack创建 admin和demo两个用户,通过设置环境变量可以进行操作

admin

source openrc admin admin

demo

source openrc demo demo

 

附录

如果你希望用物理的卷代替文件模拟的volume。Devstack会检测是否存在一个stack-volumes 的卷,如果存在就使用,不存在就用文件模拟。

pvcreate /dev/sdc
vgcreate stack-volumes /dev/sdc

 

 

参考资料

http://devstack.org/guides/multinode-lab.html

http://devstack.org/localrc.html

http://www.sebastien-han.fr/blog/2013/08/08/devstack-in-1-minute/

http://www.sebastien-han.fr/blog/2013/08/16/best-localrc-for-devstack/

http://networkstatic.net/openstack-folsom-quantum-devstack-installation-tutorial/

http://wiki.openstack.org/QuantumDevstack

spices支持

http://packetpushers.net/openstack-quantum-network-implementation-in-linux/

重启服务

http://davanum.wordpress.com/2012/10/17/scripts-to-startstop-openstack-environment-built-using-devstack/

  63 Responses to “devstack安装和测试”

  1. 陈老师,需要帮助啊。devstack安装完后,可以创建虚拟机,但是一直无法ping通,用vnc进虚拟机看到其没有获取到IP地址,设置使用DHCP方式的,跟踪了虚拟机的日志,其DHClient一直在发DHCPDISCOVER消息,然后又跟踪了计算节点的日志,发先其有收到虚拟机的DHCPDISCOVER消息,并且回复了DHCPOffer消息,提供的IP也是正确的。就是不知道出了什么原因,导致DHCP过程无法继续进行,求助啊!!

  2. 陈老师,能介绍镜像openstack的源代码大概流程是怎样的?谢谢。

  3. 不好意思,陈老师,刚刚没说清楚,我是想问如果我想建立伺服镜像openstack源代码,大概流程是怎样的。刚接触git还不是很熟。谢谢。

  4. 您好,在使用devstack过程中出现如下错误:
    “2013-09-20 21:21:23 –2013-09-20 21:21:23– (try:20) https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img
    2013-09-20 21:22:26 Connecting to launchpad.net (launchpad.net)|91.189.89.222|:443… failed: Connection timed out.

    launchpad.net连不上。。。
    请问有没有其它链接可以使用?
    多谢

  5. 陈老师,您好。我用devstack在Virtual box 上的ubuntu12.04 64位安装好openstack后,创建的instance不能启动,提示错误:找不到有效主机。执行sudo kvm-ok,结果是INFO: Your CPU does not support KVM extensions;KVM acceleration can NOT be used。但我的cpu是intel 的 I3-2350M,官网查询的结果是支持VT-x的,而我在bios界面找不到开启VT-x的选项。我的笔记本是acer的,询问acer客服,他们说acer在大陆所有机子,都不支持intel的虚拟化技术。请问这个问题怎么解决?
    另外,如果用物理机器来搭建环境,对电脑的硬件配置的最低要求是什么?
    请陈老师指点,谢谢。。

    • 你在虚拟机里装linux,肯定是不支持KVM,这个时候,创建虚拟机就会用qemu来替代。你创建虚拟机失败,很可能是别的原因,你的virtualbox创建的虚拟机,内存太小导致的。

      • 呵呵,我放弃了用virtual box测试,改用您的《CentOS6.4 Openstack Havana 单网卡 All in One 安装》来安装,已经成功安装好了,在局域网的其他机子可以ping通和ssh上。非常感谢!!

  6. 陈老师您好,我按照这篇文章以及参考了CentOS单节点安装部分,已在ubuntu12.04上部署了havana,但我发现安装后默认的网桥并没有使用默认的10.215/16的网络而是使用了172.24.4.225/28的地址,这使我无法连接网桥。在interface里我并没有看到任何有关该桥接(br-ex)的信息,请教下我该怎样解决此问题。

  7. [ERROR] /home/devstack/lib/cinder:180 No suitable rootwrap found.

    在按照步骤进行安装的时候 出现了如上错误请问如何解决?
    我是在 centos6.5中安装的

  8. 陈老师,我按照你说的方法安装的时候,可能是公司网络代理的原因,报下面的错误,请问这个怎么规避?
    2014-01-16 00:53:17 + curl -O https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz
    2014-01-16 00:53:18 % Total % Received % Xferd Average Speed Time Time Time Current
    2014-01-16 00:53:18 Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 –:–:– 0:02:07 –:–:– 0curl: (7) Failed connect to pypi.python.org:443; Connection timed out
    2014-01-16 00:55:26 ++ failed
    2014-01-16 00:55:26 ++ local r=1
    2014-01-16 00:55:26 stack.sh failed: full log in /opt/stack/logs/stack.sh.log.2014-01-16-005254

  9. 你好陈老师,我用devstack在VMware(VM中安装了Ubuntu12.04)中安装openstack,一直没成功(但是在物理机上安装成功过,手动也成功过),devstack官网vm上安装的稳定可能我没读懂,他那个#cloud-config到底要怎么用啊?

  10. + local service
    + local failures
    + SCREEN_NAME=stack
    + SERVICE_DIR=/opt/stack/status
    + [[ ! -d /opt/stack/status/stack ]]
    ++ ls /opt/stack/status/stack/h-api-cfn.failure
    + failures=/opt/stack/status/stack/h-api-cfn.failure
    + for service in ‘$failures’
    ++ basename /opt/stack/status/stack/h-api-cfn.failure
    + service=h-api-cfn.failure
    + service=h-api-cfn
    + echo ‘Error: Service h-api-cfn is not running’
    Error: Service h-api-cfn is not running
    + ‘[‘ -n /opt/stack/status/stack/h-api-cfn.failure ‘]’
    + die 1164 ‘More details about the above errors can be found with screen, with ./rejoin-stack.sh’
    + local exitcode=0
    + set +o xtrace
    [Call Trace]
    ./stack.sh:1317:service_check
    /home/devstack/functions-common:1164:die
    [ERROR] /home/devstack/functions-common:1164 More details about the above errors can be found with screen, with ./rejoin-stack.sh

    你好。陈老师。安装到最后 出现这个BUG 。没有办法解决。请问会不会影响正常使用?

  11. 陈老师,我在ubuntu 13.10版本下使用devstack安装了icehouse版本的openstack,经过测试cinder和nova都正常,但是没有ceilometer的界面,请问是不是devstack的stackrc或者local.conf文件里面需要配置?

  12. 你好,我在centos6.5上面装的,每次都在Initialized empty Git repository in /opt/stack/cinder/.git/卡住了,我是按照你说的那样设置了git源。

  13. 陈老师,安装devstack过程中碰到的openstack.org被墙的问题。您是怎么解决的?

  14. 2014-10-30 07:02:15.522 | + openstack –os-token 6c9cc9d0c71c4da190d19ab12606a95e –os-url http://192.168.112.135:9292 image create F19-x86_64-cfntools –public –container-format=bare –disk-format qcow2
    2014-10-30 07:02:49.244 | ERROR: openstack
    2014-10-30 07:02:49.245 |
    2014-10-30 07:02:49.246 | 401 Unauthorized
    2014-10-30 07:02:49.246 |
    2014-10-30 07:02:49.246 |
    2014-10-30 07:02:49.246 | 401 Unauthorized
    2014-10-30 07:02:49.246 | This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.

    陈老师您好!我每次安装devstack都碰到这个401的问题。一直没有找到原因。

    • 你是不是网络下载镜像文件很久很久,然后下完脚本继续就报这个错了?如果是这样,再次执行stack.sh

  15. 陈老师您好!我用centos6.5—64位安装的devstack。也是报的401错误。

    2014-11-03 00:44:41.938 | ERROR: openstack
    2014-11-03 00:44:41.967 |
    2014-11-03 00:44:41.967 | 401 Unauthorized
    2014-11-03 00:44:41.968 |
    2014-11-03 00:44:41.968 |
    2014-11-03 00:44:41.968 | 401 Unauthorized
    2014-11-03 00:44:41.968 | This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.
    2014-11-03 00:44:41.968 |
    2014-11-03 00:44:41.968 |
    2014-11-03 00:44:41.968 | (HTTP 401)
    2014-11-03 00:44:42.167 | + exit_trap
    2014-11-03 00:44:42.222 | + local r=1
    2014-11-03 00:44:42.223 | ++ jobs -p
    2014-11-03 00:44:42.270 | + jobs=
    2014-11-03 00:44:42.270 | + [[ -n ” ]]
    2014-11-03 00:44:42.270 | + kill_spinner
    2014-11-03 00:44:42.270 | + ‘[‘ ‘!’ -z ” ‘]’
    2014-11-03 00:44:42.270 | + [[ 1 -ne 0 ]]
    2014-11-03 00:44:42.271 | + echo ‘Error on exit’
    2014-11-03 00:44:42.271 | Error on exit
    2014-11-03 00:44:42.271 | + [[ -z /opt/stack/logs ]]
    2014-11-03 00:44:42.271 | + /home/devstack/tools/worlddump.py -d /opt/stack/logs
    2014-11-03 00:44:43.201 | + exit 1

  16. 陈老师,您好,我用centos65安装时候遇到这个问题,很奇怪啊
    cp: cannot stat `/opt/stack/glance/etc/metadefs/*.json’: No such file or directory

  17. 陈老师,碰到这个问题,搜都搜不到一样的问题,
    ERROR:openstack namespace object has no attribute os_token,
    但是在上面已经设置过环境变量了,export OS_TOKEN=123
    请问你之前有遇到过这个问题吗

  18. 陈老师,我参照您的文档“devstack安装和测试”,用devstack在Centos6.5下安装openstack,报错如下:您帮忙排错一下,谢谢
    “[root@ops-server tools]# ./create-stack-user.sh
    /home/devstack/functions-common: line 66: conditional binary operator expected”

    functions-common的66行
    function isset {
    [[ -v “$1” ]]
    }

    • 我也有这个问题,不知道怎么解决

      • 是因为你们学习ops的时间比较晚,而devstack最老的分支应经是 kilo了(到16年5月9日)。你们 git下载下来的master分支由于不是当时陈老师的icehouse版本,而最少是kilo。kilo和及其以上的版本用了新的特性编写function-common。加入“-V”。
        解决办法就是 用centos7这个支持 “-v”新特性的shell。或者你想办法找到 devstack的 icehouse分支

  19. 沙克老师,能帮忙看看这是什么问题嘛,ubuntu15.04,运行devstack的stack.sh,报错
    2015-10-10 02:26:11.852 | Collecting testscenarios===0.5.0 (from -c /opt/stack/requirements/upper-constraints.txt (line 314))
    2015-10-10 02:26:12.025 | Exception:
    2015-10-10 02:26:12.026 | Traceback (most recent call last):
    2015-10-10 02:26:12.026 | File “/usr/local/lib/python2.7/dist-packages/pip/basecommand.py”, line 211, in main
    2015-10-10 02:26:12.026 | status = self.run(options, args)
    2015-10-10 02:26:12.026 | File “/usr/local/lib/python2.7/dist-packages/pip/commands/install.py”, line 305, in run
    2015-10-10 02:26:12.026 | wb.build(autobuilding=True)
    2015-10-10 02:26:12.026 | File “/usr/local/lib/python2.7/dist-packages/pip/wheel.py”, line 705, in build
    2015-10-10 02:26:12.026 | self.requirement_set.prepare_files(self.finder)
    2015-10-10 02:26:12.026 | File “/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py”, line 334, in prepare_files
    2015-10-10 02:26:12.026 | functools.partial(self._prepare_file, finder))
    2015-10-10 02:26:12.026 | File “/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py”, line 321, in _walk_req_to_install
    2015-10-10 02:26:12.026 | more_reqs = handler(req_to_install)
    2015-10-10 02:26:12.026 | File “/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py”, line 461, in _prepare_file
    2015-10-10 02:26:12.026 | req_to_install.populate_link(finder, self.upgrade)
    2015-10-10 02:26:12.026 | File “/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py”, line 250, in populate_link
    2015-10-10 02:26:12.026 | self.link = finder.find_requirement(self, upgrade)
    2015-10-10 02:26:12.027 | File “/usr/local/lib/python2.7/dist-packages/pip/index.py”, line 486, in find_requirement
    2015-10-10 02:26:12.027 | all_versions = self._find_all_versions(req.name)
    2015-10-10 02:26:12.027 | File “/usr/local/lib/python2.7/dist-packages/pip/index.py”, line 404, in _find_all_versions
    2015-10-10 02:26:12.027 | index_locations = self._get_index_urls_locations(project_name)
    2015-10-10 02:26:12.027 | File “/usr/local/lib/python2.7/dist-packages/pip/index.py”, line 378, in _get_index_urls_locations
    2015-10-10 02:26:12.027 | page = self._get_page(main_index_url)
    2015-10-10 02:26:12.027 | File “/usr/local/lib/python2.7/dist-packages/pip/index.py”, line 818, in _get_page
    2015-10-10 02:26:12.027 | return HTMLPage.get_page(link, session=self.session)
    2015-10-10 02:26:12.027 | File “/usr/local/lib/python2.7/dist-packages/pip/index.py”, line 928, in get_page
    2015-10-10 02:26:12.027 | “Cache-Control”: “max-age=600”,
    2015-10-10 02:26:12.027 | File “/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/sessions.py”, line 477, in get
    2015-10-10 02:26:12.027 | return self.request(‘GET’, url, **kwargs)
    2015-10-10 02:26:12.027 | File “/usr/local/lib/python2.7/dist-packages/pip/download.py”, line 373, in request
    2015-10-10 02:26:12.027 | return super(PipSession, self).request(method, url, *args, **kwargs)
    2015-10-10 02:26:12.027 | File “/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/sessions.py”, line 465, in request
    2015-10-10 02:26:12.027 | resp = self.send(prep, **send_kwargs)
    2015-10-10 02:26:12.027 | File “/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/sessions.py”, line 605, in send
    2015-10-10 02:26:12.027 | r.content
    2015-10-10 02:26:12.027 | File “/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/models.py”, line 750, in content
    2015-10-10 02:26:12.027 | self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()
    2015-10-10 02:26:12.027 | File “/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/models.py”, line 678, in generate
    2015-10-10 02:26:12.028 | raise ContentDecodingError(e)
    2015-10-10 02:26:12.028 | ContentDecodingError: (‘Received response with content-encoding: gzip, but failed to decode it.’, error(‘Error -3 while decompressing: incorrect header check’,))
    2015-10-10 02:26:12.291 | + exit_trap
    2015-10-10 02:26:12.292 | + local r=2
    2015-10-10 02:26:12.292 | ++ jobs -p
    2015-10-10 02:26:12.293 | + jobs=
    2015-10-10 02:26:12.293 | + [[ -n ” ]]
    2015-10-10 02:26:12.293 | + kill_spinner
    2015-10-10 02:26:12.293 | + ‘[‘ ‘!’ -z ” ‘]’
    2015-10-10 02:26:12.293 | + [[ 2 -ne 0 ]]
    2015-10-10 02:26:12.293 | + echo ‘Error on exit’
    2015-10-10 02:26:12.293 | Error on exit
    2015-10-10 02:26:12.293 | + [[ -z /opt/stack/logs ]]
    2015-10-10 02:26:12.293 | + /home/devstack/tools/worlddump.py -d /opt/stack/logs
    2015-10-10 02:26:12.545 | + exit 2

  20. 请问老师,安装DevStack遇到下面两个问题如何解决?先谢谢了~~
    controller:
    ERROR: full: InvocationError: /usr/bin/python -m virtualenv –python /usr/bin/python full (see /opt/stack/tempest/.tox/full/log/full-0.log)

    compute:
    OSError: Command /opt/stack/devstack/tmp-venv-I43x/bin/python -c “import sys, pip; sys…d\”] + sys.argv[1:]))” setuptools pip wheel failed with error code 2
    df: ‘/run/user/1000/gvfs’: Permission denied

    • 看样子是权限的问题。你检查一下你的步骤,我是没有碰到过。你确认是用stack用户安装吗

  21. 请问老师,安装的时候提示
    ImportError: Could not import settings ‘openstack_dashboard.settings’ (Is it on sys.path? Is there an import error in the settings file?): No module named angular_bootstrap
    这是什么情况,是否是因为pyhton-pip or pdr没有安装导致的?

  22. 陈老师,在ubantu14下执行stack.sh脚本的时候报错:

    modprobe: ERROR: ../libkmod/libkmod.c:507 kmod_lookup_alias_from_builtin_file() could not open builtin file ‘/lib/modules/2.6.32-042stab104.1/modules.builtin.bin’
    modprobe: FATAL: Module ebtables not found.
    The kernel doesn’t support the ebtables ‘filter’ table.
    modprobe: ERROR: ../libkmod/libkmod.c:507 kmod_lookup_alias_from_builtin_file() could not open builtin file ‘/lib/modules/2.6.32-042stab104.1/modules.builtin.bin’
    modprobe: FATAL: Module ebtables not found.
    The kernel doesn’t support the ebtables ‘nat’ table.
    modprobe: ERROR: ../libkmod/libkmod.c:507 kmod_lookup_alias_from_builtin_file() could not open builtin file ‘/lib/modules/2.6.32-042stab104.1/modules.builtin.bin’
    modprobe: FATAL: Module ebtables not found.
    The kernel doesn’t support the ebtables ‘broute’ table.

    貌似是内核版本不支持ebtables?我的内核版本是2.6,这种情况怎么处理…

    非常感谢!

  23. 陈老师,您好。
    我在使用devstack安装kilo版本的openstack时,遇到了两个问题。在网上查了很久,没有找到原因,也没有找到解决办法,看到这里气氛很好,想着来问一下。。
    安装环境为Ubuntu14.04.3。
    一个是在安装horizon时,
    2016-01-06 08:30:06.609 | + cd /opt/stack/horizon
    2016-01-06 08:30:06.609 | + ./run_tests.sh -N –compilemessages
    2016-01-06 08:30:06.821 | WARNING:root:No local_settings file found.
    2016-01-06 08:30:07.294 | Traceback (most recent call last):
    2016-01-06 08:30:07.294 | File “/opt/stack/horizon/manage.py”, line 23, in
    2016-01-06 08:30:07.294 | execute_from_command_line(sys.argv)
    2016-01-06 08:30:07.294 | File “/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py”, line 385, in execute_from_command_line
    2016-01-06 08:30:07.294 | utility.execute()
    2016-01-06 08:30:07.294 | File “/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py”, line 345, in execute
    2016-01-06 08:30:07.294 | settings.INSTALLED_APPS
    2016-01-06 08:30:07.294 | File “/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py”, line 46, in __getattr__
    2016-01-06 08:30:07.294 | self._setup(name)
    2016-01-06 08:30:07.295 | File “/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py”, line 42, in _setup
    2016-01-06 08:30:07.295 | self._wrapped = Settings(settings_module)
    2016-01-06 08:30:07.295 | File “/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py”, line 98, in __init__
    2016-01-06 08:30:07.295 | % (self.SETTINGS_MODULE, e)
    2016-01-06 08:30:07.295 | ImportError: Could not import settings ‘openstack_dashboard.settings’ (Is it on sys.path? Is there an import error in the settings file?): No module named i18n
    然后我屏蔽掉了localrc中的horizon功能,遇到了另一个问题
    2016-01-06 08:01:33.758 | + init_keystone
    2016-01-06 08:01:33.758 | + is_service_enabled ldap
    2016-01-06 08:01:33.761 | + return 1
    2016-01-06 08:01:33.761 | + recreate_database keystone
    2016-01-06 08:01:33.761 | + local db=keystone
    2016-01-06 08:01:33.762 | + recreate_database_mysql keystone
    2016-01-06 08:01:33.762 | + local db=keystone
    2016-01-06 08:01:33.762 | + mysql -uroot -padmin -h127.0.0.1 -e ‘DROP DATABASE IF EXISTS keystone;’
    2016-01-06 08:01:33.795 | + mysql -uroot -padmin -h127.0.0.1 -e ‘CREATE DATABASE keystone CHARACTER SET utf8;’
    2016-01-06 08:01:33.802 | + /usr/local/bin/keystone-manage db_sync
    2016-01-06 08:01:34.047 | Traceback (most recent call last):
    2016-01-06 08:01:34.047 | File “/usr/local/bin/keystone-manage”, line 4, in
    2016-01-06 08:01:34.048 | __import__(‘pkg_resources’).require(‘keystone==2015.1.3.dev14’)
    2016-01-06 08:01:34.048 | File “/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py”, line 3138, in
    2016-01-06 08:01:34.048 | @_call_aside
    2016-01-06 08:01:34.048 | File “/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py”, line 3124, in _call_aside
    2016-01-06 08:01:34.049 | f(*args, **kwargs)
    2016-01-06 08:01:34.049 | File “/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py”, line 3151, in _initialize_master_working_set
    2016-01-06 08:01:34.049 | working_set = WorkingSet._build_master()
    2016-01-06 08:01:34.049 | File “/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py”, line 663, in _build_master
    2016-01-06 08:01:34.049 | return cls._build_from_requirements(__requires__)
    2016-01-06 08:01:34.050 | File “/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py”, line 676, in _build_from_requirements
    2016-01-06 08:01:34.050 | dists = ws.resolve(reqs, Environment())
    2016-01-06 08:01:34.050 | File “/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py”, line 849, in resolve
    2016-01-06 08:01:34.050 | raise DistributionNotFound(req, requirers)
    2016-01-06 08:01:34.050 | pkg_resources.DistributionNotFound: The ‘pycadf=0.8.0’ distribution was not found and is required by keystone
    2016-01-06 08:01:34.059 | + exit_trap
    这是怎么一回事,能帮忙解答下吗?万分感谢。
    附上我用的localrc文件
    DATABASE_PASSWORD=admin
    ADMIN_PASSWORD=admin
    SERVICE_PASSWORD=admin
    SERVICE_TOKEN=admin
    RABBIT_PASSWORD=admin
    #vnc
    #enable_service n-spice
    #enable_service n-novnc
    #enable_service n-xvnc
    ## For Swift
    SWIFT_REPLICAS=1
    SWIFT_HASH=011688b44136573e209e
    # Enable Logging
    LOGFILE=/opt/stack/logs/devstack.log
    VERBOSE=True
    LOG_COLOR=True
    SCREEN_LOGDIR=/opt/stack/logs
    # Pre-requisite
    ENABLED_SERVICES=rabbit,mysql,key
    ENABLED_SERVICES+=,horizon
    ENABLED_SERVICES+=,n-api,n-crt,n-obj,n-cpu,n-cond,n-sch
    ENABLED_SERVICES+=,n-novnc,n-xvnc
    ENABLED_SERVICES+=,g-api,g-reg
    ENABLED_SERVICES+=,s-proxy,s-object,s-container,s-account
    ENABLED_SERVICES+=,q-svc,q-agt,q-dhcp,q-l3,q-meta,neutron
    ENABLED_SERVICES+=h-eng,h-api,h-api-cfn,h-api-cw
    Q_PLUGIN=ml2
    Q_ML2_TENANT_NETWORK_TYPE=vxlan
    VOLUME_GROUP=”cinder-volumes”
    ENABLED_SERVICES+=,cinder,c-api,c-vol,c-sch,c-bak
    APACHE_ENABLED_SERVICES+=keystone
    IMAGE_URLS+=”,http://cloud.fedoraproject.org/fedora-20.x86_64.qcow2

    GLANCE_BRANCH=stable/kilo
    KEYSTONE_BRANCH=stable/kilo
    NOVA_BRANCH=stable/kilo
    NEUTRON_BRANCH=stable/kilo
    HORIZON_BRANCH=stable/kilo
    CINDER_BRANCH=stable/kilo
    HEAT_BRANCH=stable/kilo
    SWIFT_BRANCH=stable/kilo
    REQUIREMENTS_BRANCH=stable/kilo

  24. 2016-03-10 17:20:56.844 | + ./stack.sh::L1004: bootstrap_keystone
    2016-03-10 17:20:56.844 | + /home/devstack/lib/keystone:bootstrap_keystone:L636: /usr/bin/keystone-manage bootstrap –bootstrap-password password
    2016-03-10 17:20:57.838 | usage: keystone-manage [db_sync|db_version|domain_config_upload|fernet_rotate|fernet_setup|mapping_purge|mapping_engine|pki_setup|saml_idp_metadata|ssl_setup|token_flush]
    2016-03-10 17:20:57.838 | keystone-manage: error: argument command: invalid choice: ‘bootstrap’ (choose from ‘db_sync’, ‘db_version’, ‘domain_config_upload’, ‘fernet_rotate’, ‘fernet_setup’, ‘mapping_purge’, ‘mapping_engine’, ‘pki_setup’, ‘saml_idp_metadata’, ‘ssl_setup’, ‘token_flush’)
    2016-03-10 17:20:57.898 | + /home/devstack/lib/keystone:bootstrap_keystone:L1: exit_trap
    2016-03-10 17:20:57.898 | + ./stack.sh:exit_trap:L474: local r=2
    2016-03-10 17:20:57.898 | ++ ./stack.sh:exit_trap:L475: jobs -p
    2016-03-10 17:20:57.899 | + ./stack.sh:exit_trap:L475: jobs=
    2016-03-10 17:20:57.899 | + ./stack.sh:exit_trap:L478: [[ -n ” ]]
    2016-03-10 17:20:57.899 | + ./stack.sh:exit_trap:L484: kill_spinner
    2016-03-10 17:20:57.899 | + ./stack.sh:kill_spinner:L370: ‘[‘ ‘!’ -z ” ‘]’
    2016-03-10 17:20:57.899 | + ./stack.sh:exit_trap:L486: [[ 2 -ne 0 ]]
    2016-03-10 17:20:57.899 | + ./stack.sh:exit_trap:L487: echo ‘Error on exit’
    2016-03-10 17:20:57.899 | Error on exit
    2016-03-10 17:20:57.899 | + ./stack.sh:exit_trap:L488: generate-subunit 1457630146 311 fail
    2016-03-10 17:20:58.290 | + ./stack.sh:exit_trap:L489: [[ -z /opt/stack/logs ]]
    2016-03-10 17:20:58.290 | + ./stack.sh:exit_trap:L492: /home/devstack/tools/worlddump.py -d /opt/stack/logs
    2016-03-10 17:20:58.411 | ovs-ofctl: br-int is not a bridge or a socket
    2016-03-10 17:20:58.423 | ovs-ofctl: br-tun is not a bridge or a socket
    2016-03-10 17:20:58.436 | ovs-ofctl: br-ex is not a bridge or a socket
    2016-03-10 17:20:58.448 | ovs-ofctl: br-int is not a bridge or a socket
    2016-03-10 17:20:58.461 | ovs-ofctl: br-tun is not a bridge or a socket
    2016-03-10 17:20:58.474 | ovs-ofctl: br-ex is not a bridge or a socket
    2016-03-10 17:20:58.855 | + ./stack.sh:exit_trap:L498: exit 2

    现在装到报这个问题了,找了好长时间了,也没找着解决办法,陈老师麻烦看下是什么问题呗。

    • 重复运行,基本都是可以解决的。

      • 不行啊,重复N次了,每次都会报这个问题。

        • 编辑lib/keystone,去掉全路径,竟然过了,可是又报另一个错误了
          function bootstrap_keystone {

          # Initialize keystone, this will create an ‘admin’ user, ‘admin’ project,
          # ‘admin’ role, and assign the user the role on the project. These resources
          # are created only if they do not already exist.
          #$KEYSTONE_BIN_DIR/
          keystone-manage bootstrap –bootstrap-password $ADMIN_PASSWORD
          ========================================================================
          + ./stack.sh::L1033: create_keystone_accounts
          2016-03-11 09:13:59.035 | + /home/devstack/lib/keystone:create_keystone_accounts:L376: local admin_tenant
          2016-03-11 09:13:59.036 | ++ /home/devstack/lib/keystone:create_keystone_accounts:L377: openstack project show admin -f value -c id
          2016-03-11 09:14:02.266 | Discovering versions from the identity service failed when creating the password plugin. Attempting to determine version from URL.
          2016-03-11 09:14:02.266 | Could not determine a suitable URL for the plugin
          2016-03-11 09:14:02.310 | + /home/devstack/lib/keystone:create_keystone_accounts:L377: admin_tenant=
          2016-03-11 09:14:02.310 | + /home/devstack/lib/keystone:create_keystone_accounts:L1: exit_trap
          2016-03-11 09:14:02.310 | + ./stack.sh:exit_trap:L474: local r=1
          2016-03-11 09:14:02.310 | ++ ./stack.sh:exit_trap:L475: jobs -p
          2016-03-11 09:14:02.311 | + ./stack.sh:exit_trap:L475: jobs=
          2016-03-11 09:14:02.311 | + ./stack.sh:exit_trap:L478: [[ -n ” ]]
          2016-03-11 09:14:02.311 | + ./stack.sh:exit_trap:L484: kill_spinner
          2016-03-11 09:14:02.311 | + ./stack.sh:kill_spinner:L370: ‘[‘ ‘!’ -z ” ‘]’
          2016-03-11 09:14:02.311 | + ./stack.sh:exit_trap:L486: [[ 1 -ne 0 ]]
          2016-03-11 09:14:02.311 | + ./stack.sh:exit_trap:L487: echo ‘Error on exit’
          2016-03-11 09:14:02.311 | Error on exit
          2016-03-11 09:14:02.311 | + ./stack.sh:exit_trap:L488: generate-subunit 1457687349 293 fail
          2016-03-11 09:14:02.775 | + ./stack.sh:exit_trap:L489: [[ -z /opt/stack/logs ]]
          2016-03-11 09:14:02.775 | + ./stack.sh:exit_trap:L492: /home/devstack/tools/worlddump.py -d /opt/stack/logs
          2016-03-11 09:14:02.917 | ovs-ofctl: br-int is not a bridge or a socket
          2016-03-11 09:14:02.931 | ovs-ofctl: br-tun is not a bridge or a socket
          2016-03-11 09:14:02.945 | ovs-ofctl: br-ex is not a bridge or a socket
          2016-03-11 09:14:02.959 | ovs-ofctl: br-int is not a bridge or a socket
          2016-03-11 09:14:02.973 | ovs-ofctl: br-tun is not a bridge or a socket
          2016-03-11 09:14:02.987 | ovs-ofctl: br-ex is not a bridge or a socket
          2016-03-11 09:14:03.438 | + ./stack.sh:exit_trap:L498: exit 1

          • 建议用虚拟机测试,跑devstack前,做一个快照。如果你是用我的local.conf ,应该成功概率很大。一般失败的原因是因为网络部分创建bridge,这个时候如果中断,可能会导致不成功。

          • 我这边获取完neutron 列表 就卡在这里了 同样的 generate-subunit 1457687349 293 fail 这个是为啥啊? 没看懂意思

  25. ogs
    ++ /home/stack/devstack/stackrc::L833: [[ -z ” ]]
    ++ /home/stack/devstack/stackrc::L835: LOGDIR=/opt/stack/logs
    ++ /home/stack/devstack/stackrc::L851: unset default_logdir logfile
    + ./stack.sh::L188: [[ ! rhel6 =~ (trusty|vivid|wily|7.0|wheezy|sid|testing|jessie|f22|f23|rhel7|kvmibm1) ]]
    + ./stack.sh::L189: echo ‘WARNING: this script has not been tested on rhel6’
    WARNING: this script has not been tested on rhel6
    + ./stack.sh::L190: [[ ” != \y\e\s ]]
    + ./stack.sh::L191: die 191 ‘If you wish to run this script anyway run with FORCE=yes’
    + /home/stack/devstack/functions-common:die:L187: local exitcode=0
    + /home/stack/devstack/functions-common:die:L188: set +o xtrace
    [Call Trace]
    ./stack.sh:191:die
    [ERROR] ./stack.sh:191 If you wish to run this script anyway run with FORCE=yes
    /home/stack/devstack/functions-common: line 233: /opt/stack/logs/error.log: No such file or directory

    陈老师,我遇到了这个问题,请问是什么情况,谢谢

    • 如果你用的是centos 6或者rhel 6,那你更换成7. 有错误,你继续运行脚本,是可以了,只要可以通过上次的错误。

  26. 陈老师,您好,我按照您的用devstack安装openstack教程安装完成之后,在source openrc admin admin时出错,stack@xxxxx:/home/devstack$ source openrc admin admin
    WARNING: setting legacy OS_TENANT_NAME to support cli tools.
    也无法打开screen -x stack出现下面的错误:
    stack@xxxxx:/home/devstack$ screen -x stack
    Cannot open your terminal ‘/dev/pts/1’ – please check.
    请问是哪有有问题。

  27. env: /home/devstack/requirements/.venv/bin/pip: No such file or directory

    为什么会出现这个问题呢,我按照local.conf配置的啊,devstack,mitaka版本。难道是我的Pip配置错了吗?

  28. 陈老师,您好,我用ubuntu15.04用stack用户执行./stack.sh后出现这个错误:./stac.sh:191 if you wish to run this script anyway run with FORCE=yes /home/dexstack/functions-commom:232: /opt/stack/logs/error.log:No such file or directory

    • 换成ubuntu 16.04,或者14.04

      • 陈老师,您好!用ubuntu16.04后,出现这种错误:./stack.sh: line 501: generate-subunit: command not found
        请问这是什么情况?谢谢

        • stack.sh 501附近代码是这样的:
          # Kill the last spinner process
          kill_spinner

          if [[ $r -ne 0 ]]; then ##409
          echo “Error on exit”## 500
          generate-subunit $DEVSTACK_START_TIME $SECONDS ‘fail’ >> ${SUBUNIT_OUTPUT} ## 501 请问这是什么情况?谢谢!

 Leave a Reply

(required)

(required)

This site uses Akismet to reduce spam. Learn how your comment data is processed.