← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1532696] Re: Created same SG rule to one SG in case of neutron server active-active

 

Reviewed:  https://review.openstack.org/345978
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=fb375bd7a40f6ff86ac1db2134466d0183690f7e
Submitter: Jenkins
Branch:    master

commit fb375bd7a40f6ff86ac1db2134466d0183690f7e
Author: Anh Tran <anhtt@xxxxxxxxxxxxxx>
Date:   Fri Jul 22 17:59:03 2016 +0700

    Prevent duplicate SG rules in 'concurrent requests' case
    
    Problem: The process of transaction is too short.
    In case of concurrent requests, both requests can pass all tests
    and going to write to database. Sometimes the transaction of first
    request closed before the transaction of the second request has been
    open, because of the above problem. So both of them can access the
    latest data (revision number), then passing the StaleDataError and
    writing to database successfully.
    
    This patch moved the _check_for_duplicate_rules_in_db into transaction
    to prevent race condition.
    
    Change-Id: I9ff2bf830c0c9d1114833d33603622f447ee7ca2
    Closes-bug: #1532696


** Changed in: neutron
       Status: In Progress => Fix Released

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

Title:
  Created same SG rule to one SG  in case of neutron server active-
  active

Status in neutron:
  Fix Released

Bug description:
  I had three controller. i found a bug, i can create same security
  group rules to one security group at same timing

  How to reproduce:

  Topology:  http://codepad.org/ff0debPB

  Step 1: Create on security group:
  $ neutron security-group-create test-secgroup

  Step 2: Create multiple security-group-rules that specifying same attributes
  Please run following command from multiple servers at same timing.
  -  On controller1:
  $ neutron security-group-rule-create test-secgroup
  - On controller2:
  $ neutron security-group-rule-create test-secgroup

  After check security-group-rule:

  Running command: $ neutron security-group-rule-list
  This is the result: http://codepad.org/TiFHzopW
  (Plese focus on line 06 and line 15)

  After check database: http://codepad.org/zFogYuVA
  Please focus on record number 03 (line 06) and record number 12 (line 15)

  I think. In originally, one command on controller will be fail and we
  catch a message as following: "Security group rule already exists.
  Rule id is 04a88afd-6378-49e7-b454-17e40755a645.". But currently, two
  commands are success

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


References