Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

Hotfix/dev reset disconnect backhaul #1598

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rmelotte
Copy link
Collaborator

When running wireless backhaul tests, we have to remove the wired
interface from the bridge to avoid creating a loop.

Dynamic backhaul switching is not implemented yet, but we can get away
with it in certification.

When we receive dev_reset_default from the UCC, remove the wired
interface from the bridge. Then, when we get dev_set_config, only add
the wired interface back in the bridge if the test uses wired backhaul.


Also:

Previously the wireless hal was only disconnected in dev_reset if the
FSM state was already is something that comes after ENABLE.

There are some cases however where the disconnect didn't happen.

For example, if the connection is active and we stop and restart
prplMesh, the next dev_reset will not disconnect the wireless
link.

When we are in dev_reset, disconnect the wireless hal if it's active,
regardless of the FSM state.

When running wireless backhaul tests, we have to remove the wired
interface from the bridge to avoid creating a loop.

Dynamic backhaul switching is not implemented yet, but we can get away
with it in certification.

When we receive dev_reset_default from the UCC, remove the wired
interface from the bridge. Then, when we get dev_set_config, only add
the wired interface back in the bridge if the test uses wired backhaul.

Signed-off-by: Raphaël Mélotte <[email protected]>
Previously the wireless hal was only disconnected in dev_reset if the
FSM state was already is something that comes after ENABLE.

There are some cases however where the disconnect didn't happen.

For example, if the connection is active and we stop and restart
prplMesh, the next dev_reset will not disconnect the wireless
link.

When we are in dev_reset, disconnect the wireless hal if it's active,
regardless of the FSM state.

Signed-off-by: Raphaël Mélotte <[email protected]>
@rmelotte rmelotte added the certification Tasks/bugs involving the certification testbed label Aug 13, 2020
@rmelotte rmelotte self-assigned this Aug 13, 2020
Copy link
Collaborator

@mariomaz mariomaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one concern, but since I'm not sure if it's indeed a problem, I'll approve and invite you to check.

// remove the wired interface from the bridge, it will be added on dev_set_config.
if (std::find(bridge_ifaces.begin(), bridge_ifaces.end(), eth_iface) !=
bridge_ifaces.end()) {
if (!network_utils::linux_remove_iface_from_bridge(bridge, eth_iface)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'm wrong, but this might not be enough.

During initialization, backhaul_manager_thread reads what interfaces are in the bridge with network_utils::linux_get_iface_list_from_bridge and then configures the transport process with configure_ieee1905_transport_interfaces. Here you are removing an interface from the bridge but you are not re-configuring the transport process so it'll be unaware of the change. The same happens when you add a new interface to the bridge.

To fix this problem correctly, I think we should be monitoring the bridge for changes and automatically reconfigure the transport process, just in case the bridge is modified from outside prplMesh

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
certification Tasks/bugs involving the certification testbed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants