Cleanup stale flows by cookie and table_id instead of just by cookie

Bug #1887497 reported by gao yu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Opinion
Undecided
Unassigned

Bug Description

Pre-conditions: After restart neutron-ovs-agent.

After I restart neutron-ovs-agent, I found neutron cleanup stale flows only by cookie, and the cookies in different tables always be same, that means I can cleanup flows in table 20 by cookies in table 0! I think the safer way is to cleanup stale flows by cookie and table_id instead of just by cookie.
def cleanup_flows(self):
        LOG.info("Reserved cookies for %s: %s", self.br_name,
                 self.reserved_cookies)

        for table_id in self.of_tables:
            self._dump_and_clean(table_id)

def _dump_and_clean(self, table_id=None):
        cookies = set([f.cookie for f in self.dump_flows(table_id)]) - \
                      self.reserved_cookies
        for c in cookies:
            LOG.warning("Deleting flow with cookie 0x%(cookie)x",
                        {'cookie': c})
            self.uninstall_flows(cookie=c, cookie_mask=ovs_lib.UINT64_BITMASK)
 def uninstall_flows(self, table_id=None, strict=False, priority=0,
                        cookie=COOKIE_DEFAULT, cookie_mask=0,
                        match=None, active_bundle=None, **match_kwargs):
        (dp, ofp, ofpp) = self._get_dp()
        if table_id is None:
            table_id = ofp.OFPTT_ALL
......

Tags: rfe
Revision history for this message
LIU Yulong (dragon889) wrote :
Revision history for this message
Lajos Katona (lajos-katona) wrote :

Hi, thanks for bug report, and thanks Liu for checking.
I feel that this is now more an opinion, and perhaps with some details it can be an RFE, which can be discussed on drivers meeting with the rest of the team, what do you think?

Changed in neutron:
status: New → Opinion
Revision history for this message
gao yu (gaoyublack) wrote :

To LIU:
  Yes,I think self.uninstall_flows(cookie=c, cookie_mask=ovs_lib.UINT64_BITMASK) in functin _dump_and_clean should pass table_id parameter.

tags: added: rfe
gao yu (gaoyublack)
description: updated
Revision history for this message
gao yu (gaoyublack) wrote :

To Lajos:
  OK, I think it can be an RFE.The problem I found can't affect normal network function,but I think the method I prorosed is more logical.This can be discussed on drivers meeting.

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

Other bug subscribers

Remote bug watches

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