Updating a network can result in an internal server error

Bug #1541560 reported by James Anziano
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Miguel Lavalle

Bug Description

When updating a network with an attribute not technically in the network database table, but still a valid attribute (i.e. dns_domain, which is used by network but stored in a separate table), neutron attempts to update the network table with that field and throws an exception.

To reproduce:
neutron net-update my_network --dns_domain=my-domain.org.
which results in:
Request Failed: internal server error while processing your request.

Openstack version: DevStack all-in-one built from master
Ubuntu 14.04, kernel 3.13.0-24-generic
Perceived severity: medium

Logs of the traceback from q-svc:
http://paste.openstack.org/show/485883/

Tags: l3-ipam-dhcp
James Anziano (janzian)
Changed in neutron:
assignee: nobody → James Anziano (janzian)
description: updated
Revision history for this message
Nate Johnston (nate-johnston) wrote :

I just tried the same thing, and I got different results. The following is on a freshly-created devstack built from master:

devstack@bug-1541560:~/stack$ openstack network create --project 051860cf5dd240f4b491dae0c66437ff test-net
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| availability_zone_hints | [] |
| id | 6ab1d5fc-ff31-4533-9045-7a57ce5b8814 |
| mtu | 1450 |
| name | test-net |
| port_security_enabled | True |
| project_id | 051860cf5dd240f4b491dae0c66437ff |
| provider:network_type | vxlan |
| provider:physical_network | None |
| provider:segmentation_id | 1036 |
| router_type | Internal |
| shared | False |
| state | UP |
| status | ACTIVE |
| subnets | |
+---------------------------+--------------------------------------+

devstack@bug-1541560:~/stack$ neutron net-update test-net --dns_domain=foo.com
Invalid input for dns_domain. Reason: 'foo.com' is not a FQDN.

Revision history for this message
Miguel Lavalle (minsel) wrote :

@James Anziano

I get the same result as you

@Nate Johnston

The value you need to pass in --dns_domain option has to end with '.', because it has to be a FQDN (Fully Qualified Domain Name)

Changed in neutron:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/277560

Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by James Anziano (<email address hidden>) on branch: master
Review: https://review.openstack.org/277560

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

Fix proposed to branch: master
Review: https://review.openstack.org/277597

Changed in neutron:
milestone: none → mitaka-rc1
Changed in neutron:
assignee: James Anziano (janzian) → Miguel Lavalle (minsel)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/277597
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=e0b3665280a136bec4ccc70b4ca13fc59319e471
Submitter: Jenkins
Branch: master

commit e0b3665280a136bec4ccc70b4ca13fc59319e471
Author: James Anziano <email address hidden>
Date: Mon Feb 8 22:35:42 2016 +0000

    Stops update_network handling updates it shouldn't

    Currently update_network() attempts to update the network table with
    any parameters that belong to a network, even if those attributes are
    stored in a separate database table. This was causing certain update
    commands to fail (such as updating dns_domain). The actual update to
    dns_domain is handled by extensions called by the ml2 plugin, but this
    function was also trying to process it and causing an error.

    This patch ensures the network variable is only updated with
    attributes that are actually in the networks table by filtering out
    any parameters that don't match fields in the Network class model.

    Change-Id: I54a736d91de52dda85c559b9e6103199f914abdf
    Closes-bug: 1541560

Changed in neutron:
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.