Merge "Fix remaining failing mtce services on Debian"
This commit is contained in:
commit
d48f5cc3fb
12
mtce/debian/deb_folder/crashDumpMgr.service
Normal file
12
mtce/debian/deb_folder/crashDumpMgr.service
Normal file
@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Crash Dump Manager
|
||||
After=network.target
|
||||
Before=sshd.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=no
|
||||
ExecStart=/etc/init.d/crashDumpMgr --max-size 5Gi
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
23
mtce/debian/deb_folder/fsmon.service
Normal file
23
mtce/debian/deb_folder/fsmon.service
Normal file
@ -0,0 +1,23 @@
|
||||
[Unit]
|
||||
Description=StarlingX Maintenance Filesystem Monitor
|
||||
After=network.target syslog.service config.service
|
||||
Before=pmon.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/etc/init.d/fsmon start
|
||||
ExecStop=/etc/init.d/fsmon stop
|
||||
ExecReload=/etc/init.d/fsmon reload
|
||||
PIDFile=/var/run/fsmond.pid
|
||||
|
||||
# Failure handling
|
||||
TimeoutStartSec=10s
|
||||
TimeoutStopSec=10s
|
||||
|
||||
# restarted by pmon
|
||||
Restart=no
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
13
mtce/debian/deb_folder/goenabled.service
Normal file
13
mtce/debian/deb_folder/goenabled.service
Normal file
@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=StarlingX Maintenance Goenable Ready
|
||||
After=config.service
|
||||
Before=pmon.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/etc/init.d/goenabled start
|
||||
ExecStop=/etc/init.d/goenabled stop
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
23
mtce/debian/deb_folder/hostw.service
Normal file
23
mtce/debian/deb_folder/hostw.service
Normal file
@ -0,0 +1,23 @@
|
||||
[Unit]
|
||||
Description=StarlingX Maintenance Host Watchdog
|
||||
After=syslog.service network.target hbsClient.service mtcClient.service sm.service fsmon.service
|
||||
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/etc/init.d/hostw start
|
||||
ExecStop=/etc/init.d/hostw stop
|
||||
ExecReload=/etc/init.d/hostw reload
|
||||
PIDFile=/var/run/hostwd.pid
|
||||
|
||||
# Failure handling
|
||||
TimeoutStartSec=10s
|
||||
TimeoutStopSec=10s
|
||||
|
||||
# Auto recovery
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
22
mtce/debian/deb_folder/mtcClient.service
Normal file
22
mtce/debian/deb_folder/mtcClient.service
Normal file
@ -0,0 +1,22 @@
|
||||
[Unit]
|
||||
Description=StarlingX Maintenance Command Handler Client
|
||||
After=network.target syslog.service config.service
|
||||
Before=pmon.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/etc/init.d/mtcClient start
|
||||
ExecStop=/etc/init.d/mtcClient stop
|
||||
ExecReload=/etc/init.d/mtcClient reload
|
||||
PIDFile=/var/run/mtcClient.pid
|
||||
KillMode=process
|
||||
SendSIGKILL=no
|
||||
|
||||
# Process recovery is handled by pmond if its running.
|
||||
# Delay 10 seconds to give pmond a chance to recover
|
||||
# before systemd kicks in to do it as a backup plan.
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -1,5 +1,4 @@
|
||||
etc/init.d/hostw
|
||||
etc/logrotate.d/hostw.logrotate
|
||||
etc/mtc/hostwd.conf
|
||||
lib/systemd/system/hostw.service
|
||||
usr/bin/hostwd
|
||||
|
@ -1,7 +1,6 @@
|
||||
etc/init.d/pmon
|
||||
etc/logrotate.d/pmon.logrotate
|
||||
etc/mtc/pmond.conf
|
||||
lib/systemd/system/pmon.service
|
||||
usr/bin/pmond
|
||||
usr/lib/libamon.so
|
||||
usr/lib/libamon.so.1
|
||||
|
@ -31,10 +31,6 @@ etc/services.d/controller/mtcTest
|
||||
etc/services.d/storage/mtcTest
|
||||
etc/services.d/worker/mtcTest
|
||||
etc/syslog-ng/conf.d/mtce.conf
|
||||
lib/systemd/system/crashDumpMgr.service
|
||||
lib/systemd/system/fsmon.service
|
||||
lib/systemd/system/goenabled.service
|
||||
lib/systemd/system/mtcClient.service
|
||||
usr/lib/ocf/resource.d/platform/mtcAgent
|
||||
usr/bin/fsmond
|
||||
usr/bin/hbsAgent
|
||||
|
25
mtce/debian/deb_folder/pmon.service
Normal file
25
mtce/debian/deb_folder/pmon.service
Normal file
@ -0,0 +1,25 @@
|
||||
[Unit]
|
||||
Description=StarlingX Maintenance Process Monitor
|
||||
After=config.service
|
||||
# The following thirdparty service files are not modified by StarlingX,
|
||||
# so add "After" clauses here rather than "Before=pmon.service" to those
|
||||
After=sshd.service acpid.service syslog-ng.service
|
||||
After=ntpd.service ptp4l.service phc2sys.service
|
||||
Before=hostw.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/etc/init.d/pmon start
|
||||
ExecStop=/etc/init.d/pmon stop
|
||||
ExecReload=/etc/init.d/pmon reload
|
||||
PIDFile=/var/run/pmond.pid
|
||||
KillMode=process
|
||||
|
||||
# Failure handling
|
||||
TimeoutStartSec=10s
|
||||
TimeoutStopSec=10s
|
||||
Restart=always
|
||||
RestartSec=2
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -88,15 +88,6 @@ override_dh_auto_install:
|
||||
install -m 755 -p -D scripts/hwclock.sh $(MTCESHAREDIR)/hwclock.sh
|
||||
install -m 644 -p -D scripts/hwclock.service $(MTCESHAREDIR)/hwclock.service
|
||||
|
||||
# systemd service files
|
||||
install -m 755 -d $(UNITDIR)
|
||||
install -m 644 -p -D fsmon/scripts/fsmon.service $(UNITDIR)/fsmon.service
|
||||
install -m 644 -p -D pmon/scripts/pmon.service $(UNITDIR)/pmon.service
|
||||
install -m 644 -p -D hostw/scripts/hostw.service $(UNITDIR)/hostw.service
|
||||
install -m 644 -p -D scripts/crashDumpMgr.service $(UNITDIR)/crashDumpMgr.service
|
||||
install -m 644 -p -D scripts/mtcClient.service $(UNITDIR)/mtcClient.service
|
||||
install -m 644 -p -D scripts/goenabled.service $(UNITDIR)/goenabled.service
|
||||
|
||||
# go enabled script
|
||||
install -m 755 -p -D scripts/goenabled $(INITDIR)/goenabled
|
||||
|
||||
@ -157,11 +148,18 @@ override_dh_auto_install:
|
||||
install -m 755 -d $(ROOT)/var/run
|
||||
|
||||
override_dh_installsystemd:
|
||||
dh_installsystemd --name crashDumpMgr
|
||||
dh_installsystemd --name fsmon
|
||||
dh_installsystemd --name goenabled
|
||||
dh_installsystemd --name hbsClient
|
||||
dh_installsystemd --name hostw
|
||||
dh_installsystemd --name hwclock
|
||||
dh_installsystemd --name hwmon
|
||||
dh_installsystemd --name lmon
|
||||
dh_installsystemd --name mtcalarm
|
||||
dh_installsystemd --name mtcClient
|
||||
dh_installsystemd --name mtclog
|
||||
dh_installsystemd --name pmon
|
||||
dh_installsystemd --name runservices
|
||||
|
||||
override_dh_usrlocal:
|
||||
|
@ -17,10 +17,22 @@
|
||||
# Short-Description: fsmon daemon
|
||||
### END INIT INFO
|
||||
|
||||
. /etc/init.d/functions
|
||||
CENTOS_FUNCTIONS="/etc/init.d/functions"
|
||||
DEBIAN_FUNCTIONS="/lib/lsb/init-functions"
|
||||
if [ ! -f ${CENTOS_FUNCTIONS} ] ; then
|
||||
. ${DEBIAN_FUNCTIONS}
|
||||
else
|
||||
. ${CENTOS_FUNCTIONS}
|
||||
fi
|
||||
|
||||
DAEMON_NAME="fsmond"
|
||||
DAEMON="/usr/local/bin/${DAEMON_NAME}"
|
||||
DAEMON_CENTOS_PATH="/usr/local/bin/${DAEMON_NAME}"
|
||||
DAEMON_DEBIAN_PATH="/usr/bin/${DAEMON_NAME}"
|
||||
if [ ! -f ${DAEMON_CENTOS_PATH} ] ; then
|
||||
DAEMON=${DAEMON_DEBIAN_PATH}
|
||||
else
|
||||
DAEMON=${DAEMON_CENTOS_PATH}
|
||||
fi
|
||||
PIDFILE="/var/run/${DAEMON_NAME}.pid"
|
||||
|
||||
# Linux Standard Base (LSB) Error Codes
|
||||
|
@ -19,10 +19,22 @@
|
||||
|
||||
# echo "7:3:respawn:/usr/local/bin/hostwd" >> /etc/inittab
|
||||
|
||||
. /etc/init.d/functions
|
||||
CENTOS_FUNCTIONS="/etc/init.d/functions"
|
||||
DEBIAN_FUNCTIONS="/lib/lsb/init-functions"
|
||||
if [ ! -f ${CENTOS_FUNCTIONS} ] ; then
|
||||
. ${DEBIAN_FUNCTIONS}
|
||||
else
|
||||
. ${CENTOS_FUNCTIONS}
|
||||
fi
|
||||
|
||||
DAEMON_NAME="hostwd"
|
||||
DAEMON="/usr/local/bin/${DAEMON_NAME}"
|
||||
DAEMON_CENTOS_PATH="/usr/local/bin/${DAEMON_NAME}"
|
||||
DAEMON_DEBIAN_PATH="/usr/bin/${DAEMON_NAME}"
|
||||
if [ ! -f ${DAEMON_CENTOS_PATH} ] ; then
|
||||
DAEMON=${DAEMON_DEBIAN_PATH}
|
||||
else
|
||||
DAEMON=${DAEMON_CENTOS_PATH}
|
||||
fi
|
||||
IFACE=""
|
||||
|
||||
if [ ! -e "$DAEMON" ] ; then
|
||||
|
@ -19,10 +19,22 @@
|
||||
|
||||
# echo "7:3:respawn:/usr/local/bin/pmond" >> /etc/inittab
|
||||
|
||||
. /etc/init.d/functions
|
||||
CENTOS_FUNCTIONS="/etc/init.d/functions"
|
||||
DEBIAN_FUNCTIONS="/lib/lsb/init-functions"
|
||||
if [ ! -f ${CENTOS_FUNCTIONS} ] ; then
|
||||
. ${DEBIAN_FUNCTIONS}
|
||||
else
|
||||
. ${CENTOS_FUNCTIONS}
|
||||
fi
|
||||
|
||||
DAEMON_NAME="pmond"
|
||||
DAEMON="/usr/local/bin/${DAEMON_NAME}"
|
||||
DAEMON_CENTOS_PATH="/usr/local/bin/${DAEMON_NAME}"
|
||||
DAEMON_DEBIAN_PATH="/usr/bin/${DAEMON_NAME}"
|
||||
if [ ! -f ${DAEMON_CENTOS_PATH} ] ; then
|
||||
DAEMON=${DAEMON_DEBIAN_PATH}
|
||||
else
|
||||
DAEMON=${DAEMON_CENTOS_PATH}
|
||||
fi
|
||||
IFACE=""
|
||||
|
||||
if [ ! -e "$DAEMON" ] ; then
|
||||
|
@ -21,7 +21,13 @@
|
||||
# in /etc/default/rcS, or in the proper place below.
|
||||
|
||||
# Source function library.
|
||||
. /etc/init.d/functions
|
||||
CENTOS_FUNCTIONS="/etc/init.d/functions"
|
||||
DEBIAN_FUNCTIONS="/lib/lsb/init-functions"
|
||||
if [ ! -f ${CENTOS_FUNCTIONS} ] ; then
|
||||
. ${DEBIAN_FUNCTIONS}
|
||||
else
|
||||
. ${CENTOS_FUNCTIONS}
|
||||
fi
|
||||
|
||||
[ ! -x /sbin/hwclock ] && exit 0
|
||||
|
||||
|
@ -17,10 +17,22 @@
|
||||
# Short-Description: Maintenance Client Daemon
|
||||
### END INIT INFO
|
||||
|
||||
. /etc/init.d/functions
|
||||
CENTOS_FUNCTIONS="/etc/init.d/functions"
|
||||
DEBIAN_FUNCTIONS="/lib/lsb/init-functions"
|
||||
if [ ! -f ${CENTOS_FUNCTIONS} ] ; then
|
||||
. ${DEBIAN_FUNCTIONS}
|
||||
else
|
||||
. ${CENTOS_FUNCTIONS}
|
||||
fi
|
||||
|
||||
DAEMON_NAME="mtcClient"
|
||||
DAEMON="/usr/local/bin/${DAEMON_NAME}"
|
||||
DAEMON_CENTOS_PATH="/usr/local/bin/${DAEMON_NAME}"
|
||||
DAEMON_DEBIAN_PATH="/usr/bin/${DAEMON_NAME}"
|
||||
if [ ! -f ${DAEMON_CENTOS_PATH} ] ; then
|
||||
DAEMON=${DAEMON_DEBIAN_PATH}
|
||||
else
|
||||
DAEMON=${DAEMON_CENTOS_PATH}
|
||||
fi
|
||||
PIDFILE="/var/run/${DAEMON_NAME}.pid"
|
||||
PLATFORM_CONF="/etc/platform/platform.conf"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user