Enable SRP server on OTBR container startup - #342
Conversation
There was a problem hiding this comment.
Code Review
This pull request enables the SRP (Service Registration Protocol) server during the OpenThread Border Router (OTBR) initialization. It adds the "srp server enable" command to both the OTBR startup script and the Python-based OTBR manager during thread topology formation. I have no feedback to provide as there are no review comments.
greens
left a comment
There was a problem hiding this comment.
Do we know why RoutingManager's policy evaluation doesn't reliably complete?
No, this is something that requires investigation, probably by tracing the RoutingManager logs. |
|
Tick the box to add this pull request to the merge queue (same as
|
|
I don't have access to tick the box to merge this PR. |
|
@Mergifyio queue |
☑️ Command disallowed due to command restrictions in the Mergify configuration.Details
|
|
Hi @khodya, I changed the target branch to the one used in v1.7. Let me know if we can proceed with merging into this branch |
|
Merged into v2.16-develop branch (Matter v1.7 version) |
Summary
Explicitly enable the OpenThread SRP server when the OTBR container starts, instead of relying on
RoutingManager's auto-enable heuristic.Problem
otbr_start.shandThreadBorderRouter.form_thread_topology()inotbr_manager.py) form the Thread topology (dataset ... commit active,ifconfig up,thread start,netdata register) but never issuesrp server enable.nrfconnect/otbrimage relies on OpenThread's SRP server auto-enable mode, which only flips the server on onceRoutingManagerfinishes its initial policy evaluation on the infra interface. In this environment (Docker with--network hoston a Raspberry Pi host), that evaluation does not reliably complete, so the SRP server stays disabled indefinitely._matter._tcphost, so nothing is published for the test harness's mDNS/SRP query.wait_for_srp_update()polls for 180s and times out withTestFailure: Unable to find device, even though Thread connectivity itself is healthy.ot-ctl netdata showon the affected OTBR container confirmed the DNS/SRP service entry (service data0x5d) was absent from Network Data until the server was enabled manually viaot-ctl srp server enable.Solution
srp server enableright afternetdata registerin both OTBR startup flows:test_collections/matter/scripts/OTBR/otbr_start.sh(BR_PARAMSlist, shell/manual path).test_collections/matter/sdk_tests/support/otbr_manager/otbr_manager.py(ThreadBorderRouter.form_thread_topology(), harness-managed path).dataset set active/thread startcalls made when switching Thread datasets mid-test, so it only needs to be set once per container lifetime.otbr_srp_restart.shdoingsrp server disable+srp server enable), but it was not wired into any startup path — this change makes the fix automatic.Testing
TC_CNET_4_12.pyagainst a two-OTBR Thread setup; step 7 failed withUnable to find devicewhileot-ctl netdata showon the second OTBR showed no0x5dDNS/SRP service entry.ot-ctl srp server enableon the affected container immediately publishes the0x5dservice entry in Network Data and allows the DUT's SRP registration to be discovered.