1、a). 执行./stack.sh报错:
env: ‘/opt/stack/requirements/.venv/bin/pip’: No such file or directory
解决:
在~/devstack/local.conf最后面添加如下两行:
enable_service placement-api
enable_service placement-client
然后在stack用户下,执行:
sudo virtualenv …/requirements/.venv/
b). 卡在“Cloning into ‘/opt/stack/requirements’…
2、执行./stack.sh报错:
[ERROR] ./stack.sh:227 If you wish to run this script anyway run with FORCE=yes
/opt/stack/devstack/functions-common: line 241: /opt/stack/logs/error.log: No such file or directory
解决办法 :
stack@ubuntu:~/devstack$ FORCE=yes ./stack.sh
3、运行./stack.sh时,出现错误 [ERROR] ./stack.sh:148 If you wish to run this script anyway run with FORCE=yes,解决方法
$ echo “FORCE=yes” > localrc
$ ./stack.sh
参考链接:https://ask.openstack.org/en/question/1888/problem-with-installing-openstack/
注意 :For Ubuntu 14.04 run
sudo apt-get install libsystemd-daemon-dev
4、+ set +o xtrace
DevStack should be run as a user with sudo permissions,
not root.
A “stack” user configured correctly can be created with:
/opt/stack/devstack/tools/create-stack-user.sh
解决办法 :
运行 /root/openstack_code/devstack/tools/create-stack-user.sh,创建stack user,
然后chown -R stack devstack.
chgrp -R stack devstack.
执行:
sudo -u stack ./stack.sh.
5、:pip not found in /opt/stack/.vnc/bin/
解决方法:
cd /opt/stack/.vnc/bin/
sudo ln -sf /usr/local/bin/pip pip
6、Give stack user passwordless sudo privileges
给堆栈用户无密码的sudo特权
7、+./stack.sh:exit_trap:525 local r=1
++./stack.sh:exit_trap:526 jobs -p
+./stack.sh:exit_trap:526 jobs=
+./stack.sh:exit_trap:529 [[ -n ‘’ ]]
+./stack.sh:exit_trap:535 ‘[’ -f ‘’ ‘]’
+./stack.sh:exit_trap:540 kill_spinner
+./stack.sh:kill_spinner:435 ‘[’ ‘!’ -z ‘’ ‘]’
+./stack.sh:exit_trap:542 [[ 1 -ne 0 ]]
+./stack.sh:exit_trap:543 echo ‘Error on exit’
Error on exit
+./stack.sh:exit_trap:545 type -p generate-subunit
+./stack.sh:exit_trap:546 generate-subunit 1578019014 113 fail
+./stack.sh:exit_trap:548 [[ -z /opt/stack/logs ]]
+./stack.sh:exit_trap:551 /opt/devstack/tools/worlddump.py -d /opt/stack/logs
+./stack.sh:exit_trap:560 exit 1
原因可能有多种,可能是因为使用了代理,网上有使用No_proxy解决了问题,大家可以自行查找,或者查官网文档;也可能是因为controller机和compute机不能互相通信造成该问题,需要读者自己尝试解决,我安装pike版本的时候只是因为虚拟机间不能通信造成这个问题,安装其他版本时没能解决这个问题,实在惭愧,所以推荐大家使用pike版本。
原因一 :用户权限不足
解决方法:
sudo chown -R stack:stack /usr/local/lib/python2.7
1
8、generate-subunit: command not found
原因:pip未更新
解决方法:
sudo apt-get install python-pip
sudo pip install –upgrade pip
sudo pip install -U os-testr
9、File “/usr/local/bin/generate-subunit”, line 7, in
[ERROR] /opt/devstack/inc/python:317 Can’t find package systemd-python in requirements
+inc/python:pip_install_gr:66 clean_name='[Call Trace]
./stack.sh:795:pip_install_gr
/opt/devstack/inc/python:66:get_from_global_requirements
/opt/devstack/inc/python:317:die’
+inc/python:pip_install_gr:1 exit_trap
+./stack.sh:exit_trap:525 local r=1
++./stack.sh:exit_trap:526 jobs -p
+./stack.sh:exit_trap:526 jobs=
+./stack.sh:exit_trap:529 [[ -n ” ]]
+./stack.sh:exit_trap:535 ‘[‘ -f ” ‘]’
+./stack.sh:exit_trap:540 kill_spinner
+./stack.sh:kill_spinner:435 ‘[‘ ‘!’ -z ” ‘]’
+./stack.sh:exit_trap:542 [[ 1 -ne 0 ]]
+./stack.sh:exit_trap:543 echo ‘Error on exit’
Error on exit
+./stack.sh:exit_trap:545 type -p generate-subunit
+./stack.sh:exit_trap:546 generate-subunit 1578019802 160 fail
Traceback (most recent call last):
File “/usr/local/bin/generate-subunit”, line 7, in <module>
from os_testr.generate_subunit import main
ImportError: No module named ‘os_testr
解决办法 :
打开/usr/local/bin/generate-subunit
stack@master:/usr/local/bin$ vi /usr/local/bin/generate-subunit
#!/usr/bin/python3.5
# -*- coding: utf-8 -*-
import re
import sys
from os_testr.generate_subunit import main
if __name__ == ‘__main__’:
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$’, ”, sys.argv[0])
sys.exit(main())
注释掉第七行
20、
WARNING: this script has not been tested on xenial
+./stack.sh:main:226 [[ ‘’ != \y\e\s ]]
+./stack.sh:main:227 die 227 ‘If you wish to run this script anyway run with FORCE=yes’
+functions-common:die:195 local exitcode=0
+functions-common:die:196 set +o xtrace
[Call Trace]
./stack.sh:227:die
[ERROR] ./stack.sh:227 If you wish to run this script anyway run with FORCE=yes
/opt/stack/devstack/functions-common: line 241: /opt/stack/logs/error.log: No such file or directory
stack@master:~/devstack$ FORCE=yes ./stack.sh
解决办法:
stack@master:~/devstack$ FORCE=yes ./stack.sh
1
或者
这是因为这个脚本没有在Ubuntu16上测试过,直接把176-178行的if[[“$FORCE” != “yes”]]; then这3行在前面加上”#”注释掉
21、
[ERROR] /opt/stack/devstack/inc/python:321 Can’t find package systemd-python in requirements
+inc/python:pip_install_gr:70 clean_name='[Call Trace]
./stack.sh:820:pip_install_gr
/opt/stack/devstack/inc/python:70:get_from_global_requirements
/opt/stack/devstack/inc/python:321:die’
+inc/python:pip_install_gr:1 exit_trap
+./stack.sh:exit_trap:533 local r=1
++./stack.sh:exit_trap:534 jobs -p
+./stack.sh:exit_trap:534 jobs=
+./stack.sh:exit_trap:537 [[ -n ” ]]
+./stack.sh:exit_trap:543 ‘[‘ -f ” ‘]’
+./stack.sh:exit_trap:548 kill_spinner
+./stack.sh:kill_spinner:443 ‘[‘ ‘!’ -z ” ‘]’
+./stack.sh:exit_trap:550 [[ 1 -ne 0 ]]
+./stack.sh:exit_trap:551 echo ‘Error on exit’
Error on exit
+./stack.sh:exit_trap:553 type -p generate-subunit
+./stack.sh:exit_trap:554 generate-subunit 1578030647 66 fail
+./stack.sh:exit_trap:556 [[ -z /opt/stack/logs ]]
+./stack.sh:exit_trap:559 /opt/stack/devstack/tools/worlddump.py -d /opt/stack/logs
World dumping… see /opt/stack/logs/worlddump-2020-01-03-055154.txt for details
+./stack.sh:exit_trap:568 exit 1
解决办法:vi /opt/stack/devstack/inc/python
注释掉321行
22、
consider upgrading via the ‘pip install –upgrade pip’ command.
+ exit_trap
+ local r=2
++ jobs -p
+ jobs=
+ [[ -n ” ]]
+ kill_spinner
+ ‘[‘ ‘!’ -z ” ‘]’
+ [[ 2 -ne 0 ]]
+ echo ‘Error on exit’ Error on exit
+ generate-subunit 1455806136 50 fail ./stack.sh: line 463: generate-subunit: command not found
或者
Cloning into ‘/opt/stack/requirements’…
fatal: unable to access ‘https://git.openstack.org/openstack/requirements.git/’: Could not resolve host: git.openstack.org; Unknown error
+functions-common:git_timed:603 [[ 128 -ne 124 ]]
+functions-common:git_timed:604 die 604 ‘git call failed: [git clone’ https://git.openstack.org/openstack/requirements.git ‘/opt/stack/requirements]’
+functions-common:die:186 local exitcode=0
+functions-common:die:187 set +o xtrace
[Call Trace]
./stack.sh:715:git_clone
/opt/devstack/functions-common:537:git_timed
/opt/devstack/functions-common:604:die
[ERROR] /opt/devstack/functions-common:604 git call failed: [git clone https://git.openstack.org/openstack/requirements.git /opt/stack/requirements]
Error on exit
./stack.sh: line 494: generate-subunit: command not found
解决办法:
sudo apt-get install python-pip
sudo pip install –upgrade pip
sudo pip install -U os-testr
23、pip not found in /opt/stack/.vnc/bin/
解决方法:
cd /opt/stack/.vnc/bin/
sudo ln -sf /usr/local/bin/pip pip
24、
+tools/install_pip.sh:install_get_pip:89 die 89 ‘Download of get-pip.py failed’
+functions-common:die:195 local exitcode=7
+functions-common:die:196 set +o xtrace
[Call Trace]
/opt/stack/devstack/tools/install_pip.sh:140:install_get_pip
/opt/stack/devstack/tools/install_pip.sh:89:die
[ERROR] /opt/stack/devstack/tools/install_pip.sh:89 Download of get-pip.py failed
++./stack.sh:main:796 err_trap
++./stack.sh:err_trap:574 local r=7
++./stack.sh:err_trap:575 set +o xtrace
stack.sh failed
Error on exit
World dumping… see /opt/stack/logs/worlddump-2020-01-03-081845.txt for details
25、
解决办法:
扩展 :
devstack默认卷容量比较小(10G),安装时可以调整(stack用户下导入该环境变量)
export VOLUME_BACKING_FILE_SIZE=102500M
安装openstack需要访问pypi网站,超时失败的话
可以运行./unstack.sh, ./stack.sh解决
系统重启后,需要运行rejoin.sh,运行前需要重新恢复卷组
losetup -f /opt/stack/data/stack-volumes-backing-file
安装完成后发现卷容量较小,可以使用如下方法调整
devstack安装默认lvm后端容量为10G。
后续可以通过以下方式修改:
qemu-img create -f raw 100G
losetup -f
pvcreate
vgextend
注:vg_name可以通过vgdisplay显示。
参考链接 :
https://blog.csdn.net/hunjiancuo5340/article/details/85005995
https://blog.csdn.net/qq_41241568/article/details/79615314
https://blog.csdn.net/qq_41241568/article/details/79615314
ubuntu16.04 用devstack部署OpenStack ocata常见错误汇总 :https://blog.csdn.net/w199929/article/details/89971069
安装devstack中遇到的一些问题整理 :https://www.cnblogs.com/rhjeans/p/11328346.html
https://blog.csdn.net/weixin_30955617/article/details/101736599
devstack安装使用openstack常见问题与解决办法https://blog.csdn.net/halcyonbaby/article/details/25829651
在Ubuntu16.04中安装DevStack过程中出现的若干问题 :https://blog.csdn.net/sadoshi/article/details/58176876
openStack常见报错_if you wish to run this script anyway run with for-CSDN博客
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/notes/309087.html