1、执行stack.sh文件后提示
./stack.sh:528:check_path_perm_sanity /opt/devstack/functions:582:die [ERROR] /opt/devstack/functions:582 Invalid path permissions
检查functions代码
# Path permissions sanity check 559 # check_path_perm_sanity path 560 function check_path_perm_sanity { 561 # Ensure no element of the path has 0700 permissions, which is very 562 # likely to cause issues for daemons. Inspired by default 0700 563 # homedir permissions on RHEL and common practice of making DEST in 564 # the stack user's homedir. 565 566 local real_path 567 real_path=$(readlink -f $1) 568 local rebuilt_path="" 569 for i in $(echo ${real_path} | tr "/" " "); do 570 rebuilt_path=$rebuilt_path"/"$i 571 572 if [[ $(stat -c '%a' ${rebuilt_path}) = 700 ]]; then 573 echo "*** DEST path element" 574 echo "*** ${rebuilt_path}" 575 echo "*** appears to have 0700 permissions." 576 echo "*** This is very likely to cause fatal issues for DevStack daemons." 577 578 if [[ -n "$SKIP_PATH_SANITY" ]]; then 579 return 580 else 581 echo "*** Set SKIP_PATH_SANITY to skip this check" 582 die $LINENO "Invalid path permissions" 583 fi 584 fi 585 done 586 }
这段执行的是对stack账号的home目录检查权限,如果是700则返回错误。
检查/opt目录发现stack.sh自动创建的stack目录权限如下
[stack@localhost devstack]$ ll /opt/ 总用量 4 drwxr-xr-x 15 root root 4096 8月 9 12:06 devstack drwxr-xr-x. 2 root root 6 10月 31 2018 rh drwx------ 7 stack stack 131 8月 9 12:06 stack
修改stack目录权限
[stack@localhost opt]$ chmod 755 stack/ [stack@localhost opt]$ ll 总用量 4 drwxr-xr-x 15 root root 4096 8月 9 12:06 devstack drwxr-xr-x. 2 root root 6 10月 31 2018 rh drwxr-xr-x 7 stack stack 131 8月 9 12:06 stack
OK!
2、执行stack.sh文件后提示
touch: cannot touch ‘/opt/devstack/.localrc.password’: Permission denied Error on exit World dumping... see /opt/stack/logs/worlddump-2019-08-09-043124.txt for details
修改devstack目录权限
[stack@localhost opt]$ sudo chmod 777 devstack/ [stack@localhost opt]$ ll 总用量 4 drwxrwxrwx 15 root root 4096 8月 9 12:06 devstack
OK!
3、执行stack.sh文件后提示
+ tools/install_pip.sh:install_get_pip:87 : curl -f --retry 6 --retry-delay 5 -o /opt/devstack/files/get-pip.py https://bootstrap.pypa.io/get-pip.py % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0Warning: Failed to create the file /opt/devstack/files/get-pip.py: Permission Warning: denied 0 1733k 0 2228 0 0 1295 0 0:22:50 0:00:01 0:22:49 1295 curl: (23) Failed writing body (0 != 2228) + tools/install_pip.sh:install_get_pip:89 : die 89 'Download of get-pip.py failed' + functions-common:die:195 : local exitcode=23 [Call Trace] /opt/devstack/tools/install_pip.sh:140:install_get_pip /opt/devstack/tools/install_pip.sh:89:die [ERROR] /opt/devstack/tools/install_pip.sh:89 Download of get-pip.py failed ++./stack.sh:main:799 err_trap ++./stack.sh:err_trap:577 local r=23 stack.sh failed: full log in /opt/stack/logs/stack.sh.log.2019-08-09-123356 Error on exit
是由于已经安装了pip,可以直接在devstack/tools目录下,找到install_pip.py,注释掉install_get_pip这个函数调用。
4、执行stack.sh文件后提示
ERROR: Cannot uninstall 'enum34'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
可用通过手动升级的方式更新一下
sudo pip install enum34 --upgrade --ignore-installed enum34
5
ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.