BUG 7264 Fix missing flows for Remote SG rule 93/49193/2
authorVinh Nguyen <vinh.nguyen@hcl.com>
Wed, 7 Dec 2016 19:50:11 +0000 (11:50 -0800)
committerSam Hague <shague@redhat.com>
Sat, 10 Dec 2016 02:15:51 +0000 (02:15 +0000)
commit5155260e9b8d816634bd9389b4d5ae8fc0d83241
tree19669c71f734b34f746e68d502efa56e186db609
parent0a8e7f5665961fb062110ba62a11fba472cb28b5
BUG 7264 Fix missing flows for Remote SG rule
  Problem: Missing SG remote flows to the first VM associated
  with the SG. The sample reproduction scenario as below:
    1. create empty SG1
    2. create VM1 with the SG1
    3. add custom TCP rule to SG1 with remote group id as SG1
    4. create VM2 with the SG1
  There is flow for TCP rule added for VM1 to VM2 but the flow
  from VM2 to VM1 is missing

  Solution: In this problem when in step 3), VM1 is not added to
  the remote SG cache as a first member of the remote SG.
  As a result, in step 4 VM1 is not seen as not associating with
  SG1 and therefore flow to it is not created.
  The fix is to add the VMport-SG association to the remote SG
  cache when the first rule is created for a VM with empty SG

Change-Id: I9f4c500a8ec87659d44801474a92227420a789e2
Signed-off-by: Vinh Nguyen <vinh.nguyen@hcl.com>
openstack/net-virt/src/main/java/org/opendaylight/netvirt/openstack/netvirt/PortSecurityHandler.java
openstack/net-virt/src/main/java/org/opendaylight/netvirt/openstack/netvirt/impl/SecurityGroupCacheManagerImpl.java