From 5f301243f9b1b6a6529a4df2ac1f4b8ae1f2e7e4 Mon Sep 17 00:00:00 2001 From: mid_one Date: Thu, 28 Mar 2019 23:53:03 +0800 Subject: [PATCH] Add pmon configuration file for ovs-vswitchd OVS PMON integration is required for process state detection, alarming and recovery. The ovs-vswitchd processes need to be monitored. Add pmon configuration file for ovs-vswitchd Change rpm spec to package the configuration file Change-Id: I168563e05de8fb4b149812a61c8679a77eee58b8 Story: #2002947 Task: #22942 Signed-off-by: Chenjie Xu --- .../openvswitch-config/centos/build_srpm.data | 2 +- .../centos/openvswitch-config.spec | 2 ++ .../files/ovs-vswitchd.pmon.conf | 24 +++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 networking/openvswitch-config/files/ovs-vswitchd.pmon.conf diff --git a/networking/openvswitch-config/centos/build_srpm.data b/networking/openvswitch-config/centos/build_srpm.data index da1e20bd8..2c3b2cb8b 100644 --- a/networking/openvswitch-config/centos/build_srpm.data +++ b/networking/openvswitch-config/centos/build_srpm.data @@ -1,2 +1,2 @@ SRC_DIR="files" -TIS_PATCH_VER=0 +TIS_PATCH_VER=1 diff --git a/networking/openvswitch-config/centos/openvswitch-config.spec b/networking/openvswitch-config/centos/openvswitch-config.spec index 7a6ee7905..345c6599b 100644 --- a/networking/openvswitch-config/centos/openvswitch-config.spec +++ b/networking/openvswitch-config/centos/openvswitch-config.spec @@ -30,6 +30,7 @@ StarlingX openvswitch configuration file %install install -d -m 0755 %{buildroot}%{_sysconfdir}/openvswitch install -m 0644 ovsdb-server.pmon.conf %{buildroot}%{_sysconfdir}/openvswitch/ovsdb-server.pmon.conf +install -m 0644 ovs-vswitchd.pmon.conf %{buildroot}%{_sysconfdir}/openvswitch/ovs-vswitchd.pmon.conf install -d %{buildroot}%{_datadir}/starlingx install -m 0640 etc_logrotate.d_openvswitch %{buildroot}%{_datadir}/starlingx/etc_logrotate.d_openvswitch @@ -43,4 +44,5 @@ fi %defattr(-,root,root) %license LICENSE %config(noreplace) %{_sysconfdir}/openvswitch/ovsdb-server.pmon.conf +%config(noreplace) %{_sysconfdir}/openvswitch/ovs-vswitchd.pmon.conf %{_datadir}/starlingx/etc_logrotate.d_openvswitch diff --git a/networking/openvswitch-config/files/ovs-vswitchd.pmon.conf b/networking/openvswitch-config/files/ovs-vswitchd.pmon.conf new file mode 100644 index 000000000..145989305 --- /dev/null +++ b/networking/openvswitch-config/files/ovs-vswitchd.pmon.conf @@ -0,0 +1,24 @@ +[process] +process = ovs-vswitchd +service = ovs-vswitchd ; The name of the process's systemd service file without the extension +pidfile = /var/run/openvswitch/ovs-vswitchd.pid +style = lsb ; ocf or lsb +severity = critical ; minor, major, critical +restarts = 0 ; restarts before error assertion +interval = 0 ; number of seconds to wait between restarts +debounce = 20 ; number of seconds that a process needs to remain + ; running before degrade is removed and retry count + ; is cleared. +startuptime = 5 ; Seconds to wait after process start before starting the debounce monitor +mode = passive ; Monitoring mode: passive (default) or active + ; passive: process death monitoring (default: always) + ; active : heartbeat monitoring, i.e. request / response messaging + ; ignore : do not monitor or stop monitoring +subfunction = worker ; Optional label. + ; Manage this process in the context of a combo host subfunction + ; Choices: worker or storage. + ; when specified pmond will wait for + ; /var/run/.worker_config_complete or + ; /var/run/.storage_config_complete + ; ... before managing this process with the specified subfunction + ; Excluding this label will cause this process to be managed by default on startup