openstack环境搭建问题汇总

1.neutron-l3-agent服务启动失败或者启动后再失败

启动失败

报错信息: /var/log/neutron/l3-agent.log

ERROR neutron.agent.l3.agent [-] An interface driver must be specified

解决方案:修改l3配置文件,/etc/neutron/l3_agent.ini

加上 interface_driver = linuxbridge 的配置信息,启动服务后解决 systemctl start neutron-l3-agent.service
查询服务状态:systemctl status neutron-l3-agent.service

2.neutron-linuxbridge-agent服务启动失败或前端页面状态显示down

报错信息:

ERROR neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent [-] Interface PROVIDER_INTERFACE_NAME for physical network provider does not exist. Agent terminated!
该文章类似错误:https://blog.csdn.net/reblue520/article/details/70820999?locationNum=9&fps=1

原因:配置linux_bridge时出错,找不到网络接口

配置linux_bridge

解决方案:修改/etc/neutron/plugins/ml2/linuxbridge_agent.ini

在linux_bridge部分将physical_interface_mappings改为自己的网口名称,(ifconfig查询,配置ip地址的网口名称,一般是ens33)重启neutron-linuxbridge-agent服务即可
[linux_bridge]
physical_interface_mappings = physnet1:ens33

3.创建实例失败:

创建实例失败
使用命令查询计算节点状态:
nova-status upgrade check
显示如下错误:
在这里插入图片描述

解决方案:

该问题为OpenStack计算节点nova.conf配置文件配置错误,【placement】部分未配置或配置错误
在计算节点/etc/nova/nova.conf 中,【placement】部分配置如下:
配置文档地址:https://docs.openstack.org/nova/rocky/install/compute-install-rdo.html
配置网址:https://docs.openstack.org/nova/rocky/install/compute-install-rdo.html
配置修改完成好,重启计算服务:systemctl restart openstack-nova-compute.service

4.创建好的实例vnc无法登陆

在这里插入图片描述
找不到controller的服务器ip地址

解决方案:

原因:/etc/nova/nova.conf 配置文件出错
【vnc】部分修改:
novncproxy_base_url=http://controller.7:6080/vnc_auto.html
将controller替换成自己控制节点的ip地址
配置修改完成好,重启计算服务:systemctl restart openstack-nova-compute.service

5.如何将endpoint中的controller修改成ip

openstack多平台对接需要将endpoint修改成自身控制节点的ip地址
在这里插入图片描述

方法:

从数据库中直接修改,使用update语句
mysql -uroot -proot
use keystone;
select * from endpoint;
update endpoint set url=’’ where id=’’;
将endpoint中的url全部修改掉
修改完成后 commit;提交
退出数据库
使用openstack endpoint list 命令查询,即可看到endpoint已修改。

直接使用openstack endpoint delete xxx 命令删除endpoint会出问题,导致keystone无法识别openstack的相关命令。

6.主机聚合时计算节点磁盘空间默认50G

df -h 查询计算节点磁盘情况
在这里插入图片描述
压缩home空间分给centos-root进行扩容
home备份: xfsdump -f /home.xfsdump /home
卸载home并压缩 : umount /home
lvreduce -L 50G /dev/mapper/centos-home
扩展centos-root: lvextend -l +100%FREE /dev/centos/root
xfs_growfs /dev/centos/root
回复home内容: mkfs.xfs -f /dev/mapper/centos-home
mount /home
xfsrestore -f /home.xfsdump /home
重新查询结果如下: df -h
在这里插入图片描述

7.创建实例失败,报错:Build of instance 7cabcf1b-4195-4ed6-9fa2-f4511cfa7651 aborted: Failed to allocate the network(s), not rescheduling.

修改计算节点/etc/nova/nova.conf文件:在【default】中添加:
vif_plugging_timeout = 10
vif_plugging_is_fatal = False

重启nova服务:systemctl restart openstack-nova-compute.service

8.dashboard登录后间歇性无法获取实例,无法获取镜像

报错:无法获取实例

查看日志:
grep ‘ERROR’ /var/log/nova/*

解决方法:

在openstack.cnf中修改设置最大连接数为4096,数据库中查询非4096,则需修改
修改mariadb.service文件
vi /usr/lib/systemd/system/mariadb.service
在[Service]新添加两行参数:
LimitNOFILE=10000
LimitNPROC=10000

重新加载系统服务,并重启mariadb
systemctl --system daemon-reload
systemctl restart mariadb.service

参考链接:https://blog.csdn.net/shiyuqi_blog/article/details/97803387

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值