From 9fc5423c2b658955a724a513de9402e704b2b74a Mon Sep 17 00:00:00 2001 From: nocturnalastro Date: Wed, 22 Apr 2026 14:52:27 +0100 Subject: [PATCH] Fetch aliases before listening to socket This stops aliases defaulting to the port when cloud-event-proxy restarts but linuxptp-daemon is already running --- plugins/ptp_operator/ptp_operator_plugin.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/ptp_operator/ptp_operator_plugin.go b/plugins/ptp_operator/ptp_operator_plugin.go index fd2379d1..6a9d3baa 100644 --- a/plugins/ptp_operator/ptp_operator_plugin.go +++ b/plugins/ptp_operator/ptp_operator_plugin.go @@ -212,6 +212,10 @@ func Start(wg *sync.WaitGroup, configuration *common.SCConfiguration, _ func(e i log.Warn(err) } eventManager.SetInitalMetrics() + // We must attempt to get aliases here for the case of restarting cloud-event-proxy + // against an extablished linuxptp-daemon, which will have aliases already populated + // and log lines waiting in the buffer. + ptpMetrics.SyncAliasesFromDaemon() wg.Add(1) // create socket listener; the daemon sends log lines and CMD RESTART commands here. // When a new connection is accepted, processMessages calls TriggerLogs() to request