when restart the vpn and l3 agent, the firewall rule apply to all tenants' router.

Bug #1398267 reported by yangzhenyu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Invalid
High
yangzhenyu

Bug Description

Hi all:
   when restart the vpn and l3 agent, the firewall rule apply to all tenants' router.
   step:
   1. Create network and router in A and B tenant.
   2. Create a firewall in A tenant.
   3. Restart vpn and l3 agent serivce.
   4. ip netns exec qrouter-B_router_uuid iptables -L -t filter -vn

Then I find the firewall rule in chain neutron-l3-agent-FORWARD and neutron-vpn-agen-FORWARD.

So I debug the code,and add some code in neutron/services/firewall/agents/l3reference/firewall_l3_agent.py :

     def _process_router_add(self, ri):
        """On router add, get fw with rules from plugin and update driver."""
        LOG.debug(_("Process router add, router_id: '%s'"), ri.router['id'])
        routers = []
        routers.append(ri.router)
        router_info_list = self._get_router_info_list_for_tenant(
            routers,
            ri.router['tenant_id'])
        if router_info_list:
            # Get the firewall with rules
            # for the tenant the router is on.
            ctx = context.Context('', ri.router['tenant_id'])
            fw_list = self.fwplugin_rpc.get_firewalls_for_tenant(ctx)
            LOG.debug(_("Process router add, fw_list: '%s'"),
                      [fw['id'] for fw in fw_list])
            for fw in fw_list:
+++++++++++++++++if fw['tenant_id'] == ri.router['tenant_id']:
                       self._invoke_driver_for_sync_from_plugin(
                        ctx,
                        router_info_list,
                         fw)

My neutron version is icehouse.

Tags: fwaas
description: updated
description: updated
Changed in neutron:
assignee: nobody → Sridhar Gaddam (sridhargaddam)
Changed in neutron:
assignee: Sridhar Gaddam (sridhargaddam) → yangzhenyu (cdyangzhenyu)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/139540

Revision history for this message
Eugene Nikanorov (enikanorov) wrote :

I think this needs to be fixed in the master first

Changed in neutron:
importance: Undecided → High
status: New → Confirmed
tags: added: fwaas
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by yangzhenyu (<email address hidden>) on branch: master
Review: https://review.openstack.org/141540
Reason: ban

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (stable/icehouse)

Change abandoned by yangzhenyu (<email address hidden>) on branch: stable/icehouse
Review: https://review.openstack.org/139540
Reason: ban

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron-fwaas (master)

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

Kyle Mestery (mestery)
Changed in neutron:
milestone: none → liberty-1
status: In Progress → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron-fwaas (master)

Change abandoned by Kyle Mestery (<email address hidden>) on branch: master
Review: https://review.openstack.org/141734
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.

Thierry Carrez (ttx)
Changed in neutron:
milestone: liberty-1 → liberty-2
Revision history for this message
Kyle Mestery (mestery) wrote :

I believe this was addressed during Kilo when we refactored FWaaS to allow FW's to apply per-router.

Changed in neutron:
status: Confirmed → Invalid
Thierry Carrez (ttx)
Changed in neutron:
milestone: liberty-2 → none
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.