]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Fix topic for provider security group update
authorKevin Benton <blak111@gmail.com>
Tue, 13 Jan 2015 16:05:19 +0000 (08:05 -0800)
committerKevin Benton <blak111@gmail.com>
Tue, 13 Jan 2015 16:09:58 +0000 (08:09 -0800)
Commit 8098b6bd20bb12520e438ef9125dc7b96664f712 accidentally changed
the topic for the provider security group update to a regular member
update. This resulted in the L2 agent not asking for the latest
security group rules after a DHCP port was created. If a regular
compute port was brought online and wired up by the L2 agent
before the DHCP port was created, the VM would never get its allow
rule to communicate with the DHCP server.

Co-bug-squasher: Armando

Closes-Bug: #1403291
Change-Id: I382f2e1390c9a3ff558e152eeb76f0f827266cb4

neutron/agent/securitygroups_rpc.py
neutron/tests/unit/test_security_groups_rpc.py

index fe6785106010345c587df4c944a72d8ae8b3a51f..46ceab8497f22311a6e50171f797950fb3ccc0cb 100644 (file)
@@ -389,4 +389,4 @@ class SecurityGroupAgentRpcApiMixin(object):
         cctxt = self.client.prepare(version=SG_RPC_VERSION,
                                     topic=self._get_security_group_topic(),
                                     fanout=True)
-        cctxt.cast(context, 'security_groups_member_updated')
+        cctxt.cast(context, 'security_groups_provider_updated')
index eb7b1f9c535af728da11a597d5d32b8a6f7a8a38..b17ecbeadd94a64c0076972d9bf87cde621af20c 100644 (file)
@@ -1644,6 +1644,11 @@ class SecurityGroupAgentRpcApiTestCase(base.BaseTestCase):
         self.mock_cast = mock.patch.object(self.notifier.client,
                 'cast').start()
 
+    def test_security_groups_provider_updated(self):
+        self.notifier.security_groups_provider_updated(None)
+        self.mock_cast.assert_has_calls(
+            [mock.call(None, 'security_groups_provider_updated')])
+
     def test_security_groups_rule_updated(self):
         self.notifier.security_groups_rule_updated(
             None, security_groups=['fake_sgid'])