From b44314fdedabb1f3afc3af614e38a9438bef468a Mon Sep 17 00:00:00 2001 From: Gary Kotton Date: Sun, 13 Jan 2013 09:58:55 +0000 Subject: [PATCH] DHCP agent unable to access port when restarting Fixes bug 1099072 The security groups would return an exception for invalid port ownership. Change-Id: I8c48adce30b160bd776b5e68bc321e3a2e8cbce2 --- quantum/db/securitygroups_db.py | 2 +- quantum/extensions/securitygroup.py | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/quantum/db/securitygroups_db.py b/quantum/db/securitygroups_db.py index d31b40daa..9903a6493 100644 --- a/quantum/db/securitygroups_db.py +++ b/quantum/db/securitygroups_db.py @@ -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]) diff --git a/quantum/extensions/securitygroup.py b/quantum/extensions/securitygroup.py index 424a3ca86..f9c46e0b9 100644 --- a/quantum/extensions/securitygroup.py +++ b/quantum/extensions/securitygroup.py @@ -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.") -- 2.45.2