Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrected wrong flow_mod sent to deletion #497

Merged
merged 3 commits into from
Aug 23, 2024
Merged

Conversation

Alopalao
Copy link

@Alopalao Alopalao commented Aug 20, 2024

Closes #496
Closes #489

Summary

Corrected flow deletion for old_paths which was sending incorrect flows.

Local Tests

Replicate issue

End-to-End Tests

Created e2e test PR to test this PR.

+ python3 -m pytest tests/ --reruns 2 -r fEr
============================= test session starts ==============================
platform linux -- Python 3.11.2, pytest-8.1.1, pluggy-1.5.0
rootdir: /tests
plugins: rerunfailures-13.0, timeout-2.2.0, anyio-4.3.0
collected 267 items

tests/test_e2e_01_kytos_startup.py ..                                    [  0%]
tests/test_e2e_05_topology.py ..................                         [  7%]
tests/test_e2e_06_topology.py ....                                       [  8%]
tests/test_e2e_10_mef_eline.py ..........ss.....x.....x................  [ 23%]
tests/test_e2e_11_mef_eline.py ......                                    [ 26%]
tests/test_e2e_12_mef_eline.py .....Xx.                                  [ 29%]
tests/test_e2e_13_mef_eline.py ....Xs.s.....Xs.s.XXxX.xxxx..X........... [ 44%]
.                                                                        [ 44%]
tests/test_e2e_14_mef_eline.py x                                         [ 45%]
tests/test_e2e_15_mef_eline.py .....                                     [ 47%]
tests/test_e2e_16_mef_eline.py ..                                        [ 47%]
tests/test_e2e_20_flow_manager.py ......................                 [ 56%]
tests/test_e2e_21_flow_manager.py ...                                    [ 57%]
tests/test_e2e_22_flow_manager.py ...............                        [ 62%]
tests/test_e2e_23_flow_manager.py ..............                         [ 68%]
tests/test_e2e_30_of_lldp.py .R...                                       [ 69%]
tests/test_e2e_31_of_lldp.py ...                                         [ 70%]
tests/test_e2e_32_of_lldp.py ...                                         [ 71%]
tests/test_e2e_40_sdntrace.py ...........R.....                          [ 77%]
tests/test_e2e_41_kytos_auth.py ........                                 [ 80%]
tests/test_e2e_42_sdntrace.py ..                                         [ 81%]
tests/test_e2e_50_maintenance.py ............................            [ 92%]
tests/test_e2e_60_of_multi_table.py .....                                [ 94%]
tests/test_e2e_70_kytos_stats.py ........                                [ 97%]
tests/test_e2e_80_pathfinder.py ss......                                 [100%]

@Alopalao Alopalao requested a review from a team as a code owner August 20, 2024 18:44
@Alopalao
Copy link
Author

Would this be version 2024.1.1?

Copy link
Member

@viniarck viniarck left a comment

Choose a reason for hiding this comment

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

Appreciated this fix @Alopalao. Overall looks good.

Yes, it should be 2024.1.1 bump kytos.json and update changelog accordingly.

ui/k-info-panel/show_circuit.kytos Show resolved Hide resolved
dpid_flows[dpid].append({
"cookie": flow["cookie"],
"match": flow["match"],
"cookie_mask": int(0xffffffffffffffff)
Copy link
Member

Choose a reason for hiding this comment

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

The cookie_mask fix itself looks good, and it should work since table_id defaults to 0.

Since this is a specific match deletion for a given flow and not all flows of a dpid, parametrizing the table_id value should be the way to go. But I just realized that we also have this problem for other deletions too on mef_eline, none of them are parametrizing table_id and a flow mod deletion message serialized defaults to 0.

Can you confirm that for mef_eline if using a different table indeed it would leave flows behind? No need to fix that part on this PR, let's just confirm the issue and map it, and then address/prioritize later.

Copy link
Author

Choose a reason for hiding this comment

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

They are deleted. But the action is only taken in the database then consistency check from flow_manager checks database and then deletes the correct flows in the topology.

Copy link
Member

Choose a reason for hiding this comment

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

Cool. Great to have this confirmation, yes, the behavior isn't great. So, for cases where mef_eline isn't using table 0 this becomes a bit cumbersome. I mapped a new issue kytos-ng/flow_manager#195 not set for version 2024.1 since in prod we know that mef_eline is only at table 0 for now, let's see how that will unfold and we'll reasess later.

Copy link
Member

@viniarck viniarck left a comment

Choose a reason for hiding this comment

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

LGTM. Considered this approved.

@Alopalao, let's use this same PR to also ship issue #498 that you're also working on, that way we don't need to bump another version, OK? It'll be great to also exercise with 300+ EVCs a few convergence events with the fix, I don't expect much surprises but let's exercise it too.

@Alopalao
Copy link
Author

Tried with 400 EVCs and have not found any issues or errors. The flows are deleted. old_path flows are deleted only after flow_manager consistency check is triggered. Pacer was hit multiple times logging this message:
Limited reached: (100 per 1 second, 'flow_manager.send_flow_mod.mef_eline', '00:00:00:00:00:00:00:03')

@viniarck
Copy link
Member

Tried with 400 EVCs and have not found any issues or errors. The flows are deleted. old_path flows are deleted only after flow_manager consistency check is triggered. Pacer was hit multiple times logging this message: Limited reached: (100 per 1 second, 'flow_manager.send_flow_mod.mef_eline', '00:00:00:00:00:00:00:03')

Excellent. Let's ship it then.

@viniarck viniarck self-requested a review August 23, 2024 12:24
Copy link
Member

@viniarck viniarck left a comment

Choose a reason for hiding this comment

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

LGTM. Let's ship it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants