Virtuabox中Centos 7.3安装devstack后记

3 篇文章 0 订阅
2 篇文章 0 订阅

折腾了几天devstack,终于把这货装上了,期间真是曲折万千哪!

闲话不说,扯正题,说说我在安装devstack过程中遇过的坑吧。
看我的环境:

$ cat /etc/centos-release
CentOS Linux release 7.3.1611 (Core)

为了加速安装过程,采用了trystack的git源和镜像源,在此先附上我的local.conf的配置(借鉴了陈沙克日志的分享的github上配置: https://github.com/shake/devstack):

[[local|localrc]]
DEST=/opt/stack/mitaka
# use TryStack git mirror
GIT_BASE=http://git.trystack.cn
NOVNC_REPO=http://git.trystack.cn/kanaka/noVNC.git
SPICE_REPO=http://git.trystack.cn/git/spice/spice-html5.git

#OFFLINE=True
RECLONE=True

# Define images to be automatically downloaded during the DevStack built process.
DOWNLOAD_DEFAULT_IMAGES=False
IMAGE_URLS=",https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img"

HOST_IP=192.168.56.101


# Credentials
DATABASE_PASSWORD=pass
ADMIN_PASSWORD=pass
SERVICE_PASSWORD=pass
SERVICE_TOKEN=pass
RABBIT_PASSWORD=pass

HORIZON_BRANCH=stable/mitaka
KEYSTONE_BRANCH=stable/mitaka
NOVA_BRANCH=stable/mitaka
NEUTRON_BRANCH=stable/mitaka
GLANCE_BRANCH=stable/mitaka
CINDER_BRANCH=stable/mitaka


#keystone
KEYSTONE_TOKEN_FORMAT=UUID

##Heat
HEAT_BRANCH=stable/mitaka
enable_service h-eng h-api h-api-cfn h-api-cw


## Swift
SWIFT_BRANCH=stable/mitaka
ENABLED_SERVICES+=,s-proxy,s-object,s-container,s-account
SWIFT_REPLICAS=1
SWIFT_HASH=011688b44136573e209e


# Enabling Neutron (network) Service
disable_service n-net
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-l3
enable_service q-meta
enable_service q-metering
enable_service neutron

## Neutron options
Q_USE_SECGROUP=True
FLOATING_RANGE="192.168.56.0/24"
FIXED_RANGE="10.0.0.0/24"
Q_FLOATING_ALLOCATION_POOL=start=192.168.56.55,end=192.168.56.100
PUBLIC_NETWORK_GATEWAY="192.168.56.1"
Q_L3_ENABLED=True
PUBLIC_INTERFACE=eth0
Q_USE_PROVIDERNET_FOR_PUBLIC=True
OVS_PHYSICAL_BRIDGE=br-ex
PUBLIC_BRIDGE=br-ex
OVS_BRIDGE_MAPPINGS=public:br-ex

# #VLAN configuration.
Q_PLUGIN=ml2
ENABLE_TENANT_VLANS=True

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

执行完了 tools/create-stack-user.sh之后,会创建一个叫stack的用户,家目录是/opt/stack:

[stack@devstack devstack]$ cat /etc/passwd|grep stack
stack:x:1001:1001::/opt/stack:/bin/bash

然后将devstack整个拷贝到/opt/stack下,并设置权限:

chown -R stack:stack /opt/stack/devstack
chmod -R 755 /opt

下边就是喜闻乐见的安装了:

[stack@devstack devstack]$ ./stack.sh
+ unset GREP_OPTIONS
+ umask 022
+ PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/stack/.local/bin:/opt/stack/bin:/usr/local/sbin:/usr/sbin:/sbin
...
...

再接下来,就是就是见证我的见鬼历程:

1. 安装libvirt-python(版本号1.3.2)失败

Collecting libvirt-python===1.3.2 (from -c /opt/stack/requirements/upper-constraints.txt (line 175))
2017-04-06 11:47:50.690 |   Downloading libvirt-python-1.3.2.tar.gz (171kB)
2017-04-06 11:47:52.591 | Building wheels for collected packages: libvirt-python
2017-04-06 11:47:52.591 |   Running setup.py bdist_wheel for libvirt-python: started
2017-04-06 11:47:53.784 |   Running setup.py bdist_wheel for libvirt-python: finished with status 'error'
2017-04-06 11:47:53.784 |   Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-w7PHef/libvirt-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpIu3e9Ypip-wheel- --python-tag cp27:
2017-04-06 11:47:53.784 |   running bdist_wheel
2017-04-06 11:47:53.784 |   running build
2017-04-06 11:47:53.785 |   /usr/bin/pkg-config --print-errors --atleast-version=0.9.11 libvirt
2017-04-06 11:47:53.785 |   /usr/bin/python generator.py libvirt /usr/share/libvirt/api/libvirt-api.xml
2017-04-06 11:47:53.785 |   Found 413 functions in /usr/share/libvirt/api/libvirt-api.xml
2017-04-06 11:47:53.785 |   Found 0 functions in libvirt-override-api.xml
2017-04-06 11:47:53.785 |   Generated 341 wrapper functions
2017-04-06 11:47:53.785 |   Missing type converters:
2017-04-06 11:47:53.785 |   virTypedParameterPtr:1
2017-04-06 11:47:53.785 |   virTypedParameterPtr *:2
2017-04-06 11:47:53.785 |   virConnectStoragePoolEventGenericCallback:1
2017-04-06 11:47:53.785 |   ERROR: failed virConnectStoragePoolEventRegisterAny
2017-04-06 11:47:53.785 |   ERROR: failed virDomainGetGuestVcpus
2017-04-06 11:47:53.785 |   ERROR: failed virDomainGetPerfEvents
2017-04-06 11:47:53.785 |   ERROR: failed virDomainSetPerfEvents
2017-04-06 11:47:53.785 |   error: command '/usr/bin/python' failed with exit status 1

这个问题,googole了好长时间,最后总算是明白了点儿,大概的意思就是libvirt-python的版本低了,在2.0.0版本给修复了。于是往回扒安装日志,逮着猫一眼,重点就在这里:

2017-04-06 11:47:50.087 | Collecting libvirt-python===1.3.2 (from -c /opt/stack/requirements/upper-constraints.txt (line 175))

发现这个包名和版本信息是从一个叫:/opt/stack/requirements/upper-constraints.txt的文件的175行中读取的。

果断改成2.0.0:

libvirt-python

当然,还有一个文件也得改:
/opt/stack/requirements/global-requirements.txt

libvirt-python1

再来一遍,发现还是到这里失败了,安装的还是1.3.2版本,我就纳闷了。后来想了想,原来是这个地方有问题:

[[local|localrc]]
...
RECLONE=True
...

这个参数,意思再明显不过了,每次安装就重新git clone,导致我们的改动无效,只需要将它改为False即可,再来一次!

正当我泡完一杯茶回来,准备庆幸的时候,又双叒叕报错了!哎,啥都不说了,心塞!

openstacksdk 版本又低了,还是上边那两个步骤,将openstacksdk版本改为9.11:

openstacksdk

齐活!再来!

sussess

半个小时的寂寞等待之后,终于成功了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值