[Yahoo-eng-team] [Bug 1487357] [NEW] No PoolInUse Check when creating VIP

2015-08-21 Thread huaxiang
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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp


[Yahoo-eng-team] [Bug 1475172] [NEW] VPNService status doesn't go to PENDING_UPDATE when being updated

2015-07-16 Thread huaxiang
Public bug reported:

In the function update_vpnservice in module neutron-
vpnaas.services.vpn.plugin, it should have existed a statement assigning
PENDING_UPDATE to vpnservice['vpnservice']['status'] before invoke the
corresponding db operation. Am I missing something?

** 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/1475172

Title:
  VPNService status doesn't go to PENDING_UPDATE when being updated

Status in neutron:
  New

Bug description:
  In the function update_vpnservice in module neutron-
  vpnaas.services.vpn.plugin, it should have existed a statement
  assigning PENDING_UPDATE to vpnservice['vpnservice']['status'] before
  invoke the corresponding db operation. Am I missing something?

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp


[Yahoo-eng-team] [Bug 1475173] [NEW] IPsecSiteConnection status doesn't go to PENDING_UPDATE when being updated

2015-07-16 Thread huaxiang
Public bug reported:

In the function update_ipsec_site_connection in module neutron-
vpnaas.services.vpn.plugin, it should have existed a statement assigning
PENDING_UPDATE to
ipsec_site_connection['ipsec_site_connection']['status'] before invoke
the corresponding db operation. Am I missing something?

** 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/1475173

Title:
  IPsecSiteConnection status doesn't go to PENDING_UPDATE when being
  updated

Status in neutron:
  New

Bug description:
  In the function update_ipsec_site_connection in module neutron-
  vpnaas.services.vpn.plugin, it should have existed a statement
  assigning PENDING_UPDATE to
  ipsec_site_connection['ipsec_site_connection']['status'] before invoke
  the corresponding db operation. Am I missing something?

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp