RDKC-16495: telemetry(DCMAGENT) async-subscribe to DCM Reloadconfig T2 - DCM - #401
Open
rdkcteam wants to merge 1 commit into
Open
RDKC-16495: telemetry(DCMAGENT) async-subscribe to DCM Reloadconfig T2 - DCM#401rdkcteam wants to merge 1 commit into
rdkcteam wants to merge 1 commit into
Conversation
…M handshake is start-order independent
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the DCM reload-config RBUS event subscription logic (DCMAGENT builds) to avoid a startup ordering issue where telemetry can start before dcmd on sysvinit platforms, causing a one-shot synchronous subscribe to fail permanently.
Changes:
- Added an async subscribe-response callback (
rbusDCMReloadSubscribeHandler) to report eventual subscribe success/failure. - Replaced
rbusEvent_Subscribe(...)withrbusEvent_SubscribeAsync(...)forT2_DCM_RELOAD_EVENTto allow background retry until the provider is available.
Comment on lines
+1189
to
+1194
| ret = rbusEvent_SubscribeAsync(t2bus_handle, | ||
| T2_DCM_RELOAD_EVENT, | ||
| rbusReloadConf, | ||
| rbusDCMReloadSubscribeHandler, | ||
| NULL, | ||
| 0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On RDK-C (sysvinit), telemetry2_0 starts well before dcmd, so telemetry's one-shot synchronous rbusEvent_Subscribe(T2_DCM_RELOAD_EVENT) to dcmd's reload provider fails permanently with "no provider" (err 20) and never retries → dcmEventStatus stays 0, telemetry never publishes Setconfig/Processconfig, and dcmd sits idle. systemd platforms (video/STB) hid this via Before= ordering.
Fix
In registerRbusDCMEventListener() (source/ccspinterface/rbusInterface.c), replace the one-shot sync subscribe with rbusEvent_SubscribeAsync(...) + a new rbusDCMReloadSubscribeHandler callback. rbus retries the subscription in the background until dcmd registers the reload element — the same async mechanism telemetry already uses for Device.DCM.Setconfig/Processconfig. The handshake no longer depends on which daemon starts first.