[VPNaaS] NotImplementedError at /project/vpn/ when deleting a vpn service

Bug #1252330 reported by Yves-Gwenael Bourhis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Undecided
Tatiana Ovchinnikova

Bug Description

First activae VPNaaS : https://wiki.openstack.org/wiki/Neutron/VPNaaS/HowToInstall

Follow the procedure in the URL above to set up a VPN.
Then, in the horizon UI at the "/project/vpn/?tab=vpntabs__vpnservices" url, click on the "delete" button of a vpn (Without having deleted the related IPSec connection in "/project/vpn/?tab=vpntabs__ipsecsiteconnections").

This error then gets raised:

WARNING 2013-11-18 15:53:26,947 /home/yves/openstack/horizon/horizon/exceptions.py:310 handle Recoverable error: 409-{u'NeutronError': {u'message': u'VPNService 830bc5be-de8c-414a-b540-869cecca9684 is still in use', u'type': u'VPNServiceInUse', u'detail': u''}}
ERROR 2013-11-18 15:53:27,066 /home/yves/openstack/horizon/.venv/local/lib/python2.7/site-packages/django/core/handlers/base.py:212 handle_uncaught_exception Internal Server Error: /project/vpn/
Traceback (most recent call last):
  File "/home/yves/openstack/horizon/.venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 115, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/home/yves/openstack/horizon/horizon/decorators.py", line 38, in dec
    return view_func(request, *args, **kwargs)
  File "/home/yves/openstack/horizon/horizon/decorators.py", line 54, in dec
    return view_func(request, *args, **kwargs)
  File "/home/yves/openstack/horizon/horizon/decorators.py", line 38, in dec
    return view_func(request, *args, **kwargs)
  File "/home/yves/openstack/horizon/horizon/decorators.py", line 86, in dec
    return view_func(request, *args, **kwargs)
  File "/home/yves/openstack/horizon/.venv/local/lib/python2.7/site-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args, **kwargs)
  File "/home/yves/openstack/horizon/.venv/local/lib/python2.7/site-packages/django/views/generic/base.py", line 86, in dispatch
    return handler(request, *args, **kwargs)
  File "/home/yves/openstack/horizon/openstack_dashboard/dashboards/project/vpn/views.py", line 84, in post
    return self.get(request, *args, **kwargs)
  File "/home/yves/openstack/horizon/horizon/tabs/views.py", line 132, in get
    handled = self.handle_table(self._table_dict[table_name])
  File "/home/yves/openstack/horizon/horizon/tabs/views.py", line 113, in handle_table
    handled = tab._tables[table_name].maybe_handle()
  File "/home/yves/openstack/horizon/horizon/tables/base.py", line 1261, in maybe_handle
    return self.take_action(action_name, obj_id)
  File "/home/yves/openstack/horizon/horizon/tables/base.py", line 1194, in take_action
    response = action.multiple(self, self.request, obj_ids)
  File "/home/yves/openstack/horizon/horizon/tables/actions.py", line 263, in multiple
    return self.handle(data_table, request, object_ids)
  File "/home/yves/openstack/horizon/horizon/tables/actions.py", line 617, in handle
    exceptions.handle(request, ignore=ignore)
  File "/home/yves/openstack/horizon/horizon/tables/actions.py", line 601, in handle
    self.action(request, datum_id)
  File "/home/yves/openstack/horizon/horizon/tables/actions.py", line 648, in action
    return self.delete(request, obj_id)
  File "/home/yves/openstack/horizon/horizon/tables/actions.py", line 651, in delete
    raise NotImplementedError("DeleteAction must define a delete method.")
NotImplementedError: DeleteAction must define a delete method.
[18/Nov/2013 15:53:27] "POST /project/vpn/ HTTP/1.1" 500 284664

It works fine if the IPSec Site Conection is deleted before the VPN Service.
We should not be permitted to delete a VPN Service without having deleted the related IPSec Site connection before.

The same thing happens with the IPSec Policies and IKE Policies.

Changed in horizon:
assignee: nobody → Tatiana Mazur (tmazur)
Changed in horizon:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/57232
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=15d1edcc95a9ff03a33fc526cb8fcfe289318c87
Submitter: Jenkins
Branch: master

commit 15d1edcc95a9ff03a33fc526cb8fcfe289318c87
Author: Tatiana Mazur <email address hidden>
Date: Tue Nov 19 17:43:41 2013 +0400

    Remove "Delete" buttons when VPN objects are in use

    Deleting attached services and policies doesn't
    cause NotImplementedError anymore. Moreover,
    options "Delete VPN Service", "Delete IKE Policy" and
    "Delete IPSec Policy" don't appear in corresponding row
    if there is a connection created using these objects.
    Some tests are added to detect such errors in future.

    Fixes bug 1252330

    Change-Id: I9ed1b4ecdad54b89bef45b2f5e422c30447cceb5

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
milestone: none → icehouse-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: icehouse-2 → 2014.1
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.