l2gw update fails with internal server error while processing your request

Bug #1834331 reported by Lajos Katona
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-l2gw
Fix Released
Undecided
Lajos Katona

Bug Description

Updating an l2gw, but not updating the device information (just the name) the following error is seen:
$ openstack l2gw update gw0 --name gw1
Request Failed: internal server error while processing your request.

neutron-server log contains the following traceback:

neutron-server[18664]: ERROR neutron.api.v2.resource [None req-07f7214e-a27f-45ee-84cc-390e858db5c1 demo admin] update failed: No details.: TypeError: 'NoneType' object is n
ot iterable
neutron-server[18664]: ERROR neutron.api.v2.resource Traceback (most recent call last):
neutron-server[18664]: ERROR neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/resource.py", line 98, in resource
neutron-server[18664]: ERROR neutron.api.v2.resource result = method(request=request, **args)

...

neutron-server[18664]: ERROR neutron.api.v2.resource File "/opt/stack/networking-l2gw/networking_l2gw/services/l2gateway/service_drivers/rpc_l2gw.py", line 643, in update_l2_gateway
neutron-server[18664]: ERROR neutron.api.v2.resource self._validate_gateway_for_update(context, l2_gateway)
neutron-server[18664]: ERROR neutron.api.v2.resource File "/opt/stack/networking-l2gw/networking_l2gw/services/l2gateway/service_drivers/rpc_l2gw.py", line 355, in _validate_gateway_for_update
neutron-server[18664]: ERROR neutron.api.v2.resource for device in devices:
neutron-server[18664]: ERROR neutron.api.v2.resource TypeError: 'NoneType' object is not iterable
neutron-server[18664]: ERROR neutron.api.v2.resource

networking-l2gw branch: master (1d9d37a71ec3e9b104cbb88a6174b9460bb2c61b)
neutron branch: master (b7b399f16e351a708e9e387dfcb32b2845a6d37b)

Changed in networking-l2gw:
assignee: nobody → Lajos Katona (lajos-katona)
Revision history for this message
Lajos Katona (lajos-katona) wrote :

A question should be why the tests in networking-l2gw-tempest-plugin are passing.
My theory is that as networking-l2gw-tempest-dummy job is using the service_driver NETWORKING_L2GW_SERVICE_DRIVER="L2GW:l2gw:networking_l2gw.services.l2gateway.service_drivers.L2gwDriver:default"
 instead of NETWORKING_L2GW_SERVICE_DRIVER="L2GW:l2gw:networking_l2gw.services.l2gateway.service_drivers.rpc_l2gw.L2gwRpcDriver:default", the update works as that code pass for _validate_gateway_for_update is not run.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-l2gw (master)

Fix proposed to branch: master
Review: https://review.opendev.org/667620

Changed in networking-l2gw:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-l2gw (master)

Reviewed: https://review.opendev.org/667620
Committed: https://git.openstack.org/cgit/openstack/networking-l2gw/commit/?id=d57ae1ad770cff8fb352b49605d78ddd86ba856c
Submitter: Zuul
Branch: master

commit d57ae1ad770cff8fb352b49605d78ddd86ba856c
Author: elajkat <email address hidden>
Date: Wed Jun 26 15:54:34 2019 +0200

    Make gateway update work without device info

    _validate_gateway_for_update expects now the gw dict to have device
    dict. The update thus fails in case of updateing the name only for
    example.
    This patch makes this kind of easy updates working.

    Change-Id: I4368e1fdbe3e539c988f82fd90d4c30b426ac1d2
    Closes-Bug: #1834331

Changed in networking-l2gw:
status: In Progress → Fix Released
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.