[openstack-dev] [Neutron] [neutron-lib] adding a new flag to neutron-lib

2016-03-14 Thread Venkata Anil

Hi All

 I have added a new flag in neutron-lib 
https://review.openstack.org/#/c/291641/3/neutron_lib/constants.py
 and wanted to use that flag in neutron's change 
https://review.openstack.org/#/c/291651/

 How to add the dependency?

 I added neutron-lib change in neutron's change as "Depends-On:" in 
commit message.
 Also added the change suggested in 
https://wiki.openstack.org/wiki/Neutron/Lib as  "Depends-On:" in commit 
message. But still neutron change is not resolving the flag added in 
neutron-lib.


Thanks
Anil





__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Neutron] DVR + L3 HA + L2pop - Mapping out the work

2015-12-06 Thread Venkata Anil

Hi Assaf

I will work on this bug(i.e L3 HA integration with l2pop. I have already 
assigned it to myself).


https://bugs.launchpad.net/neutron/+bug/1522980

Thanks
Anil


On 12/05/2015 04:25 AM, Vasudevan, Swaminathan (PNB Roseville) wrote:

Hi Assaf,
Thanks for putting the list together.
We can help to get the pending patches to be reviewed, if that would help.

Thanks
Swami

-Original Message-
From: Assaf Muller [mailto:amul...@redhat.com]
Sent: Friday, December 04, 2015 2:46 PM
To: OpenStack Development Mailing List (not for usage questions)
Subject: [openstack-dev] [Neutron] DVR + L3 HA + L2pop - Mapping out the work

There's a patch up for review to integrate DVR and L3 HA:
https://review.openstack.org/#/c/143169/

Let me outline all of the work that has to happen before that patch would be 
useful:

In order for DVR + L3 HA to work in harmony, each feature would have to be 
stable on its own. DVR has its share of problems, and this is being tackled 
full on, with more folks joining the good fight soon. L3 HA also has its own 
problems:

* https://review.openstack.org/#/c/238122/
* https://review.openstack.org/#/c/230481/
* https://review.openstack.org/#/c/250040/

DVR requires l2pop, and l2pop on its own is also problematic (Regardless if DVR 
or L3 HA is turned on). One notable issue is that it screws up live migration:
https://bugs.launchpad.net/neutron/+bug/1443421.
I'd really like to see more focus on Vivek's patch that attempts to resolve 
this issue:
https://review.openstack.org/#/c/175383/

Finally the way L3 HA integrates with l2pop is not something I would recommend 
in production, as described here:
https://bugs.launchpad.net/neutron/+bug/1522980. If I cannot find an owner for 
this work I will reach out to some folks soon.

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Neutron] need help in translating sql query to sqlalchemy query

2015-12-01 Thread Venkata Anil

Thanks Sean. I will check that.

Meanwhile I tried this and it is working

port1 = orm.aliased(models_v2.Port, name="port1")
port2 = orm.aliased(models_v2.Port, name="port2")
router_intf_qry = 
context.session.query(RouterPort.router_id).join((port1, 
port1.id==RouterPort.port_id), (port2, 
port2.device_id==RouterPort.router_id)).filter(port1.network_id==int_net_id, 
port2.network_id==ext_net_id).distinct()


   for router in router_intf_qry:
router_id =router.router_id

Thanks
Anil Venkata

On 12/01/2015 06:35 PM, Sean M. Collins wrote:

Consult the API:

http://docs.sqlalchemy.org/en/latest/orm/query.html#sqlalchemy.orm.query.Query.join

In fact, there is already one join happening a couple lines above your
change:

https://github.com/openstack/neutron/blob/stable/liberty/neutron/db/l3_db.py#L800

Most likely, you will also need to use the aliased() function - since
there are some examples that are similar to what you are trying to do -
check out the "Joins to a Target with an ON Clause" section in the first
link.

http://docs.sqlalchemy.org/en/latest/orm/query.html#sqlalchemy.orm.aliased




__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Neutron] need help in translating sql query to sqlalchemy query

2015-12-01 Thread Venkata Anil



On 12/01/2015 09:06 PM, Sean M. Collins wrote:

On Tue, Dec 01, 2015 at 10:22:41AM EST, Venkata Anil wrote:

Thanks Sean. I will check that.

Meanwhile I tried this and it is working

 port1 = orm.aliased(models_v2.Port, name="port1")
 port2 = orm.aliased(models_v2.Port, name="port2")
 router_intf_qry =
context.session.query(RouterPort.router_id).join((port1,
port1.id==RouterPort.port_id), (port2,
port2.device_id==RouterPort.router_id)).filter(port1.network_id==int_net_id,
port2.network_id==ext_net_id).distinct()

for router in router_intf_qry:
 router_id =router.router_id


That looks pretty close. My only suggestion would be to try and see if
you can just alias it once, instead of twice. Basically see if it is
possible to replace all the port1 references with "models_v2.Port"


Thanks Sean. Sure, I will try that suggestion.



__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [Neutron] need help in translating sql query to sqlalchemy query

2015-12-01 Thread Venkata Anil

Hi All

I have the below sql query which - "lists routers connected to given 
internal and external networks"


select DISTINCT routerports.router_id from routerports inner join ports 
as ports1 on (ports1.id=routerports.port_id and 
ports1.network_id=internal_network_id) inner join ports as ports2 on 
(ports2.device_id=routerports.router_id and 
ports2.network_id=external_network_id);


In the above query I am joining port table to routerport table twice.

Can someone help me in translating that to SQLAlchemy query?
This is required for the change 
https://review.openstack.org/#/c/220135/2/neutron/db/l3_db.py

(see review comments)

Thanks
Anil Venkata



__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [neutron] [floatingip] Selecting router for floatingip when subnet is connected to multiple routers

2015-09-21 Thread Venkata Anil

Hi All

I need your opinion on selecting router for floatingip when subnet is 
connected to multiple routers.


When multiple routers connected to a subnet, vm on that subnet will only 
send packets destined for external network to the router with subnet's 
default gateway.
Should we always choose this router(i.e router with subnet's default 
gateway) for floatingip?


We have two scenarios -

1) Multiple routers connected to same subnet and also same external network.
   In this case, which router should we select for floatingip?
   Choose first router in db list or router with default gateway. What 
if router with subnet's default gateway not present?


2) Multiple routers connected to same subnet and different external 
networks.
   In this case, user has the choice to create floatingip on any 
external network( and on the router connected to that external network).
   But this router may not be the one having subnet's default 
gateway.   Should we allow this?


Thanks
Anil Venkata

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev