prplMesh icon indicating copy to clipboard operation
prplMesh copied to clipboard

Make agents wait for dev_set_config/WPS PBC before master discovery

Open vitalii-komisarenko opened this issue 5 years ago • 5 comments

https://jira.prplfoundation.org/browse/PPM-143

In certification mode the agent state machine should stop before the MASTER_DISCOVERY state until dev_set_config is received (wired backhaul) or start_wps_registration (wireless backhaul).

This PR should be merged after PR #1590.

vitalii-komisarenko avatar Jul 28 '20 11:07 vitalii-komisarenko

@vitalii-komisarenko please also check to see if there is any documentation about the state machine. If it exists -> update it Otherwise, it could be good to add it

ghost avatar Jul 30 '20 08:07 ghost

Log entries taken from the agent logs (Filtered to show only the backhaul_manager_thread FSM prints)

From the master branch

TRACE 10:23:42:970 <140023053342464> backhaul_manager_thread.cpp[795] --> FSM: INIT --> WAIT_ENABLE
TRACE 10:23:46:045 <140023053342464> backhaul_manager_thread.cpp[809] --> FSM: WAIT_ENABLE --> ENABLED
TRACE 10:23:46:546 <140023053342464> backhaul_manager_thread.cpp[900] --> FSM: ENABLED --> MASTER_DISCOVERY
TRACE 10:23:46:547 <140023053342464> backhaul_manager_thread.cpp[935] --> FSM: MASTER_DISCOVERY --> SEND_AUTOCONFIG_SEARCH_MESSAGE
TRACE 10:23:47:055 <140023053342464> backhaul_manager_thread.cpp[973] --> FSM: SEND_AUTOCONFIG_SEARCH_MESSAGE --> WAIT_FOR_AUTOCONFIG_RESPONSE_MESSAGE
TRACE 10:23:47:058 <140023053342464> backhaul_manager_thread.cpp[3585] --> FSM: WAIT_FOR_AUTOCONFIG_RESPONSE_MESSAGE --> CONNECT_TO_MASTER
TRACE 10:23:47:058 <140023053342464> backhaul_manager_thread.cpp[983] --> FSM: CONNECT_TO_MASTER --> CONNECTED
TRACE 10:23:47:066 <140023053342464> backhaul_manager_thread.cpp[998] --> FSM: CONNECTED --> OPERATIONAL

From this PR

TRACE 10:26:13:974 <140670739035904> backhaul_manager_thread.cpp[795] --> FSM: INIT --> WAIT_ENABLE
TRACE 10:26:17:060 <140670739035904> backhaul_manager_thread.cpp[809] --> FSM: WAIT_ENABLE --> ENABLED
TRACE 10:26:17:561 <140670739035904> backhaul_manager_thread.cpp[900] --> FSM: ENABLED --> READY_FOR_MASTER_DISCOVERY
ERROR 11:08:03:977 <140671996204800> backhaul_manager_thread.cpp[921] --> m_agent_ucc_listener == nullptr

It looks as if the FSM goes to state READY_FOR_MASTER_DISCOVERY then fails because the listener is null

itayx avatar Aug 04 '20 11:08 itayx

@itayx it is OK if the backhaul is wireless. The change is working only for the wired ones.

vitalii-komisarenko avatar Aug 04 '20 11:08 vitalii-komisarenko

This PR uses changes from PR #1590.

vitalii-komisarenko avatar Aug 13 '20 10:08 vitalii-komisarenko

Approved just make sure not to merge it until #1590 is merged.

morantr avatar Aug 13 '20 11:08 morantr