Re: [ovs-discuss] OVN: configuration in Neutron DB?
Thanks Numan! Tony From: Numan Siddique Sent: July 28, 2020 11:41 PM To: Tony Liu Cc: ovs-discuss@openvswitch.org ; ovs-...@openvswitch.org ; Daniel Alvarez Sanchez ; Lucas Alvares Gomes Martins Subject: Re: [ovs-discuss] OVN: configuration in Neutron DB? Adding Daniel and Lucas. Maybe you can also include opendev ML to get appropriate responses from the OpenStack side. Please see below for few comments. On Wed, Jul 29, 2020 at 12:02 PM Tony Liu mailto:tonyliu0...@hotmail.com>> wrote: Quick update. I changed the script to create 256 routers first, then set each of them as gateway. There is no create and set back to back. It seems working fine now. It would be good someone can clarify my questions. It seems that it's not guaranteed that the object is ready when client get OK response of creation request. Is this expected? Thanks! Tony From: dev mailto:ovs-dev-boun...@openvswitch.org>> on behalf of Tony Liu mailto:tonyliu0...@hotmail.com>> Sent: July 28, 2020 10:37 PM To: ovs-discuss@openvswitch.org<mailto:ovs-discuss@openvswitch.org> mailto:ovs-discuss@openvswitch.org>>; ovs-...@openvswitch.org<mailto:ovs-...@openvswitch.org> mailto:ovs-...@openvswitch.org>> Subject: [ovs-dev] OVN: configuration in Neutron DB? Hi, In case of integration with OpenStack, for example, when a client requests to create a network, is this network configuration saved in both Neutron DB and OVN DB, or OVN DB only? The neutron API first saves in the neutron db and the neutron OVN mechanism driver will talk to the Northbound ovsdb-server and create corresponding OVN logical resources. Also, when a client gets a network from Neutron API, is the configuration read from Neutron DB or OVN DB? I think its read from the neutron DB. Other than coding, is there any doc about how Neutron OVN ML2 driver works? You can refer here - https://docs.openstack.org/neutron/latest/admin/ovn/refarch/refarch.html I have this script to create 256 routers and set each of them as gateway. router() { local op=$1 for c in `seq 0 1 255`; do echo "INFO: $op router-$c..." openstack router $op router-$c if [ "$op" == "create" ]; then openstack router set \ --external-gateway public \ --fixed-ip ip-address=10.6.33.$c \ --disable-snat \ router-$c fi done } I see lots failures from Neutron log when get/show a router. It seems like that, when setting a router, the router is not completely ready yet. Is it possible? After running that script, I see some logical routers in ovn-nb-db don't have gw_port_id. And there are some duplications. Here is an example. Each of them has unique UUID. external_ids: {"neutron:gw_port_id"="", "neutron:revision_number"="1", "neutron:router_name"=router-255} external_ids: {"neutron:gw_port_id"="", "neutron:revision_number"="1", "neutron:router_name"=router-232} external_ids: {"neutron:gw_port_id"="", "neutron:revision_number"="0", "neutron:router_name"=router-158} external_ids: {"neutron:gw_port_id"="", "neutron:revision_number"="0", "neutron:router_name"=router-158} external_ids: {"neutron:gw_port_id"="e52dda53-c914-4ea7-840b-8632a5770680", "neutron:revision_number"="2", "neutron:router_name"=router-158} I enabled nb-db debug logging and searched, eg. router-158, it only shows in a jsonrpc reply message including 3 router-158, as the above. Any clues? Maybe Daniel/Lucas can comment. Thanks Numan Thanks! Tony ___ dev mailing list d...@openvswitch.org<mailto:d...@openvswitch.org> https://mail.openvswitch.org/mailman/listinfo/ovs-dev ___ discuss mailing list disc...@openvswitch.org<mailto:disc...@openvswitch.org> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss ___ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
Re: [ovs-discuss] OVN: configuration in Neutron DB?
Adding Daniel and Lucas. Maybe you can also include opendev ML to get appropriate responses from the OpenStack side. Please see below for few comments. On Wed, Jul 29, 2020 at 12:02 PM Tony Liu wrote: > Quick update. I changed the script to create 256 routers first, then set > each of them as gateway. > There is no create and set back to back. It seems working fine now. > > It would be good someone can clarify my questions. It seems that it's > not guaranteed that the > object is ready when client get OK response of creation request. Is this > expected? > > > Thanks! > > Tony > > -- > *From:* dev on behalf of Tony Liu < > tonyliu0...@hotmail.com> > *Sent:* July 28, 2020 10:37 PM > *To:* ovs-discuss@openvswitch.org ; > ovs-...@openvswitch.org > *Subject:* [ovs-dev] OVN: configuration in Neutron DB? > > Hi, > > In case of integration with OpenStack, for example, when a client requests > to create a network, > is this network configuration saved in both Neutron DB and OVN DB, or OVN > DB only? > The neutron API first saves in the neutron db and the neutron OVN mechanism driver will talk to the Northbound ovsdb-server and create corresponding OVN logical resources. > Also, when a client gets a network from Neutron API, is the configuration > read from Neutron DB > or OVN DB? > I think its read from the neutron DB. > > Other than coding, is there any doc about how Neutron OVN ML2 driver works? > You can refer here - https://docs.openstack.org/neutron/latest/admin/ovn/refarch/refarch.html > > I have this script to create 256 routers and set each of them as gateway. > router() > { > local op=$1 > > for c in `seq 0 1 255`; do > echo "INFO: $op router-$c..." > openstack router $op router-$c > if [ "$op" == "create" ]; then > openstack router set \ > --external-gateway public \ > --fixed-ip ip-address=10.6.33.$c \ > --disable-snat \ > router-$c > fi > done > } > I see lots failures from Neutron log when get/show a router. It seems like > that, when setting a router, > the router is not completely ready yet. Is it possible? > > After running that script, I see some logical routers in ovn-nb-db don't > have gw_port_id. And there > are some duplications. Here is an example. Each of them has unique UUID. > > external_ids: {"neutron:gw_port_id"="", > "neutron:revision_number"="1", "neutron:router_name"=router-255} > external_ids: {"neutron:gw_port_id"="", > "neutron:revision_number"="1", "neutron:router_name"=router-232} > external_ids: {"neutron:gw_port_id"="", > "neutron:revision_number"="0", "neutron:router_name"=router-158} > external_ids: {"neutron:gw_port_id"="", > "neutron:revision_number"="0", "neutron:router_name"=router-158} > external_ids: > {"neutron:gw_port_id"="e52dda53-c914-4ea7-840b-8632a5770680", > "neutron:revision_number"="2", "neutron:router_name"=router-158} > > I enabled nb-db debug logging and searched, eg. router-158, it only shows > in a jsonrpc reply message > including 3 router-158, as the above. > > Any clues? > > Maybe Daniel/Lucas can comment. Thanks Numan > > Thanks! > > Tony > > > > ___ > dev mailing list > d...@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > ___ > discuss mailing list > disc...@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-discuss > ___ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
Re: [ovs-discuss] OVN: configuration in Neutron DB?
Quick update. I changed the script to create 256 routers first, then set each of them as gateway. There is no create and set back to back. It seems working fine now. It would be good someone can clarify my questions. It seems that it's not guaranteed that the object is ready when client get OK response of creation request. Is this expected? Thanks! Tony From: dev on behalf of Tony Liu Sent: July 28, 2020 10:37 PM To: ovs-discuss@openvswitch.org ; ovs-...@openvswitch.org Subject: [ovs-dev] OVN: configuration in Neutron DB? Hi, In case of integration with OpenStack, for example, when a client requests to create a network, is this network configuration saved in both Neutron DB and OVN DB, or OVN DB only? Also, when a client gets a network from Neutron API, is the configuration read from Neutron DB or OVN DB? Other than coding, is there any doc about how Neutron OVN ML2 driver works? I have this script to create 256 routers and set each of them as gateway. router() { local op=$1 for c in `seq 0 1 255`; do echo "INFO: $op router-$c..." openstack router $op router-$c if [ "$op" == "create" ]; then openstack router set \ --external-gateway public \ --fixed-ip ip-address=10.6.33.$c \ --disable-snat \ router-$c fi done } I see lots failures from Neutron log when get/show a router. It seems like that, when setting a router, the router is not completely ready yet. Is it possible? After running that script, I see some logical routers in ovn-nb-db don't have gw_port_id. And there are some duplications. Here is an example. Each of them has unique UUID. external_ids: {"neutron:gw_port_id"="", "neutron:revision_number"="1", "neutron:router_name"=router-255} external_ids: {"neutron:gw_port_id"="", "neutron:revision_number"="1", "neutron:router_name"=router-232} external_ids: {"neutron:gw_port_id"="", "neutron:revision_number"="0", "neutron:router_name"=router-158} external_ids: {"neutron:gw_port_id"="", "neutron:revision_number"="0", "neutron:router_name"=router-158} external_ids: {"neutron:gw_port_id"="e52dda53-c914-4ea7-840b-8632a5770680", "neutron:revision_number"="2", "neutron:router_name"=router-158} I enabled nb-db debug logging and searched, eg. router-158, it only shows in a jsonrpc reply message including 3 router-158, as the above. Any clues? Thanks! Tony ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev ___ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
[ovs-discuss] OVN: configuration in Neutron DB?
Hi, In case of integration with OpenStack, for example, when a client requests to create a network, is this network configuration saved in both Neutron DB and OVN DB, or OVN DB only? Also, when a client gets a network from Neutron API, is the configuration read from Neutron DB or OVN DB? Other than coding, is there any doc about how Neutron OVN ML2 driver works? I have this script to create 256 routers and set each of them as gateway. router() { local op=$1 for c in `seq 0 1 255`; do echo "INFO: $op router-$c..." openstack router $op router-$c if [ "$op" == "create" ]; then openstack router set \ --external-gateway public \ --fixed-ip ip-address=10.6.33.$c \ --disable-snat \ router-$c fi done } I see lots failures from Neutron log when get/show a router. It seems like that, when setting a router, the router is not completely ready yet. Is it possible? After running that script, I see some logical routers in ovn-nb-db don't have gw_port_id. And there are some duplications. Here is an example. Each of them has unique UUID. external_ids: {"neutron:gw_port_id"="", "neutron:revision_number"="1", "neutron:router_name"=router-255} external_ids: {"neutron:gw_port_id"="", "neutron:revision_number"="1", "neutron:router_name"=router-232} external_ids: {"neutron:gw_port_id"="", "neutron:revision_number"="0", "neutron:router_name"=router-158} external_ids: {"neutron:gw_port_id"="", "neutron:revision_number"="0", "neutron:router_name"=router-158} external_ids: {"neutron:gw_port_id"="e52dda53-c914-4ea7-840b-8632a5770680", "neutron:revision_number"="2", "neutron:router_name"=router-158} I enabled nb-db debug logging and searched, eg. router-158, it only shows in a jsonrpc reply message including 3 router-158, as the above. Any clues? Thanks! Tony ___ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss