source port detail cannot delete when the port chain deleted

Bug #1634433 reported by for
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
networking-sfc
Confirmed
Medium
Unassigned

Bug Description

Hi,
   I face a problem that the source port detail cannot delete when i delete the port chain.
In the source code(networking-sfc/services/sfc/drivers/ovs/driver.py), from the _remove_flowclassifier_port_assoc function,
i know when the length of path_nodes of port detail is 1, the port detail will be deleted. The logical code segment show below:

            pds = self.get_port_details_by_filter(src_pd_filter)
            if pds:
                for pd in pds:
                    # update src_node portpair_details refence info
                    if src_node and pd['id'] in src_node[
                        'portpair_details'
                    ]:
                        LOG.debug("pd info:%s", pd)
                        self.delete_pathport_assoc(src_node['id'], pd['id'])
                        src_node['portpair_details'].remove(pd['id'])

                        if len(pd['path_nodes']) == 1:
                            self.delete_port_detail(pd['id'])
But when i delete the port chain, i log to the sql database to check the "sfc_portpair_details" table. Unfortunately, the port
detail still exists. So i add the LOG.debug("pd info:%s", pd) to check the port detail information. And the result show below:

{'ingress': u'2e0bafbc-50b9-4279-a1b5-eb7c988ae0b5', 'path_nodes': [], 'local_endpoint': u'192.168.122.101', 'egress': u'62349dc8-4729-4cae-9ea7-f255c7561e4d', 'host_id': u'compute', 'id': u'b8a3f98b-02f5-4bd4-8055-72657d0d1d4b', 'segment_id': 1, 'tenant_id': u'91641eb1359e43839670ad93553c2602', 'network_type': u'vxlan', 'mac_address': u'fa:16:3e:37:c1:d5'},

From the result above, the "path_nodes" give the empty list('[]').

    Could you help to check this is a bug? Thank a lot!

Revision history for this message
Louis Fourie (lfourie) wrote :

This is a bug

Changed in networking-sfc:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Mohankumar (mohankumar-n) wrote :

Hi Louis,

 Why you expecting port_pair_details should be deleted ? , we can delete one port_chain and recreate different port_chain with same port_pairs right ?

I can see not only port_pairs all other resources (port_pair_groups , flow_classifiers ) also there in the table .

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.