]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
DHCP agent unable to access port when restarting
authorGary Kotton <gkotton@redhat.com>
Sun, 13 Jan 2013 09:58:55 +0000 (09:58 +0000)
committerGary Kotton <gkotton@redhat.com>
Sun, 13 Jan 2013 10:02:26 +0000 (10:02 +0000)
Fixes bug 1099072

The security groups would return an exception for invalid port ownership.

Change-Id: I8c48adce30b160bd776b5e68bc321e3a2e8cbce2

quantum/db/securitygroups_db.py
quantum/extensions/securitygroup.py

index d31b40daab0bd91716936b68432e7cde2d28f82e..9903a6493f9f377f1548baf805e8af44f1584fe0 100644 (file)
@@ -450,7 +450,7 @@ class SecurityGroupDbMixin(ext_sg.SecurityGroupPluginBase):
         if not attr.is_attr_set(p.get(ext_sg.SECURITYGROUPS)):
             return
         if p.get('device_owner') and p['device_owner'].startswith('network:'):
-            raise ext_sg.SecurityGroupInvalidDeviceOwner()
+            return
 
         valid_groups = self.get_security_groups(context, fields={'id': None})
         valid_groups_set = set([x['id'] for x in valid_groups])
index 424a3ca866f2c483ef35de868b3979d193d632e1..f9c46e0b9bead1b55d258509229ff2e15e5c70da 100644 (file)
@@ -40,10 +40,6 @@ class SecurityGroupInvalidPortValue(qexception.InvalidInput):
     message = _("Invalid value for port %(port)s")
 
 
-class SecurityGroupInvalidDeviceOwner(qexception.InvalidInput):
-    message = _("Security Group can't be applied to network ports.")
-
-
 class SecurityGroupInUse(qexception.InUse):
     message = _("Security Group %(id)s in use.")