yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #37108
[Bug 1487357] [NEW] No PoolInUse Check when creating VIP
Public bug reported:
>From the lbaasv1 api, there seems to me that many vips could map to the same pool. After reading the code, it turned out to be not. Deducing from below code snippet:
class LoadBalancerPluginDb(loadbalancer.LoadBalancerPluginBase,
base_db.CommonDbMixin):
...
def create_vip(self, context, vip):
...
if v['pool_id']:
# fetching pool again
pool = self._get_resource(context, Pool, v['pool_id'])
# (NOTE): we rely on the fact that pool didn't change between
# above block and here
vip_db['pool_id'] = v['pool_id']
pool['vip_id'] = vip_db['id']
# explicitly flush changes as we're outside any transaction
context.session.flush()
...
...
(neutron_lbaas/db/loadbalancer/loadbalancer_db.py)
the relationship between vip and pool should be 1:1. If this is the case, there should have checked whether pool[vip_id] is null or not and throw a PoolInUse exception if no null value present.
Am I miss anything?
Thanks,
** Affects: neutron
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1487357
Title:
No PoolInUse Check when creating VIP
Status in neutron:
New
Bug description:
From the lbaasv1 api, there seems to me that many vips could map to the same pool. After reading the code, it turned out to be not. Deducing from below code snippet:
class LoadBalancerPluginDb(loadbalancer.LoadBalancerPluginBase,
base_db.CommonDbMixin):
...
def create_vip(self, context, vip):
...
if v['pool_id']:
# fetching pool again
pool = self._get_resource(context, Pool, v['pool_id'])
# (NOTE): we rely on the fact that pool didn't change between
# above block and here
vip_db['pool_id'] = v['pool_id']
pool['vip_id'] = vip_db['id']
# explicitly flush changes as we're outside any transaction
context.session.flush()
...
...
(neutron_lbaas/db/loadbalancer/loadbalancer_db.py)
the relationship between vip and pool should be 1:1. If this is the case, there should have checked whether pool[vip_id] is null or not and throw a PoolInUse exception if no null value present.
Am I miss anything?
Thanks,
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1487357/+subscriptions
Follow ups