Tuesday, 2017-01-31

*** bobmel has joined #openstack-net-bgpvpn00:31
*** bobmel has quit IRC00:36
*** bobmel has joined #openstack-net-bgpvpn02:58
*** bobmel has quit IRC03:03
*** bobmel has joined #openstack-net-bgpvpn05:25
*** bobmel has quit IRC05:30
*** tmorin has joined #openstack-net-bgpvpn07:57
*** tmorin has quit IRC08:25
*** tmorin has joined #openstack-net-bgpvpn08:26
*** bobmel has joined #openstack-net-bgpvpn09:28
*** tmorin has quit IRC09:30
*** bfernando has joined #openstack-net-bgpvpn09:34
*** mickeys has quit IRC09:48
*** tmorin has joined #openstack-net-bgpvpn10:14
*** mickeys has joined #openstack-net-bgpvpn10:49
*** mickeys has quit IRC10:54
*** bobmel has quit IRC11:31
*** mickeys has joined #openstack-net-bgpvpn11:50
*** mickeys has quit IRC11:54
*** bobmel has joined #openstack-net-bgpvpn12:10
*** tmorin1 has joined #openstack-net-bgpvpn12:16
*** tmorin has quit IRC12:17
*** bobmel has quit IRC12:17
*** bobmel has joined #openstack-net-bgpvpn12:18
*** bobmel has joined #openstack-net-bgpvpn12:19
*** tmorin1 has quit IRC12:21
*** tmorin has joined #openstack-net-bgpvpn12:27
*** tmorin has quit IRC12:31
*** tmorin has joined #openstack-net-bgpvpn12:50
*** mickeys has joined #openstack-net-bgpvpn12:51
*** mickeys has quit IRC12:55
*** tmorin has quit IRC13:06
*** tmorin has joined #openstack-net-bgpvpn13:06
openstackgerritMerged openstack/networking-bgpvpn: Remove doc modindex ref  https://review.openstack.org/42678113:22
*** mickeys has joined #openstack-net-bgpvpn13:52
*** mickeys has quit IRC13:57
*** mickeys has joined #openstack-net-bgpvpn14:54
*** mickeys has quit IRC14:59
*** mickeys has joined #openstack-net-bgpvpn15:54
*** mickeys has quit IRC15:59
doudetmorin: from what I understand db based driver heritate from neutron db_mixin and from that mixin it seems filter resource which at least one value match16:05
doudehttps://github.com/openstack/neutron/blob/master/neutron/db/common_db_mixin.py#L16116:05
tmorinI interpret this code as doing the following: add a condition to the query that column (e.g 'networks') is in value (e.g. <uuid-foo>)16:20
tmorinin the case where column is a list, I think it can't work16:22
tmorinwhich would explain why i've never found how to filter on list attributes in neutron API16:22
doudetmorin: I don't know if a sql table column can contains a list16:30
tmorinwell this isn't an sql column here in fact, but a column in the sqlalchemy representation16:31
tmorinI'm not sure about the details16:31
tmorinthis is only my understanding16:31
doudebut in bgpvpn case the network and router associations columns are relation ships with network and router tables16:31
doudeI think we hit the code case https://github.com/openstack/neutron/blob/master/neutron/db/common_db_mixin.py#L15516:32
doudeit should work16:32
tmorincolum in this sense: https://github.com/openstack/networking-bgpvpn/blob/master/networking_bgpvpn/neutron/db/bgpvpn_db.py#L5116:32
doudecan you provide me a local.conf file to run a devstack/bagpipe on master branch?16:33
tmorinsorry, wrong line16:33
tmorinhmm I'm not sure16:34
tmorinthe networks in a bgpvpn resource are retrieved thanks to this definition: https://github.com/openstack/networking-bgpvpn/blob/master/networking_bgpvpn/neutron/db/bgpvpn_db.py#L8916:34
tmorinbut this does not directly define the 'networks' attribute16:35
doudeyes I think we have a mapping between api attribut name and db column name16:36
tmorinnetworks is defined here: https://github.com/openstack/networking-bgpvpn/blob/master/networking_bgpvpn/neutron/db/bgpvpn_db.py#L11316:36
doudeyes that will be difficult to filter it during the db query16:38
tmorinyes16:38
doudethe sub resource complexifies lot of things16:39
tmorinyes, true :-(16:39
doudedo you have in mind some use case where we need to add attributs to a bgpvpn resource association?16:40
tmorinwe initially thought that static routes could be added as attribute of a port_associations16:41
tmorinand we thought about adding a flag to router_association to control whether or not extra_routes should be advertised into the BGPVPN16:42
tmorinsimilarly, net_associations could have a flag to control whether subnet host_routes would be advertised in the BGPVPN16:42
tmorindefining a static route as an attribute of the port_association (for the port that is the next_hop of the route) is only one option among many16:43
tmorinand this options (I noticed this recently) does not work well at all in the case where a port is associated to more than one BGPVPN16:44
tmorinwe would define the static route on one port association (for one BGPVPN), and if other associations are added, then we would have to not advertise the static route to these other BGPVPNs -- it doesn't play out very nicely16:45
tmorinI think we should be able to build an sqlalchemy query that would join the BGPVPN and bgpvpn_network_associations tables filtering to keep only lines for which network_id is in a given list16:52
tmorinthe common db mixin will not do that for us, but its doable in sqlalchemy I think16:52
*** mickeys has joined #openstack-net-bgpvpn16:55
tmorinunless the AssociationProxy is the kind of thing that could allow sqlalchemy to do that for us16:56
tmorinit seems that it might be : http://docs.sqlalchemy.org/en/latest/orm/extensions/associationproxy.html16:56
tmorin(the example is not far from the relationship we have)16:56
tmorinso perhaps the code at https://github.com/openstack/neutron/blob/master/neutron/db/common_db_mixin.py#L155 that you linked earlier could serve us, but we would have to modify our model to define the right association proxy16:57
tmorinsomething like adding    "networks = association_proxy('network_associations', 'network_id')" to the BGPVPN DB model16:58
*** mickeys has quit IRC17:00
tmorinhmm, I've just tried17:08
tmorinI'm getting a "sqlalchemy.exc.InvalidRequestError: stale association proxy, parent object has gone out of scope" that I don't understand17:09
tmorinassociation proxies don't seem to be widespread: http://codesearch.openstack.org/?q=associationproxy17:11
tmorin...17:11
tmorintime to go home for me17:11
tmorinbye doude, if you were still reading...17:11
*** tmorin has quit IRC17:15
*** mickeys has joined #openstack-net-bgpvpn17:39
*** bfernando has quit IRC18:04
*** bobmel has quit IRC23:08
*** bobmel has joined #openstack-net-bgpvpn23:09
*** bobmel has quit IRC23:15

Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!