安裝devstack中遇到的一些問題整理


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.

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM