network router:external value is non-boolean (Internal) which causes server create failure

Bug #1852468 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Invalid
Undecided
Unassigned

Bug Description

I noticed this here:

https://review.opendev.org/#/c/693248/

Nova has this post-test script:

https://zuul.opendev.org/t/openstack/build/540a9fc0dbc64abb92d3f3e513573307/console#4/0/0/controller

Which creates an internal private network:

+ /opt/stack/nova/gate/post_test_hook.sh:main:120 : openstack network create net0 --provider-network-type vlan --provider-physical-network public --provider-segment 100 --project demo
+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
| admin_state_up | UP |
| availability_zone_hints | |
| availability_zones | |
| created_at | 2019-11-13T15:35:09Z |
| description | |
| dns_domain | None |
| id | c0c449d7-267d-42f3-86a1-b27b472edf65 |
| ipv4_address_scope | None |
| ipv6_address_scope | None |
| is_default | False |
| is_vlan_transparent | None |
| location | cloud='', project.domain_id=, project.domain_name=, project.id='5e899e65a6fc46ba9e8bf4210c4a6a2e', project.name=, region_name='RegionOne', zone= |
| mtu | 1450 |
| name | net0 |
| port_security_enabled | True |
| project_id | 5e899e65a6fc46ba9e8bf4210c4a6a2e |
| provider:network_type | vlan |
| provider:physical_network | public |
| provider:segmentation_id | 100 |
| qos_policy_id | None |
| revision_number | 1 |
| router:external | Internal |
| segments | None |
| shared | False |
| status | ACTIVE |
| subnets | |
| tags | |
| updated_at | 2019-11-13T15:35:09Z |
+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+

But note the router:external value is "Internal" rather than false. The API reference says the value should be a boolean:

https://docs.openstack.org/api-ref/network/v2/index.html#external-network

And that's what the nova code expects:

https://github.com/openstack/nova/blob/dcfd74fb37d0be788b24d17d1089f232f05ceed8/nova/network/neutronv2/api.py#L540

This ends up resulting in a failure to create the server:

https://zuul.opendev.org/t/openstack/build/540a9fc0dbc64abb92d3f3e513573307/log/controller/logs/screen-n-cpu.txt.gz#28774

Revision history for this message
Matt Riedemann (mriedem) wrote :

Nevermind about the value, it's openstack CLI that is translating the false value to "Internal":

https://github.com/openstack/python-openstackclient/blob/d17a1c8039807cdac29e77eb5f0724d181bdd831/openstackclient/network/v2/network.py#L33

Changed in neutron:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.