Not able to delete the network - exceptions.NotImplementedError (docs needed)

Bug #1652252 reported by ganesan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Matt Riedemann

Bug Description

Description
===========
I have created the network (NET-2) for assigning floating IP to an instances. There were some problem in bringing interface attached to the router and I am trying to delete and create again.

NET-1
Network Type: flat
Physical Network: physnet1
Segmentation ID: -

NET-2
Network Type: vlan
Physical Network: physnet1
Segmentation ID: 128

Steps to reproduce
==================
1. Create network (Enable External Network)
2. Create subnetwork (Disable DHCP)
3. Add interface to an existing network

4 Delete network

I also tried to remove interface from route , but got an error "Unable to delete interface: dce21efa-765e-4036-a638-254fa6f3c23a"

And then I did "nova net-list"

root@node-1:/var/log/neutron# nova net-list
+--------------------------------------+--------------------+------+
| ID | Label | CIDR |
+--------------------------------------+--------------------+------+
| 462ec7ee-eb70-4a47-a35e-edc8fa8f760d | admin_floating_net | None |
| bce1b871-0ab1-4cee-b96c-3fb3530245a0 | BHLC | None |
| c837a299-7224-468c-ae8a-1884163293b8 | admin_internal_net | None |
+--------------------------------------+--------------------+------+
root@node-1:/var/log/neutron# nova net-delete bce1b871-0ab1-4cee-b96c-3fb3530245a0
ERROR (ClientException): Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<type 'exceptions.NotImplementedError'> (HTTP 500) (Request-ID: req-f362e655-f48e-43b5-b8d3-f4f529f866b1)

Expected result
===============

Network should be deleted

Actual result
=============

ERROR (ClientException): Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<type 'exceptions.NotImplementedError'> (HTTP 500) (Request-ID: req-f362e655-f48e-43b5-b8d3-f4f529f866b1)

Environment
===========

1. Exact version of OpenStack you are running.

Mitaka

root@node-1:~# dpkg -l | grep nova
ii nova-api 2:13.1.1-7~u14.04+mos20 all OpenStack Compute - compute API frontend
ii nova-cert 2:13.1.1-7~u14.04+mos20 all OpenStack Compute - certificate manager
ii nova-common 2:13.1.1-7~u14.04+mos20 all OpenStack Compute - common files
ii nova-conductor 2:13.1.1-7~u14.04+mos20 all OpenStack Compute - conductor service
ii nova-consoleauth 2:13.1.1-7~u14.04+mos20 all OpenStack Compute - Console Authenticator
ii nova-consoleproxy 2:13.1.1-7~u14.04+mos20 all OpenStack Compute - NoVNC proxy
ii nova-scheduler 2:13.1.1-7~u14.04+mos20 all OpenStack Compute - virtual machine scheduler
ii python-nova 2:13.1.1-7~u14.04+mos20 all OpenStack Compute - libraries
ii python-novaclient 2:3.3.1-4~u14.04+mos3 all client library for OpenStack Compute API - Python 2.7
root@node-1:~#

2. Which hypervisor did you use?

Libvirt + KVM

3. Which storage type did you use?

LVM

4. Which networking type did you use?

Neutron with OpenVSwitch

Logs & Configs
==============

I have deployed OpenStack using Fuel 9.0 with following config

1 Controller Node
2 Compute Node

Attached the Nova-API log

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

The os-tenant-networks REST API in Nova has never supported proxying the network delete call to Neutron, so it fails with a 500 as that proxy isn't implemented internally to Nova. You need to use Neutron to delete the network, i.e. neutron net-delete command.

The only thing that nova proxies for networks is listing and showing details about them, but that's also deprecated in the 2.36 microversion in the Newton release.

So basically if you're doing anything with networks and you're using Neutron, you need to use the neutron client (or openstack client).

Also noted in the compute API reference:

http://developer.openstack.org/api-ref/compute/#project-networks-os-tenant-networks-deprecated

But that reference does need to be updated a bit to explain that create/delete aren't implemented when using neutron and will result in an error.

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

I will use this bug to update the API reference documentation for os-tenant-networks, but otherwise it's not something we're going to fix in the compute REST API.

Matt Riedemann (mriedem)
Changed in nova:
assignee: nobody → Matt Riedemann (mriedem)
status: New → Confirmed
summary: - Not able to delete the network - exceptions.NotImplementedError
+ Not able to delete the network - exceptions.NotImplementedError (docs
+ needed)
Changed in nova:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

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

Reviewed: https://review.openstack.org/415760
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=f9bfb72a1c0c0aff48ce20fc60ec37a92361db4b
Submitter: Jenkins
Branch: master

commit f9bfb72a1c0c0aff48ce20fc60ec37a92361db4b
Author: Matt Riedemann <email address hidden>
Date: Thu Dec 29 16:44:22 2016 -0500

    api-ref: add notes about POST/DELETE errors for os-tenant-networks

    After microversion 2.35 all of the os-tenant-networks methods will
    return a 404 response. However, before that, if using neutron:

    - POST will return a 503 error because the NotImplementedError is
      caught and translated to the 503.
    - DELETE will return a 500 error because the NotImplementedError
      is NOT caught so results in a 500.

    The API reference only noted that the API is deprecated since the
    2.36 microversion but doesn't note that POST and DELETE are not
    implemented, so this adds those details for unsuspecting victims.

    Change-Id: I7f256a4c1a6e4247698fcb5ee7c56128c517e29b
    Closes-Bug: #1652252

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 15.0.0.0b3

This issue was fixed in the openstack/nova 15.0.0.0b3 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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