- 現象:sudo apt-get update結果卡在0%[working]
問題緣由:apt-get The method driver /usr/lib/apt/methods/http could not be found
解決辦法:sudo apt-get install apt-transport-https
- /opt/stack/devstack/files/etcd-v3.1.7-linux-amd64.tar.gz: FAILED
問題緣由: 因爲網絡緣由下載超時致使
問題解決:
$ cd files/
$ wget -c https://github.com/coreos/etcd/releases/download/v3.1.10/etcd-v3.1.10-linux-amd64.tar.gz
$ wget -c https://github.com/coreos/etcd/releases/download/v3.1.7/etcd-v3.1.7-linux-amd64.tar.gz
- 解決安裝devstack時從github下載代碼速度過慢
問題緣由:默認的github下載地址訪問速度慢
問題解決:
$ stackrc 文件中找到GIT_BASE=${GIT_BASE:-git://git.openstack.org} 將這一行的源地址改成https://github.com
問題緣由:默認的pip下載地址訪問速度慢
問題解決:
找到pip.conf文件,沒有的話在根目錄下建立.pip目錄,建立pip.conf,並寫入
$ sudo find -name pip.conf
修改該文件:
[global]
index-url = http://pypi.douban.com/simple
trusted-host=pypi.douban.com
- horizon版本與tacker-horizon版本不匹配
問題描述:
2018-04-14 02:48:12.395 | ContextualVersionConflict: (horizon 12.0.3.dev45 (/opt/stack/horizon), Requirement.parse('horizon>=13.0.0'), set(['tacker-horizon']))
2018-04-14 02:48:12.509 | Error on exit
問題緣由:openstack tacker devstack的bug,在stable/pike版本的devstack中配置文件要求下載master版的tacker-horizon。致使版本不匹配。
問題解決:
以複製一份tacker項目源碼暫時替換,具體就是將原先local.conf配置文件中tacker項目的下載地址改成:enable_plugin tacker https://gitee.com/SINET_gangliu/tacker stable/pike
問題描述:
installed pip version 1 does not meet minimum requirements
[ERROR] /opt/stack/devstack/inc/python:146 Currently installed pip version 1 does not meet minimum requirements (>=6).
問題緣由:
The code in '/opt/stack/devstack/inc/python' line 142 to 148
local pip_version
pip_version=$(python -c "import pip; \
print(pip.__version__.strip('.')[0])")
if (( pip_version<6 )); then
die $LINENO "Currently installed pip version ${pip_version} does not" \
"meet minimum requirements (>=6)."
fi
When the pip version >10, the resule of 'pip.__version__.strip('.')[0]' is 1, then the error happen.
問題解決:
修改/opt/stack/devstack/inc/python文件,替換上述代碼爲:
local pip_version
pip_version=$(python -c "import pip; \
print(pip.__version__.split('.')[0])")
if (( pip_version<6 )); then
die $LINENO "Currently installed pip version ${pip_version} does not" \
"meet minimum requirements (>=6)."
fi
2018-04-14 04:55:07.876 | /opt/stack/devstack/lib/glance:355:die
2018-04-14 04:55:07.878 | [ERROR] /opt/stack/devstack/lib/glance:355 g-api did not start
問題緣由:
oslo.utils 依賴庫版本不正確
問題解決:
參考依賴庫版本衝突問題解決方法,並刪除/opt/stack/目錄下的glance文件夾
問題描述:
2018-04-13 14:57:39.584 | raise VersionConflict(dist, req).with_context(dependent_req)
2018-04-13 14:57:39.584 | ContextualVersionConflict: (oslo.utils 3.28.2 (/usr/local/lib/python2.7/dist-packages), Requirement.parse('oslo.utils>=3.33.0'), set(['python-barbicanclient']))
問題緣由:
2018-04-15 09:56:51.916 | python-barbicanclient 4.6.1.dev8 has requirement keystoneauth1>=3.4.0, but you'll have keystoneauth1 3.1.0 which is incompatible.
2018-04-15 09:56:51.917 | python-barbicanclient 4.6.1.dev8 has requirement oslo.utils>=3.33.0, but you'll have oslo-utils 3.28.2 which is incompatible.
全部依賴庫的版本信息都寫在 /opt/stack/requirements/upper-constraints.txt文件中
問題解決:
修改 /opt/stack/requirements/upper-constraints.txt文件相應依賴庫的版本
$ sudo vim /opt/stack/requirements/upper-constraints.txt
問題描述:
2018-04-16 01:52:24.730 | mysqladmin: connect to server at '127.0.0.1' failed
2018-04-16 01:52:24.730 | error: 'Access denied for user 'root'@'localhost' (using password: YES)'
2018-04-16 01:52:24.733 | +lib/databases/mysql:configure_database_mysql:91 true
2018-04-16 01:52:24.736 | +lib/databases/mysql:configure_database_mysql:94 sudo mysql -uroot -proot -h127.0.0.1 -e 'GRANT ALL PRIVILEGES ON *.* TO '\''root'\''@'\''%'\'' identified by '\''root'\'';'
2018-04-16 01:52:24.740 | mysql: [Warning] Using a password on the command line interface can be insecure.
2018-04-16 01:52:24.741 | ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
問題緣由:
數據庫mysql沒有初始化root密碼,或者初始化root密碼不成功;
問題解決:
重置密碼的第一步就是跳過MySQL的密碼認證過程,方法以下:
#vim /etc/my.cnf
在文檔內搜索mysqld定位到[mysqld]文本段:
/mysqld(在vim編輯狀態下直接輸入該命令可搜索文本內容)
在[mysqld]後面任意一行添加「skip-grant-tables」用來跳過密碼驗證的過程,以下圖所示:
保存文檔並退出:
#:wq
2.接下來咱們須要重啓MySQL:
/etc/init.d/mysql restart(有些用戶可能須要使用/etc/init.d/mysqld restart)
3.重啓以後輸入#mysql便可進入mysql。
4.接下來就是用sql來修改root的密碼
mysql> use mysql;
mysql> update user set authentication_string=PASSWORD("密碼") where user='root';
mysql> flush privileges;
mysql> quit
到這裏root帳戶就已經重置成新的密碼了。
5.編輯my.cnf,去掉剛纔添加的內容,而後重啓MySQL。
具體參考:https://www.cnblogs.com/gumuzi/p/5711495.html
問題描述:
LIBS_FROM_GIT=tacker-horizon
2017-11-22 03:55:05.900943 | controller | 2017-11-22 03:55:05.900 | + ./stack.sh:main:1392 : check_libs_from_git
2017-11-22 03:55:05.903078 | controller | 2017-11-22 03:55:05.902 | + inc/python:check_libs_from_git:428 : local lib=
2017-11-22 03:55:05.905486 | controller | 2017-11-22 03:55:05.905 | + inc/python:check_libs_from_git:429 : local not_installed=
2017-11-22 03:55:05.908513 | controller | 2017-11-22 03:55:05.908 | ++ inc/python:check_libs_from_git:430 : echo tacker-horizon
2017-11-22 03:55:05.910092 | controller | 2017-11-22 03:55:05.909 | ++ inc/python:check_libs_from_git:430 : tr , ' '
2017-11-22 03:55:05.914380 | controller | 2017-11-22 03:55:05.914 | + inc/python:check_libs_from_git:430 : for lib in '$(echo ${LIBS_FROM_GIT} | tr "," " ")'
2017-11-22 03:55:05.916037 | controller | 2017-11-22 03:55:05.915 | + inc/python:check_libs_from_git:431 : lib_installed_from_git tacker-horizon
2017-11-22 03:55:05.917672 | controller | 2017-11-22 03:55:05.917 | + inc/python:lib_installed_from_git:408 : local name=tacker-horizon
2017-11-22 03:55:05.920222 | controller | 2017-11-22 03:55:05.920 | ++ inc/python:lib_installed_from_git:422 : pip list --format=columns
2017-11-22 03:55:05.920932 | controller | 2017-11-22 03:55:05.920 | ++ inc/python:lib_installed_from_git:422 : awk '/^tacker-horizon/ {print $3}'
2017-11-22 03:55:06.878737 | controller | 2017-11-22 03:55:06.878 | + inc/python:lib_installed_from_git:422 : [[ -z /opt/stack/tacker-horizon ]]
2017-11-22 03:55:06.881615 | controller | 2017-11-22 03:55:06.881 | + inc/python:check_libs_from_git:432 : not_installed+=' tacker-horizon'
2017-11-22 03:55:06.883984 | controller | 2017-11-22 03:55:06.883 | + inc/python:check_libs_from_git:436 : [[ -n tacker-horizon ]]
2017-11-22 03:55:06.886448 | controller | 2017-11-22 03:55:06.886 | + inc/python:check_libs_from_git:437 : die 437 'The following LIBS_FROM_GIT were not installed correct: tacker-horizon'
2017-11-22 03:55:06.888968 | controller | 2017-11-22 03:55:06.888 | + functions-common:die:187 : local exitcode=0
2017-11-22 03:55:06.891649 | controller | 2017-11-22 03:55:06.891 | [Call Trace]
2017-11-22 03:55:06.891713 | controller | 2017-11-22 03:55:06.891 | ./stack.sh:1392:check_libs_from_git
2017-11-22 03:55:06.891752 | controller | 2017-11-22 03:55:06.891 | /opt/stack/devstack/inc/python:437:die
2017-11-22 03:55:06.896141 | controller | 2017-11-22 03:55:06.895 | [ERROR] /opt/stack/devstack/inc/python:437 The following LIBS_FROM_GIT were not installed correct: tacker-horizon
2017-11-22 03:55:07.902368 | controller | 2017-11-22 03:55:07.902 | Error on exit
問題緣由:
tacker項目配置文件bug,Remove tacker horizon from lib installation
問題解決:
修改/opt/stack/tacker//devstack/settings 文件,下面展現的文件修改先後對比:
修改前:
24 enable_service tacker
25 # enable tacker-conductor will make systemctl enable conductor service
26 enable_service tacker-conductor
27 # tacker-horizon isn't installable from pip
28 LIBS_FROM_GIT=tacker-horizon
29
30 MGMT_PHYS_NET=${MGMT_PHYS_NET:-mgmtphysnet0}
31 BR_MGMT=${BR_MGMT:-br-mgmt0}
修改後:
24 enable_service tacker
25 # enable tacker-conductor will make systemctl enable conductor service
26 enable_service tacker-conductor
27
28
30 MGMT_PHYS_NET=${MGMT_PHYS_NET:-mgmtphysnet0}
31 BR_MGMT=${BR_MGMT:-br-mgmt0}