-
Notifications
You must be signed in to change notification settings - Fork 32
Make agents wait for dev_set_config/WPS PBC before master discovery #1572
base: master
Are you sure you want to change the base?
Make agents wait for dev_set_config/WPS PBC before master discovery #1572
Conversation
f99aec2
to
5c9b97b
Compare
@vitalii-komisarenko please also check to see if there is any documentation about the state machine. |
786bbd6
to
3b77a85
Compare
Log entries taken from the agent logs (Filtered to show only the backhaul_manager_thread FSM prints) From the master branch
From this PR
It looks as if the FSM goes to state |
@itayx it is OK if the backhaul is wireless. The change is working only for the wired ones. |
afb2904
to
381527e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the added state and I will approve :)
agent/src/beerocks/slave/backhaul_manager/backhaul_manager_thread.cpp
Outdated
Show resolved
Hide resolved
11765be
to
768ce92
Compare
bool backhaul_manager::is_main_agent() { | ||
auto db = AgentDB::get(); | ||
return db->device_conf.local_controller && db->device_conf.local_gw; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO this function is redundant.
It is more clear to see the flags directly, and a logical AND of two flags does not justify creating a function.
Also "main_agent" is a little vague and confusing. For example, we use the term "main agent" to describe the process that contains the backhaul manager and the platform manager.
I really think that this commit should be dropped.
agent/src/beerocks/slave/backhaul_manager/backhaul_manager_thread.cpp
Outdated
Show resolved
Hide resolved
agent/src/beerocks/slave/backhaul_manager/backhaul_manager_thread.cpp
Outdated
Show resolved
Hide resolved
Move front radio configuration from "sPlatformSettings" struct to the AgentDB. Replace the use of front radio settings on the Agent thread to the one on the AgentDB. Removing of the config from the tlvf will take place on future commit. PPM-338 Signed-off-by: Oren Vormaser <[email protected]>
Move "certification_mode" configuration of from "sPlatformSettings" struct to the AgentDB. Replace the use of "certification_mode" settings on the Agent thread to the one on the AgentDB. Removing of the config from the tlvf will take place on future commit. PPM-338 Signed-off-by: Oren Vormaser <[email protected]>
Move "stop_on_failure_attempts" configuration from "sPlatformSettings" struct to the AgentDB. Replace the use of "stop_on_failure_attempts" settings on the Agent thread to the one on the AgentDB. Removing of the config from the tlvf will take place on future commit. PPM-338 Signed-off-by: Oren Vormaser <[email protected]>
Move "client_band_steering_enabled" configuration from "sPlatformSettings" struct to the AgentDB. Replace the use of "client_band_steering_enabled" settings on the Agent thread to the one on the AgentDB. Removing of the config from the tlvf will take place on future commit. PPM-338 Signed-off-by: Oren Vormaser <[email protected]>
Move "client_optimal_path_roaming_enabled" configuration from "sPlatformSettings" struct to the AgentDB. Replace the use of "client_optimal_path_roaming_enabled" settings on the Agent thread to the one on the AgentDB. Removing of the config from the tlvf will take place on future commit. PPM-338 Signed-off-by: Oren Vormaser <[email protected]>
Move "dfs_reentry_enabled" configuration from "sPlatformSettings" struct to the AgentDB. Replace the use of "dfs_reentry_enabled" settings on the Agent thread to the one on the AgentDB. Removing of the config from the tlvf will take place on future commit. PPM-338 Signed-off-by: Oren Vormaser <[email protected]>
Move "client_optimal_path_roaming_prefer_signal_strength_enabled" configuration from "sPlatformSettings" struct to the AgentDB. Replace the use of "client_optimal_path_roaming_prefer_signal_strength_enabled" settings on the Agent thread to the one on the AgentDB. Removing of the config from the tlvf will take place on future commit. PPM-338 Signed-off-by: Oren Vormaser <[email protected]>
Move "client_11k_roaming_enabled" configuration from "sPlatformSettings" struct to the AgentDB. Replace the use of "client_11k_roaming_enabled" settings on the Agent thread to the one on the AgentDB. Removing of the config from the tlvf will take place on future commit. PPM-338 Signed-off-by: Oren Vormaser <[email protected]>
Move "load_balancing_enabled" configuration from "sPlatformSettings" struct to the AgentDB. Replace the use of "load_balancing_enabled" settings on the Agent thread to the one on the AgentDB. Removing of the config from the tlvf will take place on future commit. PPM-338 Signed-off-by: Oren Vormaser <[email protected]>
Move "service_fairness_enabled" configuration from "sPlatformSettings" struct to the AgentDB. Replace the use of "service_fairness_enabled" settings on the Agent thread to the one on the AgentDB. Removing of the config from the tlvf will take place on future commit. PPM-338 Signed-off-by: Oren Vormaser <[email protected]>
Move "rdkb_extensions_enabled" configuration of back radio from "sPlatformSettings" struct to the AgentDB. Replace the use of "rdkb_extensions_enabled" settings on the Agent thread to the one on the AgentDB. Removing of the config from the tlvf will take place on future commit. PPM-338 Signed-off-by: Oren Vormaser <[email protected]>
Remove unused "onboarding" configuration from "sPlatformSettings" struct. Replace the use of "onboarding" with false value. Removing of the config from the tlvf will take place on future commit. PPM-338 Signed-off-by: Oren Vormaser <[email protected]>
Remove of unused fields from sPlatformSettings struct. Those fields have been moved to the Agent_DB and there for no longer needed as part of a beerocks massage. PPM-338 Signed-off-by: Oren Vormaser <[email protected]>
Remove "platform_settings" local variable from son_slave_thread. Replace the use of "platform_settings" to the settings in AgentDB. Removing of the config from the tlvf will take place on future commit. PPM-338 Signed-off-by: Oren Vormaser <[email protected]>
Move "wlan_settings" configuration from son_slave_thread local variable to the AgentDB. Currently son_slave receive "wlan_settings" from platform_manager using "PLATFORM_SON_SLAVE_REGISTER_REQUEST/RESPONSE" messages, and save the settings in a local variable. This transfer will be replaced by the use of agent_db to pass and store "wlan_settings". Removing of "sWlanSettings" from the tlvf will take place on future commit. PPM-338 Signed-off-by: Oren Vormaser <[email protected]>
Signed-off-by: Oren Vormaser <[email protected]>
Remove of unused fields: sPlatformSettings and wlan_settings from PLATFORM_SON_SLAVE_REGISTER_RESPONSE message. Those fields have been moved to the Agent_DB and there for no longer needed as part of this beerocks massage. PPM-338 Signed-off-by: Oren Vormaser <[email protected]>
Synchronization in test_flows.py is implemented by using timeouts. They are too short to pass tests on my personal computer, but they occasionally fail on the CI too. Added more timeouts to make tests more robust. Signed-off-by: Vitalii Komisarenko <[email protected]>
https://jira.prplfoundation.org/browse/PPM-143 Disable operational test for repeaters during environmental docker launch. In certification mode we want to change agents logic to wait for dev_set_config or WPS PBC in order to proceed to master discovery. In environmental docker launch subroutine the check for operational state is done right after launching the containers. One of the options is changing `test_gw_repeater.sh` in order to send dev_set_config there, but for sake of simplicity it was chosen to send dev_set_config in `test_flows.py` (will be introduced in a later commit in this PR). Signed-off-by: Vitalii Komisarenko <[email protected]>
https://jira.prplfoundation.org/browse/PPM-143 Send dev_set_config to the repeaters as a preparation to changing agents logic to wait to dev_set_config or WPS PBC before going to master discovery in certification mode. Signed-off-by: Vitalii Komisarenko <[email protected]>
768ce92
to
c34522d
Compare
This PR uses changes from PR #1590. |
Approved just make sure not to merge it until #1590 is merged. |
} | ||
# Testing for operational status of the repeaters is disabled in PR #1572. | ||
# In certification mode agents shall wait for dev_set_config or WPS PBC, | ||
# so they are inoperational at this stage anyway. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A trade-off solution would have been to redefine the concept of "operational". Some other check should be performed to know if agent is up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, we still check the gateway...
If I am not mistaken, it is used only by test_flow.py
. If something goes wrong, the tests will fail.
But yes, it is not ideal.
agent/src/beerocks/slave/backhaul_manager/backhaul_manager_thread.cpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments but I let them to your consideration, so approving.
c34522d
to
5346b54
Compare
https://jira.prplfoundation.org/browse/PPM-143 In certification mode the state machine of backhaul manager should stop before entering MASTER_DISCOVERY state until dev_set_config (wired backhaul) or start_wps_registration (wireless backhaul) is received. No code change needed for wireless flow. In case of wired flow the exception is made for the agent running on the same machine as controller. In that case UCC listener is present only on the controller, so there is no easy way to send dev_set_config to the agent. Signed-off-by: Vitalii Komisarenko <[email protected]>
5346b54
to
de689cf
Compare
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.