hash algorithm is not set in group table

Bug #1675289 reported by yong sheng gong
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
networking-sfc
In Progress
Undecided
Ching Sun

Bug Description

$ neutron port-pair-group-create --port-pair pp1 --port-pair-group-parameters 'lb_fields=ip_src&ip_dst' ppg1
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Created a new port_pair_group:
+----------------------------+--------------------------------------+
| Field | Value |
+----------------------------+--------------------------------------+
| description | |
| group_id | 1 |
| id | 2a238d56-b87b-4a7f-a40d-fe3ca087d802 |
| name | ppg1 |
| port_pair_group_parameters | {"lb_fields": ["ip_src", "ip_dst"]} |
| port_pairs | 475f2b7d-05b5-48fd-8fc1-0b6b6bf36154 |
| project_id | c51538a5c1994b429e948f13c3aeddc7 |
| tenant_id | c51538a5c1994b429e948f13c3aeddc7 |
+----------------------------+--------------------------------------+

ubuntu@openstack1:~$ neutron port-chain-create --port-pair-group ppg1 --flow-classifier fc1 --chain-parameters symmetric=true pc
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Created a new port_chain:
+------------------+--------------------------------------------+
| Field | Value |
+------------------+--------------------------------------------+
| chain_id | 1 |
| chain_parameters | {"symmetric": true, "correlation": "mpls"} |
| description | |
| flow_classifiers | ab6ada79-50e1-4c14-acbe-e0c20e49a90d |
| id | 335c3945-6335-449f-9e34-60aad1a34a9e |
| name | pc |
| port_pair_groups | 2a238d56-b87b-4a7f-a40d-fe3ca087d802 |
| project_id | c51538a5c1994b429e948f13c3aeddc7 |
| tenant_id | c51538a5c1994b429e948f13c3aeddc7 |
+------------------+--------------------------------------------+

but the group table does not set the hashing method:

ubuntu@openstack1:~$ sudo ovs-ofctl -Oopenflow13 dump-groups br-int
OFPST_GROUP_DESC reply (OF1.3) (xid=0x2):
 group_id=7001,type=select,bucket=actions=set_field:fa:16:3e:78:f8:e1->eth_dst,resubmit(,5)

Revision history for this message
Ching Sun (chingsun) wrote :

I will add "selection_method='hash' in add_group method.

Changed in networking-sfc:
status: New → Confirmed
assignee: nobody → Ching Sun (chingsun)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-sfc (master)

Fix proposed to branch: master
Review: https://review.openstack.org/461953

Revision history for this message
Bernard Cafarelli (bcafarel) wrote :

Pasting my comment from the review:
From what I just checked, setting selection_method requires OpenFlow1.5.
You can check by manually running ovs-ofctl commands, the selection_method will not appear in a later dump-groups call.

Additionally, this does not address the bug itself, as the fields field itself is not visible in the ovs groups (this requires OpenFlow 1.5 too)

And now I am wondering, do we actually pass lb_fields to the OVS driver? I do not see that in the code. And I am a little worried about this one, it sounds too OVS-specific, how do other drivers react to something like fields=ip_src,ip_dst?

OK, so to fix it here:
* looks like OpenFlow 1.5 is needed here
* selection_method is not set (Ching Sun's patch)
* lb_fields are not passed either (including the default ones we should use)
* some load balancing tests would help too to monitor this kind of problems

Thoughts?

Revision history for this message
Bernard Cafarelli (bcafarel) wrote :

Some additional research

Without "hash" method, ovs will use the default xlate_default_select_group() method, which uses all these parameters:
https://github.com/openvswitch/ovs/commit/1d1aae0b2f9a149bf74000d975fbf29d133cd9ca

So load balancing should actually be OK, even if not on the fields specified in the spec:
https://github.com/openstack/networking-sfc/blob/master/doc/source/ovs_driver_and_agent_workflow.rst#group-table-flows

The fix should be:
* enable OpenFlow 1.5
* set selection_method to "hash"
* use lb_fields for selection parameters
* else use default selection parameters ip_src,nw_proto,tp_src

Does this sound right?

Revision history for this message
Bernard Cafarelli (bcafarel) wrote :

@chingsun are you still working on this? If not I can take over, as I'd like to see this properly and completely fixed for Pike.
Outline plan in #4 looks like the way to go for this

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on networking-sfc (master)

Change abandoned by Armando Migliaccio (<email address hidden>) on branch: master
Review: https://review.openstack.org/461953
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.