← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1816740] [NEW] FWaaS v2 - incorrect shared rule check

 

Public bug reported:

Reference: http://git.openstack.org/cgit/openstack/neutron-
fwaas/tree/neutron_fwaas/db/firewall/v2/firewall_db_v2.py#n644

    def _check_if_rules_shared_for_policy_shared(self, context, fwp_db, fwp):
        if fwp['shared']:
            rules_in_db = fwp_db.rule_associations
            for entry in rules_in_db:
                fwr_db = self._get_firewall_rule(context,
                                                 entry.firewall_rule_id)
                if not fwp_db['shared']:
                    raise f_exc.FirewallPolicySharingConflict(
                        firewall_rule_id=fwr_db['id'],
                        firewall_policy_id=fwp_db['id'])

The logic above will always raise an exception if a policy is changed
from not shared to shared. There is most likely a typo in:

if not fwp_db['shared']:

as it should be:

if not fwr_db['shared']:

** Affects: neutron
     Importance: Undecided
     Assignee: Salvatore Orlando (salvatore-orlando)
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1816740

Title:
  FWaaS v2 - incorrect shared rule check

Status in neutron:
  New

Bug description:
  Reference: http://git.openstack.org/cgit/openstack/neutron-
  fwaas/tree/neutron_fwaas/db/firewall/v2/firewall_db_v2.py#n644

      def _check_if_rules_shared_for_policy_shared(self, context, fwp_db, fwp):
          if fwp['shared']:
              rules_in_db = fwp_db.rule_associations
              for entry in rules_in_db:
                  fwr_db = self._get_firewall_rule(context,
                                                   entry.firewall_rule_id)
                  if not fwp_db['shared']:
                      raise f_exc.FirewallPolicySharingConflict(
                          firewall_rule_id=fwr_db['id'],
                          firewall_policy_id=fwp_db['id'])

  The logic above will always raise an exception if a policy is changed
  from not shared to shared. There is most likely a typo in:

  if not fwp_db['shared']:

  as it should be:

  if not fwr_db['shared']:

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1816740/+subscriptions


Follow ups