rm排除某文件 openstack状态排查

本文提供了一套全面的OpenStack故障排查流程,包括Neutron、Nova、Cinder等关键组件的状态检查与服务重启策略,适用于快速定位并解决OpenStack平台运行中出现的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

# rm -rf !(audit_siteinfo)

首先检查neutron,保证alive :-) 不行就到compute节点重启
[root@ncontroller heat]# neutron agent-list
检查nova都是up,不行到compute节点重启openstack-nova-compute
[root@compute1 ~]# systemctl list-unit-files | grep openstack
openstack-cinder-api.service disabled
openstack-cinder-backup.service disabled
openstack-cinder-scheduler.service disabled
openstack-cinder-volume.service enabled
openstack-nova-compute.service enabled

直接用systemctl也能查询

[root@compute1 ~]# systemctl | grep cinder
openstack-cinder-volume.service                      

[root@ncontroller heat]# nova service-list
检查cinder都是up,如果不是到compute节点systemctl restart openstack-cinder-volume,或者注意同步时间
[root@ncontroller heat]# cinder service-list
检查ceph
[root@ncontroller heat]# ceph health
HEALTH_OK
不是OK的话
[root@ncontroller heat]# ceph osd tree
ID WEIGHT TYPE NAME UP/DOWN REWEIGHT PRIMARY-AFFINITY
-1 8.10883 root default
-2 0.54059 host compute1
0 0.54059 osd.0 up 1.00000 1.00000
-3 0.54059 host compute2
有down的话,到compute节点

后来总结干脆重启所有服务

#!/bin/bash


for i in {1..15}
do
        ssh -o StrictHostKeyChecking=no compute$i systemctl restart openstack-cinder-volume.service
done
sleep 2
systemctl restart openstack-cinder-api.service
sleep 2
systemctl restart openstack-cinder-scheduler.service
sleep 2
systemctl restart openstack-nova-conductor
sleep 2
systemctl restart openstack-nova-consoleauth
sleep 2
systemctl restart openstack-nova-scheduler
sleep 2
systemctl restart neutron-dhcp-agent
sleep 2
systemctl restart neutron-l3-agent
sleep 2
systemctl restart neutron-metadata-agent
sleep 2
systemctl restart neutron-openvswitch-agent



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值