yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #62881
[Bug 1484290] Re: Neutron migration to Juno breaks router functionality if ports in tenant other than router
[Expired for neutron because there has been no activity for 60 days.]
** Changed in: neutron
Status: Incomplete => Expired
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1484290
Title:
Neutron migration to Juno breaks router functionality if ports in
tenant other than router
Status in neutron:
Expired
Bug description:
During recent upgrade from Icehouse to Juno, we lost all interfaces on
the backside of the router. Plugging the appropriate values into the
neutron.routerports table corrected the issue.
From /usr/local/lib/python2.7/dist-packages/neutron/db/migration/alembic_migrations/versions/544673ac99ab_add_router_port_table.py , I find the SQL statement to populate the routerports table:
...
SQL_STATEMENT = (
"insert into routerports "
"select "
"p.device_id as router_id, p.id as port_id, p.device_owner as port_type "
"from ports p join routers r on (p.device_id=r.id) "
"where "
"(r.tenant_id=p.tenant_id AND p.device_owner='network:router_interface') "
"OR (p.tenant_id='' AND p.device_owner='network:router_gateway')"
)
...
Running the same statement reflects the status of the routerports
table when the issue was discovered:
MariaDB [neutron]> select p.device_id as router_id, p.id as port_id, p.device_owner as port_type from ports p join routers r on (p.device_id=r.id) where (r.tenant_id=p.tenant_id AND p.device_owner='network:router_interface') OR (p.tenant_id='' AND p.device_owner='network:router_gateway');
+--------------------------------------+--------------------------------------+--------------------------+
| router_id | port_id | port_type |
+--------------------------------------+--------------------------------------+--------------------------+
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | 7b280662-37eb-435e-bc20-37b9b824c0b1 | network:router_gateway |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | 8db9bfd3-bd4a-4863-92ef-9c2dbdcbbc0f | network:router_interface |
+--------------------------------------+--------------------------------------+--------------------------+
2 rows in set (0.00 sec)
Removing tenant_id from the WHERE clause seems to be what should have happened. Not sure why we care what the tenant_id is:
MariaDB [neutron]> select p.device_id as router_id, p.id as port_id, p.device_owner as port_type from ports p join routers r on (p.device_id=r.id) where (p.device_owner='network:router_interface') OR (p.device_owner='network:router_gateway');
+--------------------------------------+--------------------------------------+--------------------------+
| router_id | port_id | port_type |
+--------------------------------------+--------------------------------------+--------------------------+
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | 23f676d6-7e71-473a-9685-6955ad02d566 | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | 31412033-c2ac-4843-9cbe-0a580bac2463 | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | 39dbb96e-3862-4246-990f-4dc5d2d0e524 | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | 5c2f484f-75cc-4499-b464-7b44eea70376 | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | 630e7601-2997-447f-ad2c-c14fe5915fc3 | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | 6af57709-c40a-4070-a92a-b5c4e4895a05 | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | 796e8e72-0cde-4c02-9a3c-6eb7afc8393f | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | 7b280662-37eb-435e-bc20-37b9b824c0b1 | network:router_gateway |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | 8db9bfd3-bd4a-4863-92ef-9c2dbdcbbc0f | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | 95fdb58d-1eb4-421f-8515-692c5bd22056 | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | b19f4f0e-a31c-4fc7-b1f4-7d888ba2786d | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | cf1423db-ed37-4028-be57-a83e9e63803a | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | d0021fde-8cb2-4f52-88ef-a01cdb7104ea | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | edbc477f-a92b-46a5-9ae0-0a529541c248 | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | f07d22db-bda7-4b88-aeae-07f63c7e28f4 | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | f2e1b38b-f432-4579-8f14-dfeb9a3a4593 | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | ffcc8003-f331-47d9-9619-bbaf35d9cb60 | network:router_interface |
+--------------------------------------+--------------------------------------+--------------------------+
17 rows in set (0.00 sec)
MariaDB [neutron]> select * from routerports;
+--------------------------------------+--------------------------------------+--------------------------+
| router_id | port_id | port_type |
+--------------------------------------+--------------------------------------+--------------------------+
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | 23f676d6-7e71-473a-9685-6955ad02d566 | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | 31412033-c2ac-4843-9cbe-0a580bac2463 | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | 39dbb96e-3862-4246-990f-4dc5d2d0e524 | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | 5c2f484f-75cc-4499-b464-7b44eea70376 | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | 630e7601-2997-447f-ad2c-c14fe5915fc3 | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | 6af57709-c40a-4070-a92a-b5c4e4895a05 | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | 796e8e72-0cde-4c02-9a3c-6eb7afc8393f | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | 7b280662-37eb-435e-bc20-37b9b824c0b1 | network:router_gateway |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | 8db9bfd3-bd4a-4863-92ef-9c2dbdcbbc0f | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | 95fdb58d-1eb4-421f-8515-692c5bd22056 | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | b19f4f0e-a31c-4fc7-b1f4-7d888ba2786d | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | cf1423db-ed37-4028-be57-a83e9e63803a | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | d0021fde-8cb2-4f52-88ef-a01cdb7104ea | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | edbc477f-a92b-46a5-9ae0-0a529541c248 | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | f07d22db-bda7-4b88-aeae-07f63c7e28f4 | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | f2e1b38b-f432-4579-8f14-dfeb9a3a4593 | network:router_interface |
| 8c5ca5e2-5dc1-4586-8bbe-601a394029fb | ffcc8003-f331-47d9-9619-bbaf35d9cb60 | network:router_interface |
+--------------------------------------+--------------------------------------+--------------------------+
17 rows in set (0.00 sec)
MariaDB [neutron]>
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1484290/+subscriptions
References