centos7 packstack部署openstack

安装精简版centos7

然后安装ping和net-tools等工具

然后安装openstack-packstack:yum -y install openstack-packstack

由于公司使用vpn,需要先安装openvpn

【内核版本】



下载安装lzo和openvpn

https://linux.softpedia.com/get/System/Networking/?utm_source=spd&utm_campaign=postdl_redir

和 

http://www.linuxfromscratch.org/blfs/view/svn/general/lzo.html 

再编译openvpn过程中提示缺少libpam:

configure: error: libpam required but missing

然后直接下载安装pam-devel:

参考:https://www.cnblogs.com/EasonJim/p/9277586.html

安装步骤参考

http://www.py3study.com/Article/details/id/146.html

然后拨号即可

/usr/local/openvpn/sbin/openvpn --config /usr/local/openvpn/etc/client.ovpn --user xxx --auth-user-pass /usr/local/openvpn/etc/pass.txt


然后修改本地的yum源,更新报错(原因是之前用的阿里的yum源,默认安装了maridb)

解决办法参考:https://www.cnblogs.com/lwf-blog/p/7631787.html:

#rpm -qa |grep mariadb

#yum erase mariadb-libs -y

#yum install Percona-Server-client-56 -y (至此问题解决)

#yumupdate -y


开始部署参考:https://blog.csdn.net/songqier/article/details/78709002


错误1:

bash: line 7: restorecon: command not found

解决办法: yum install policycoreutils-2.5-29.el7_6.1.x86_64

错误2:

Error: Package: audit-libs-python-2.8.4-4.el7.x86_64

rpm -aq | grpe audit-libs 发现已经装了高版本

解决办法:

rpm -e audit-2.8.5-4.el7.x86_64

yum downgrade audit-libs-2.8.4-4.el7.x86_64

错误3:

ERROR : Error appeared during Puppet run: 10.70.1.208_controller.pp

Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install iptables-services' returned 1: Error: Package: glibc-2.17-260.el7_6.3.i686 (CTyun-Yum-Updates)

You will find full trace in log /var/tmp/packstack/20200922-141756-fV0nKk/manifests/10.70.1.208_controller.pp.log

解决办法:

yum downgrade glibc-2.17-260.el7_6.3.x86_64 glibc-common-2.17-260.el7_6.3.x86_64 glibc-headers-2.17-260.el7_6.3.x86_64 glibc-devel-2.17-260.el7_6.3.x86_64


错误4:

ERROR : Error appeared during Puppet run: 10.70.1.208_controller.pp

Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install iptables-services' returned 1: Error:  Multilib version problems found. This often means that the root

解决办法:

yum downgrade iptables-1.4.21-28.el7.x86_64

错误5:

Parameter CONFIG_NEUTRON_L2_AGENT: You have chosen OVN Neutron backend. Note that this backend does not support the VPNaaS or FWaaS services. Geneve will be used as the encapsulation method for tenant networks

解决办法:

修改yum源配置

将mariadb的percona配置的enable改为0,重新yum clean all;yum makecache;yum update

错误6:

Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install openstack-cinder' returned 1: Transaction check error:

You will find full trace in log /var/tmp/packstack/20200922-153644-qYYvPO/manifests/10.70.1.208_controller.pp.log

查看后台提示包冲突:

from install of python-paramiko-2.1.1-9.el7.noarch conflicts with file from package python2-paramiko-1.16.1-2.el7.noarch

解决办法:

yum erase python2-paramiko-1.16.1-2.el7.noarch

yum install python-paramiko-2.1.1-9.el7.noarch

错误7:

mError: Execution of '/usr/bin/yum -d 0 -e 0 -y install python2-placement' returned 1: Error: Nothing to do^[[0m

不明白为什么要下载这个包,

http://rpm.pbone.net/index.php3

解决办法:我是下载的1.0.0版本:python2-placement-1.0.0-1.el7.noarch.rpm

然后依次下载或者更新依赖包

错误8:

httpd服务启动失败:python[122833]: ERROR:scss.ast:Function not found: function-exists:1").

解决办法:搜了下,基本没有找到办法,不过有个说注释了这里就可以启动

vi /usr/lib/systemd/system/httpd.service.d/openstack-dashboard.conf

错误9:

httpd启动失败:

Sep 23 16:32:45 controller-node httpd[13551]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:8778

Sep 23 16:32:45 controller-node httpd[13551]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:8778

解决办法:

1.先禁用ipv6,禁用的方法:https://www.jianshu.com/p/d5d4008d25bb (后来看应该和ipv6没有关系)

2.关闭iptables(之前是关闭过,不知道什么时候又被打开了)

systemctl stop iptables.service

systemctl stop ip6tables.service

systemctl disable iptables.service

systemctl disable ip6tables.service

还是没有解决

然后发现httpd配置下端口配置8778确实存在冲突

修改成8779(找一个没有用到的端口)

问题最终解决

错误10:

内存不足:

Error: Failed to apply catalog: Cannot allocate memory - fork(2)

You will find full trace in log /var/tmp/packstack/20200924-105039-_v_Tzr/manifests/10.70.1.208_controller.pp.log

Please check log file /var/tmp/packstack/20200924-105039-_v_Tzr/openstack-setup.log for more information

虚机内存只分配了2G。。。重新分配了8G内存解决

错误11:

Error: Failed to apply catalog: Execution of '/usr/bin/openstack image list --quiet --format csv --long' returned 1: Internal Server Error (HTTP 500) (Request-ID: req-922d4682-17e7-4eec-b79c-abc2bdc8e6ce) (tried 26, for a total of 170 seconds)

You will find full trace in log /var/tmp/packstack/20200924-133243-SGGe7X/manifests/10.70.1.208_controller.pp.log

Please check log file /var/tmp/packstack/20200924-133243-SGGe7X/openstack-setup.log for more information

解决办法:

执行了一次这个命令,然后--debug看好戏是keystoneauth时没有通过,然后去glance的api.log查看发现swift有error信息

于是把swift关了重新执行

但是仍然没有解决,然后直接执行 /usr/bin/openstack --debug image list --quiet --format csv --long报500的内部错误,直接根据请求号再/var/log/glance/api.log去找发现数据库查询时没有数据库表

比较奇怪的是发现数据库都有,但是库中没有任何表,简单查找了资料没有找到,直接手动同步算了

keystone-manage db_sync

cinder-manage db sync

glance-manage db sync

nova-manage db sync

然后检查数据库表都有了,再次执行

错误12:

Error: Parameter name failed on Sshkey[ecdsa-sha2-nistp256.controller-node,localhost]: No comma in resourcename allowed. If you want to specify aliases use the host_aliases property (file: /var/tmp/packstack/3b0a36ae5fcb404fac5aad2fb87debcc/manifests/10.70.1.208_compute.pp, line: 13)

You will find full trace in log /var/tmp/packstack/20200924-151356-JXd1hM/manifests/10.70.1.208_compute.pp.log

应该是我的hosts文件配置的问题

x.x.x.x control-node,localhost

其他所有问题参考:https://openstack.redhat.com/Workarounds

错误13:

ERROR : Error appeared during Puppet run: 10.70.1.208_compute.pp

Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install openstack-nova-migration' returned 1: Error: Package: cryptsetup-2.0.3-3.el7.x86_64 (CTyun-Yum-Base)

You will find full trace in log /var/tmp/packstack/20200924-153903-kRHZ3D/manifests/10.70.1.208_compute.pp.log

yum downgrade cryptsetup-2.0.3-3.el7.x86_64 cryptsetup-libs-2.0.3-3.el7.x86_64

最后终于完成了

你可能感兴趣的:(centos7 packstack部署openstack)