控制节点装机过程中的问题

  • 现象: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
  • 安装devstack时pip安装插件速度慢
问题原因:默认的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
  • pip 安装软件出错
问题描述:
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
  • glance-api无法启动
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

  • tacker-horizon 安装不正确
问题描述:
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}

转载于:https://www.cnblogs.com/Streamr-letsgo/p/9002913.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值