qemu-kvm: terminating on signal 15 from pid 2146 (/usr/sbin/libvirtd) 這是正常情況
qemu-kvm: terminating on signal 15 from pid 1 (/usr/lib/systemd/systemd) 一開始不清楚qemu-kvm被systemd終止是發生在什麼情況下?
複制
發現計算節點重新開機後,所有的該節點上的vm被删除了,檢視vm對應的qemu日志,qemu-kvm: terminating on signal 15 from pid 1 (/usr/lib/systemd/systemd)
與此同時,openvswitch服務出錯,控制節點上執行neutron agent-list,計算節點的openvswitch-agent服務狀态顯示也不是笑臉了,是xxx
[root@EXTENV-194-18-2-14 ~]# systemctl status openvswitch
● openvswitch.service - Open vSwitch
Loaded: loaded (/usr/lib/systemd/system/openvswitch.service; enabled; vendor preset: disabled)
Active: inactive (dead)
Apr 11 10:48:20 EXTENV-194-18-2-14 systemd[1]: Dependency failed for Open vSwitch.
Apr 11 10:48:20 EXTENV-194-18-2-14 systemd[1]: Job openvswitch.service/start failed with result 'dependency'.
# vim /var/log/neutron/openvswitch-agent.log
2018-04-11 10:40:05.512 2726 ERROR neutron.agent.linux.async_process [-] Error received from [ovsdb-client monitor tcp:127.0.0.1:6640 Interface name,ofport,external_ids --format=json]: None
2018-04-11 10:40:05.513 2726 ERROR neutron.agent.linux.async_process [-] Process [ovsdb-client monitor tcp:127.0.0.1:6640 Interface name,ofport,external_ids --format=json] dies due to the error: None
複制
根據報錯資訊網上查有可能是selinux開着。
# getenforce
Enforcing
複制
果然開着,是因為selinux導緻openvswitch服務不能起來,所有vm被删除
# setenforce 0
# getenforce
Permissive
# systemctl restart openvswitch
# systemctl status openvswitch
● openvswitch.service - Open vSwitch
Loaded: loaded (/usr/lib/systemd/system/openvswitch.service; enabled; vendor preset: disabled)
Active: active (exited) since Wed 2018-04-11 11:17:20 CST; 5s ago
Process: 4479 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 4479 (code=exited, status=0/SUCCESS)
複制
發現臨時關閉selinux,setenforce 0,openvswitch服務起來了,檢查下/etc/sysconfig/selinux檔案發現SELINUX=disabled
重新開機,發現問題仍然存在
/etc/sysconfig/selinux配置了SELINUX=disabled,感覺就像selinux的配置檔案不起作用
調查後才明白原因
link檔案被scp傳來的文本檔案替換了
正常的/etc/sysconfig/selinux 配置檔案是個link檔案
# ll /etc/sysconfig/selinux
lrwxrwxrwx. 1 root root 19 Apr 11 09:23 /etc/sysconfig/selinux -> /etc/selinux/config
複制