Debian: PCI address of nmea serial port searched in incorrect file

Bug #1995718 reported by Douglas Henrique Koerich
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
High
Douglas Henrique Koerich

Bug Description

Brief Description
-----------------
The ptp-notification application looks for the PCI address of the ttyGNSS nmea serial port in dmesg file instead of kern.log, which causes the ptp-notification-ptptracking container to fail and go CrashLoopBackOff.

Severity
--------
Critical.

Steps to Reproduce
------------------
- Configure PTP with ts2phc instance;
- Upload and apply the ptp-notification application.

Expected Behavior
------------------
ptp-notification pod should be in Running state.

Actual Behavior
----------------
ptp-notification pod goes CrashLoopBackOff state (not running).

Reproducibility
---------------
Reproducible

System Configuration
--------------------
Any

Last Pass
---------
r/stx-7.0.

Timestamp/Logs
--------------
From the failed ptp-notification-ptptracking container inside the pod:

2022-11-03 04:14:18 INFO PTP tracking service startup context {'THIS_NAMESPACE': 'notification', 'THIS_NODE_NAME': 'controller-0', 'THIS_POD_IP': '172.16.192.70', 'REGISTRATION_TRANSPORT_ENDPOINT': 'rabbit://admin:admin@[registration.notification.svc.cluster.local]:5672', 'NOTIFICATION_TRANSPORT_ENDPOINT': 'rabbit://admin:admin@[172.16.192.70]:5672', 'GNSS_CONFIGS': ['/ptp/linuxptp/ptpinstance/ts2phc-ts1.conf'], 'PHC2SYS_CONFIG': '/ptp/linuxptp/ptpinstance/phc2sys-phc1.conf', 'PHC2SYS_SERVICE_NAME': 'phc1', 'PTP4L_CONFIGS': ['/ptp/linuxptp/ptpinstance/ptp4l-ptp1.conf'], 'GNSS_INSTANCES': ['ts1'], 'PTP4L_INSTANCES': ['ptp1'], 'ptptracker_context': {'device_simulated': 'false', 'holdover_seconds': '15'}, 'gnsstracker_context': {'holdover_seconds': 30}, 'osclocktracker_context': {'holdover_seconds': '15'}, 'overalltracker_context': {'holdover_seconds': '15'}}
Traceback (most recent call last):
  File "/mnt/ptptracking_start.py", line 140, in <module>
    default_daemoncontrol.refresh()
  File "/opt/ptptrackingfunction/trackingfunctionsdk/services/daemon.py", line 739, in refresh
    self.process_worker(self.event, self.sqlalchemy_conf_json, self.daemon_context_json)
  File "/opt/ptptrackingfunction/trackingfunctionsdk/services/daemon.py", line 50, in ProcessWorkerDefault
    worker = PtpWatcherDefault(event, sqlalchemy_conf_json, broker_transport_endpoint)
  File "/opt/ptptrackingfunction/trackingfunctionsdk/services/daemon.py", line 329, in __init__
    self.observer_list = [GnssMonitor(i) for i in self.daemon_context['GNSS_CONFIGS']]
  File "/opt/ptptrackingfunction/trackingfunctionsdk/services/daemon.py", line 329, in <listcomp>
    self.observer_list = [GnssMonitor(i) for i in self.daemon_context['GNSS_CONFIGS']]
  File "/opt/ptptrackingfunction/trackingfunctionsdk/common/helpers/gnss_monitor.py", line 58, in __init__
    self.gnss_cgu_handler.convert_nmea_serialport_to_pci_addr()
  File "/opt/ptptrackingfunction/trackingfunctionsdk/common/helpers/cgu_handler.py", line 50, in convert_nmea_serialport_to_pci_addr
    with open(dmesg_path, 'r') as dmesg:
FileNotFoundError: [Errno 2] No such file or directory: '/logs/dmesg'

Test Activity
-------------
Feature Testing

Workaround
----------
None

Changed in starlingx:
status: New → In Progress
assignee: nobody → Douglas Henrique Koerich (dkoerich-wr)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ptp-notification-armada-app (master)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ptp-notification-armada-app (master)

Reviewed: https://review.opendev.org/c/starlingx/ptp-notification-armada-app/+/863653
Committed: https://opendev.org/starlingx/ptp-notification-armada-app/commit/3b863e60bed0ac197c8716d091407d3e625e9d2e
Submitter: "Zuul (22348)"
Branch: master

commit 3b863e60bed0ac197c8716d091407d3e625e9d2e
Author: Douglas Henrique Koerich <email address hidden>
Date: Fri Nov 4 11:09:23 2022 -0300

    Fix log filename where nmea is searched

    When ptp-notification application is used with a ts2phc instance, the
    name of nmea serial port (ttyGNSS device) is retrieved from the kernel
    logs. This change fixes the look for 'dmesg' file which is not available
    by replacing it by 'kern.log' where that information could be found.

    Test Plan:
    PASS: Updated ptp-notification-ptptracking container running in
          environment with ts2phc instance configured and running.

    Closes-Bug: #1995718
    Signed-off-by: Douglas Henrique Koerich <email address hidden>
    Change-Id: I39a147f2eb626ad843035935de334d9f3dcf33d7

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → High
summary: - PCI address of nmea serial port searched in incorrect file
+ Debian: PCI address of nmea serial port searched in incorrect file
tags: added: stx.8.0 stx.debian stx.networking
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.