2015-04-25 08:34:28.440 | 'wsgiref' is not in global-requirements.txt
解决方法 :
找到openstack requirement project in https://github.com/openstack/requirements/tree/master,将 branch 切换到对应的 branch ,比如juno。 打开global-requirements.txt 文件,搜索wsgiref 可以看到wsgiref>=0.1.2,将这一行加到/opt/stack/requirements/global-requirements.txt:
echo "wsgiref>=0.1.2" >> /opt/stack/requirements/global-requirements.txt
引起问题的原因,因为源码是git 的juno branch 但是运行devstak /stack.sh的时候,会自动去git master的requirements 项目,branch 不匹配。
解决方法 :
下载安装mox:http://rpm.pbone.net/index.php3/stat/4/idpl/15288633/dir
/redhat_el_6/com/python-mox-0.5.3-2.el6.noarch.rpm.html
通过./rejoin-stack.sh查看q-agt信息看到:ContextualVersionConflict: (six 1.7.3 (/usr/lib/python2.6
/site-packages), Requirement.parse(\'six>=1.9.0\')
解决方法:
wget https://bootstrap.pypa.io/get-pip.py --no-check-certificate
python get-pip.py
pip uninstall six
pip install six
Successfully installed six-1.9.0
通过./rejoin-stack.sh查看q-dhcp信息看到:ERROR neutron.agent.linux.dhcp [req-31d73fe5-d79c-4e18-a25a-7975e7f2c16f None None] FAILED VERSION REQUIREMENT FOR DNSMASQ. DHCP AGENT MAY NOT RUN CORRECTLY! Please ensure that its version is 2.63 or above!
解决办法:下载并安装新版本的dnsmasq
wget http://pkgs.repoforge.org/dnsmasq/dnsmasq-2.65-1.el6.rfx.x86_64.rpm
rpm -Uvh dnsmasq-2.65-1.el6.rfx.x86_64.rpm
通过./rejoin-stack.sh查看h-api信息看到0.0.0.0:8004端口被占用,./unstack.sh,./clean.sh后用
netstat -lpnt查看发现0.0.0.0:8004端口仍然有进城在使用。即使kill -9杀掉那个进程,依旧会有新进
程产生占用。然后pip install killproc装了个killproc,执行killproc killproc /opt/stack/heat/bin/he
at-api,把所有关联的进程都杀了。如果嫌麻烦重启一下也可以,也不会被占用了。
telnet了一下:telnet 10.133.19.101 80,不通。发现目前版本,devstack不会去打开iptables的80端口
,所以在运行脚本前,设置一下iptables,编辑 /etc/sysconfig/iptables,添加一行,打开80端口。或者临
时添加:iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT
查看q-dhcp日志发现以下错误:Object "netns" is unknown, try "ip help".原因是 rhel/centos 6.x 的 内核
虽然已经支持network namespace,但安装的iproute 包版本太低,不支持ip netns命令。
但利用网上的做法:
# yum install http://rdo.fedorapeople.org/rdo-release.rpm
# yum install iproute
安装的是rdo-release juno-1,没有针对epel-6的rpm,自然就无法升级iproute了。需要安装icehouse的rdo-release包:
yum install https://repos.fedorapeople.org/repos/openstack/openstack-icehouse/rdo-release-icehouse-4.noarch.rpm
最近发现icehouse的rdo-release包变了,变成以下了:https://repos.fedorapeople.org/repos
/openstack/EOL/openstack-icehouse/rdo-release-icehouse-4.noarch.rpm
再修改/etc/yum.repos.d/rdo-release.repo:
baseurl=https://repos.fedorapeople.org/repos/openstack/EOL/openstack-icehouse/epel-6/
然后执行:
yum update iproute
就可以了。
或者卸载掉iproute再安装:
yum -y remove iproute(卸载的时候像rabbitmq也被牵连卸载了,所以升级iproute后重新搭建openstack)
yum -y install https://repos.fedorapeople.org/repos/openstack/openstack-icehouse/epel-6/iproute-2.6.32-130.el6ost.netns.2.x86_64.rpm
地址已变,变成以下:https://repos.fedorapeople.org/repos/openstack/EOL/openstack-icehouse
/epel-6/iproute-2.6.32-130.el6ost.netns.2.x86_64.rpm
yum -y install iproute
安装完毕devstack后,需要开启如下服务
chkconfig rabbitmq-server on (service rabbitmq-server start)
Permission denied: AH00072: make_sock: could not bind to address [::]:5000
6月 23 13:39:35 controller httpd[5137]: (13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:5000
6月 23 13:39:35 controller httpd[5137]: no listening sockets available, shutting down
6月 23 13:39:35 controller httpd[5137]: AH00015: Unable to open logs
6月 23 13:39:35 controller systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
6月 23 13:39:35 controller systemd[1]: Failed to start The Apache HTTP Server.
6月 23 13:39:35 controller systemd[1]: Unit httpd.service entered failed state.
6月 23 13:39:35 controller systemd[1]: httpd.service failed.
解决方法:关闭SELINUX
HttpConnectionPool is full, discarding connection
I have enabled Swift in my local.conf. In that case it seems Glance by default uses Swift as a backend for images, so Swift starts before Glance. But in my case s-proxy service failed to start because there was Ceilometer installed before and its files were discoverable by Paste's WSGI, but Ceilometer was not started (installed all dependencies) yet:
Thus Glance failed to save the test image to Swift backend (the ConnectionPool error seems due to Glance retrying saving request many times enough to exhaust it).
My solution was to clean everything from /opt/stack and run stack.sh anew.
解决方法:搭建之前,在localrc中注释掉ceilometer,不装Ceilometer
11. ./stack.sh的时候报错:Cannot open: http://rdo.fedorapeople.org/openstack-icehouse/rdo-release-icehouse.rpm. Skipping.
原因:地址已变
解决方法:在localrc中加入如下一行:
RHEL6_RDO_REPO_RPM=https://repos.fedorapeople.org/repos/openstack
/EOL/openstack-icehouse/rdo-release-icehouse-4.noarch.rpm
git clone https://github.com/openstack-dev/devstack.git -b stable/juno
#Header [[local|localrc]] # Credentials ADMIN_PASSWORD=openstack MYSQL_PASSWORD=$ADMIN_PASSWORD #DATABASE_PASSWORD=$ADMIN_PASSWORD RABBIT_PASSWORD=$ADMIN_PASSWORD SERVICE_PASSWORD=$ADMIN_PASSWORD SERVICE_TOKEN=$ADMIN_PASSWORD # Branches NOVA_BRANCH=stable/juno KEYSTONE_BRANCH=stable/juno NEUTRON_BRANCH=stable/juno GLANCE_BRANCH=stable/juno CINDER_BRANCH=stable/juno SWIFT_BRANCH=stable/juno HEAT_BRANCH=stable/juno TROVE_BRANCH=stable/juno HORIZON_BRANCH=stable/juno CEILOMETER_BRANCH=stable/juno #Network Configuration: #FLOATING_RANGE=172.16.91.0/24 #openstack 外网ip #FIXED_RANGE=10.11.12.0/24 #openstack 内网ip HOST_IP=172.16.3.15 #vmware 虚拟机的ip # Services ENABLED_SERVICES=rabbit,mysql,key ENABLED_SERVICES+=,n-api,n-crt,n-obj,n-cpu,n-cond,n-sch,n-novnc,n-cauth ENABLED_SERVICES+=,s-proxy,s-object,s-container,s-account ENABLED_SERVICES+=,g-api,g-reg ENABLED_SERVICES+=,cinder,c-api,c-vol,c-sch,c-bak #Trove ENABLED_SERVICES+=,trove,tr-api,tr-tmgr,tr-cond ENABLED_SERVICES+=,horizon #Ceilometer ENABLED_SERVICES+=,ceilometer-acompute,ceilometer-acentral,ceilometer-collector,ceilometer-api ENABLED_SERVICES+=,ceilometer-alarm-notify,ceilometer-alarm-eval #Heat ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-api-cw,h-eng IMAGE_URLS+=",http://fedorapeople.org/groups/heat/prebuilt-jeos-images/F19-x86_64-cfntools.qcow2" #Neutron 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 neutron # Neutron - Load Balancing ENABLED_SERVICES+=,q-lbaas # Neutron - VPN as a Service ENABLED_SERVICES+=,q- # 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 # Images # Use this image when creating test instances IMAGE_URLS+=",http://cdn.download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-disk.img" #Swift Requirements 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
sudo git clone https://github.com/openstack/glance.git /opt/stack/glance -b stable/juno
sudo git clone https://github.com/openstack/cinder.git /opt/stack/cinder -b stable/juno
sudo git clone https://github.com/openstack/horizon.git /opt/stack/horizon -b stable/juno
sudo git clone https://github.com/openstack/keystone.git /opt/stack/keystone -b stable/juno
sudo git clone https://github.com/openstack/neutron.git /opt/stack/neutron -b stable/juno
sudo git clone https://github.com/openstack/swift.git /opt/stack/swift -b stable/juno
sudo git clone https://github.com/openstack/heat.git /opt/stack/heat -b stable/juno
sudo git clone https://github.com/openstack/heat-cfntools.git /opt/stack/heat-cfntools -b stable/juno
sudo git clone https://github.com/openstack/heat-templates.git /opt/stack/heat-templates -b stable/juno
sudo git clone https://github.com/openstack/requirements.git /opt/stack/requirements -b stable/juno
sudo git clone https://github.com/openstack/ceilometer.git /opt/stack/ceilometer -b stable/junosudo git clone https://github.com/openstack/requirements.git /opt/stack/requirements -b stable/juno
sudo git clone https://github.com/kanaka/noVNC.git /opt/stack/noVNC
#cd devstack/tools #sudo ./devstack/tools/create-stack-user.sh
#chown -R stack:stack /opt/stack
1
|
sudo nano
/
etc
/
sudoers
在root 下添加
stack
ALL
=
(
ALL
:
ALL
) NOPASSWD:
ALL
|
将 devstac 的owner 设置为 stack
1
|
sudo chown
-
R stack:stack devstack
|
必须在devstack 执行,否则会遇到会遇到mktemp -d ----xxxxxx 权限不够的错误。 因为当前路径对stack 用户来说,很可能没有写权限
#su stack #./stack.sh
参考:http://www.cnblogs.com/yudar/p/4428245.html
http://www.cnblogs.com/heavyhe/p/4546955.html