← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1421055] [NEW] bulk create gre/vxlan network failed

 

Public bug reported:

I bulk create 1000 vxlan networks, it always failed,  I analyze the reason is bellow:
it does not lock when it allocate segment id

    def allocate_fully_specified_segment(self, session, **raw_segment):
        network_type = self.get_type()
        try:
            with session.begin(subtransactions=True):
                alloc = (session.query(self.model).filter_by(**raw_segment).
                         first())

    def allocate_partially_specified_segment(self, session, **filters):

        network_type = self.get_type()
        with session.begin(subtransactions=True):
            select = (session.query(self.model).
                      filter_by(allocated=False, **filters))

I think it should add a lock when it allocate segment id

** Affects: neutron
     Importance: Undecided
     Assignee: shihanzhang (shihanzhang)
         Status: New

** Changed in: neutron
     Assignee: (unassigned) => shihanzhang (shihanzhang)

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

Title:
  bulk create gre/vxlan network failed

Status in OpenStack Neutron (virtual network service):
  New

Bug description:
  I bulk create 1000 vxlan networks, it always failed,  I analyze the reason is bellow:
  it does not lock when it allocate segment id

      def allocate_fully_specified_segment(self, session, **raw_segment):
          network_type = self.get_type()
          try:
              with session.begin(subtransactions=True):
                  alloc = (session.query(self.model).filter_by(**raw_segment).
                           first())

      def allocate_partially_specified_segment(self, session,
  **filters):

          network_type = self.get_type()
          with session.begin(subtransactions=True):
              select = (session.query(self.model).
                        filter_by(allocated=False, **filters))

  I think it should add a lock when it allocate segment id

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


Follow ups

References