← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1166303] Re: lbaas db: update_pool - need to check the exitance of 'pool_db'

 

_get_resource throws an exception in case pool is not found.

** Changed in: quantum
       Status: New => Invalid

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

Title:
  lbaas db: update_pool - need to check the exitance of  'pool_db'

Status in OpenStack Quantum (virtual network service):
  Invalid

Bug description:
  file:  loadbalncer_db.py

  current code:

    def update_pool(self, context, id, pool):
          p = pool['pool']

          with context.session.begin(subtransactions=True):
              pool_db = self._get_resource(context, Pool, id)
              if p:
                  pool_db.update(p)

          return self._make_pool_dict(pool_db)

  
  should be: (we want to check if the pool exsists in DB)

    def update_pool(self, context, id, pool):
          p = pool['pool']

          with context.session.begin(subtransactions=True):
              pool_db = self._get_resource(context, Pool, id)
              if pool_db:
                  pool_db.update(p)

          return self._make_pool_dict(pool_db)

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