如何优雅部署OpenStack私有云II--异常处理记录
Kolla虽然已经实现了自动化,但是,安装过程依旧折腾得死去活来。特地记录了当时处理各种异常的记录,希望能够帮助到大家。
来了,老弟,紧接着上一篇 树哥带你继续玩转openstack
涤生树哥,公众号:涤生大数据如何优雅部署OpenStack私有云I--Kolla
涤生大数据在职运维群,各大厂在职大数据运维小伙伴,也期待各位在职的大数据运维小伙伴加入交流哈,享受分享bug,解决bug的乐趣哈。可以加光哥微信hero78hero78,拉入哈,树哥在这里期待跟大家的交流,当然也有大数据开发在职交流扯淡群。
Kolla虽然已经实现了自动化,但是,安装过程依旧折腾得死去活来。特地记录了当时处理各种异常的记录,希望能够帮助到大家。
报错1:kolla_internal_vip_address
kolla_internal_vip_address and kolla_external_vip_address are not pingable from any node
修改vip的配置为一个空余的ip
[root@dba_bigdata_node1 192.168.10.11 kolla]# vim globals.yml
kolla_internal_vip_address: "192.168.10.20"
报错2:Ensure fluentd image is present for label check
原因:docker regions 进程未启动
处理方法:
[root@dba_bigdata_node1 192.168.10.11 kolla]# docker start registry registry-ui
[root@dba_bigdata_node1 192.168.10.11 kolla]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5b7b08cecb32 172.16.2.200:5000/docker-registry-ui:latest "/docker-entrypoint.…" 40 minutes ago Up About a minute 0.0.0.0:80->80/tcp, :::80->80/tcp registry-ui
7db4f7e1abbf registry:latest "/entrypoint.sh /etc…" 49 minutes ago Up About a minute registry
报错3:centos-source-fluentd:train not found
192.168.10.11:5000/kolla/centos-source-fluentd:train not found
原因:在registry中,没有预编译安装依赖文件。
处理方法:
1. 先关闭registry信息。第一次,拉取网络上的包。
[root@dba_bigdata_node1 192.168.10.11 kolla]# vim globals.yml
# docker_registry: "192.168.10.11:5000"
报错4: Waiting for haproxy to start
原因:主机节点1中,启用了registry-ui,占用了80端口
1. 查看错误进程
[root@dba_bigdata_node1 192.168.10.11 ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
906331e728ec kolla/centos-source-haproxy:train "dumb-init --single-…" 4 minutes ago Restarting (123) 38 seconds ago haproxy
2. 查看报错日志
[root@dba_bigdata_node1 192.168.10.11 ~]# docker logs haproxy
[ALERT] 251/163723 (29) : Starting proxy keystone_internal: cannot bind socket [192.168.131.159:5000]
[ALERT] 251/163723 (29) : Starting proxy keystone_internal: cannot bind socket [192.168.131.159:80]
其中:5000端口为步骤2.2.7 中的docker内部源地址,80为步骤2.2.8中UI地址,先关闭此两个服务
[root@dba_bigdata_node1 192.168.10.11 ~]# docker stop registry registry-ui
报错5: Error processing default value dba_bigdata_node1 for Opt type of HostAddress
原因:主机名不能带下划线,神坑啊
处理步骤:
1. 修改主机名,
[root@dba_bigdata_node1 192.168.10.11 kolla]# hostnamectl set-hostname dba-bigdata-node1
[root@dba_bigdata_node1 192.168.10.11 kolla]#
2. 修改主机名解析
[root@dba_bigdata_node1 192.168.10.11 kolla]# sed 's/_/-/g' -i /etc/hosts
3. 修改kolla主机名配置
[root@dba_bigdata_node1 192.168.10.11 kolla]# sed 's/_/-/g' -i /root/multinode
4. 修改主机名认证
[root@dba-bigdata-node1 192.168.10.11 ~]# ssh root@dba-bigdata-node2
The authenticity of host 'dba-bigdata-node1 (192.168.10.11)' can't be established.
ECDSA key fingerprint is SHA256:89ZYQKlR95OCH3ChOrpbaH5JICKU+17fDlcZ61ZVAA8.
ECDSA key fingerprint is MD5:26:5e:47:3d:3f:80:8d:89:7f:71:14:f1:52:7b:56:d8.
Are you sure you want to continue connecting (yes/no)?
报错6: FAILED - RETRYING: nova | Ensure RabbitMQ users exist (5 retries left)
原因:rabbitMQ加载出错
处理方法:清理掉现有的安装环境,重新部署
报错7: OpenVswitch启动后,网络不可达
原因:需要使用双网络。只用一个网络的话,会导致路由故障。
neutron_external_interface:"enp7s0f1"#所需的第二个接口专用于Neutron外部(或公共)网络,可以是vlan或flat,取决于网络的创建方式。此接口应在没有IP地址的情况下处于活动如果不是,openstack 云平台中的云主机实例将无法访问外部网络。只要网卡启动着,就可以了,不要给IP,有IP时br-ex桥接就不成功了。
报错8: kolla部署nova-compute容器无限重启
cd /usr/share/kolla-ansible/
grep -lR "placement" ./*
vi ./ansible/roles/nova/templates/nova.conf.j2
[placement] auth_type = password auth_url = {{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_admin_port }} username = {{ placement_keystone_user }} password = {{ placement_keystone_password }} user_domain_name = {{ default_user_domain_name }} project_name = service project_domain_name = {{ default_project_domain_name }} os_region_name = {{ openstack_region_name }} os_interface = internal #将region_name改为os_region_name |
报错9: 页面无显示
原因:
openstack hypervisor list
kolla-ansible添加FWaas后,horizon-dashboad异常,查看tail -f /var/lib/docker/volumes/kolla_logs/_data/horizon/horizon.log日志发现:
OfflineGenerationError: You have offline compression enabled but key "380b34b7d024ab6fa42dd45c1c53886c" is missing from offline manifest. You may need to run "python manage.py compress"
这是关于django压缩静态文件出现异常
解决方法:
docker exec -it horizon /bin/bash
python /var/lib/kolla/venv/bin/manage.py collectstatic Type 'yes' to continue, or 'no' to cancel:yes # 这里输入yes 或者用 python /var/lib/kolla/venv/bin/manage.py collectstatic --noinput python manage.py compress --force |
报错10: 本地磁盘只有50GB
现象:实际磁盘很多,但是只显示可用50GB
原因:LVM挂载的系统盘,只有50GB,另外一个盘,给home了。
处理步骤:将home目录的磁盘,回收并扩展到root目录
1. 备份home目录
mkdir -p /home.bak
2. 备份home目录
cp -rfa /home/* /home.bak/
3. 卸载home挂载目录
[root@dba-bigdata-node1 192.168.10.11 /]# umount /home
[root@dba-bigdata-node1 192.168.10.11 /]# df -TH |grep home
[root@dba-bigdata-node1 192.168.10.11 /]#
4. 恢复home目录
[root@dba-bigdata-node1 192.168.10.11 /]# mv /home.bak /home
5. lvm 中删除home
[root@dba-bigdata-node1 192.168.10.11 /]# lvremove centos/home
Do you really want to remove active logical volume centos/home? [y/n]: y
Logical volume "home" successfully removed
[root@dba-bigdata-node1 192.168.10.11 /]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root centos -wi-ao---- 50.00g
swap centos -wi-ao---- 4.00g
cinder-volumes-pool cinder-volumes twi-aotz-- <3.63t 0.00 10.41
volume-beb1939a-b444-4ea0-b326-86f924fe3a50 cinder-volumes Vwi-a-tz-- 100.00g cinder-volumes-pool 0.00
您在 /var/spool/mail/root 中有新邮件
[root@dba-bigdata-node1 192.168.10.11 /]# vgs
VG #PV #LV #SN Attr VSize VFree
centos 1 2 0 wz--n- 1.63t 1.58t
cinder-volumes 1 2 0 wz--n- <3.82t <195.21g
6. 将回收回来的磁盘扩容到root目录
[root@dba-bigdata-node1 192.168.10.11 /]# lvextend -l +100%free centos/root
Size of logical volume centos/root changed from 50.00 GiB (12800 extents) to 1.63 TiB (427575 extents).
Logical volume centos/root successfully resized.
[root@dba-bigdata-node1 192.168.10.11 /]# df -Th
文件系统 类型 容量 已用 可用 已用% 挂载点
/dev/mapper/centos-root xfs 50G 18G 33G 36% /
7. 扩容根目录文件系统
[root@dba-bigdata-node1 192.168.10.11 /]# xfs_growfs /dev/centos/root
meta-data=/dev/mapper/centos-root isize=512 agcount=16, agsize=819200 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0 spinodes=0
data = bsize=4096 blocks=13107200, imaxpct=25
= sunit=64 swidth=64 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal bsize=4096 blocks=6400, version=2
= sectsz=512 sunit=64 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 13107200 to 437836800
[root@dba-bigdata-node1 192.168.10.11 /]# df -Th
文件系统 类型 容量 已用 可用 已用% 挂载点
/dev/mapper/centos-root xfs 1.7T 18G 1.7T 2% /
8. 重启nova服务,更新在OpenStack中的信息
[root@dba-bigdata-node3 192.168.10.13 ceilometer-compute]# docker restart no
va_compute
更多推荐
所有评论(0)