
When ts2phc is configured without ts2phc.nmea_serialport, in case of "-s generic", alarm configuration was not created, and this is not raising alarm when the ts2phc service is down. This commit fixes by having ts2phc alarm configuration even when there is no ts2phc.nmea_serialport. TEST PLAN: PASS: Configure ts2phc without nmea_serialport, stopping ts2phc shows alarm. system ptp-instance-add ts1 ts2phc system ptp-instance-parameter-add ts1 cmdline_opts='-s generic' system ptp-interface-add tsint1 ts1 system host-if-ptp-assign controller-0 oam0 tsint1 system host-ptp-instance-assign controller-0 ts1 system ptp-instance-apply stop ts2phc: sudo systemctl stop ts2phc@ts1.service 'fm alarm-list' shows: controller-0 PTP service ts2phc@ts1.service enabled but not running start ts2phc, alarm get cleared. There are no other errors on collectd.log PASS: Configure ts2phc with non-existing device on nmea_serialport, stopping ts2phc shows alarm. system ptp-instance-parameter-delete ts1 cmdline_opts='-s generic' system ptp-instance-parameter-add ts1 cmdline_opts='-s nmea' system ptp-instance-parameter-add ts1 ts2phc.nmea_serialport=/dev/gnssx system ptp-instance-apply 'fm alarm-list' shows no alarms stop ts2phc: sudo systemctl stop ts2phc@ts1.service 'fm alarm-list' shows 'controller-0 PTP service ts2phc@ts1.service enabled but not running' There are no other errors on collectd.log PASS: Configure ts2phc with existing device on nmea_serialport, to see working as usual. stopping ts2phc shows alarm. system ptp-instance-parameter-delete ts1 ts2phc.nmea_serialport=/dev/gnssx system ptp-instance-parameter-add ts1 ts2phc.nmea_serialport=/dev/gnss0 system ptp-instance-apply 'fm alarm-list' shows no alarms stop ts2phc: sudo systemctl stop ts2phc@ts1.service 'fm alarm-list' shows 'controller-0 PTP service ts2phc@ts1.service enabled but not running' There are no other errors on collectd.log PASS: Other instances (ptp4l, phc2sys) are working normally Closes-bug: 2125146 Change-Id: I72f158a9e7a4868f22810f7e431e62a259463397 Signed-off-by: Tara Nath Subedi <tara.subedi@windriver.com>
Description
StarlingX system monitoring and repoting tools
Languages
Python
84.9%
Perl
14.3%
Makefile
0.7%
Shell
0.1%