[2.0b6] Attempting to delete a VLAN that cannot be deleted, shows traceback in regiond.log

Bug #1589587 reported by Andres Rodriguez on 2016-06-06
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LaMont Jones

Bug Description

Trying to delete a VLAN that cannot be deleted (because it is the default VLAN), shows atraceback in regiond.log. The traceback, however, is not necessary provided that if we don't allow something a traceback shouldn't be shown. If it were to be an error, then it should be shown.

==> /var/log/maas/regiond.log <==
2016-06-06 12:25:40 [-] Error on request (67) vlan.delete: This VLAN is the default VLAN in the fabric, it cannot be deleted.
        Traceback (most recent call last):
          File "/usr/lib/python3.5/threading.py", line 862, in run
            self._target(*self._args, **self._kwargs)
          File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 904, in worker
            return target()
          File "/usr/lib/python3/dist-packages/twisted/_threads/_threadworker.py", line 46, in work
          File "/usr/lib/python3/dist-packages/twisted/_threads/_team.py", line 190, in doWork
        --- <exception caught here> ---
          File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 246, in inContext
            result = inContext.theWork()
          File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 262, in <lambda>
            inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
          File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 118, in callWithContext
            return self.currentContext().callWithContext(ctx, func, *args, **kw)
          File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 81, in callWithContext
            return func(*args,**kw)
          File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 937, in callInContext
            return func(*args, **kwargs)
          File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 516, in call_within_transaction
            return func_outside_txn(*args, **kwargs)
          File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 343, in retrier
            return func(*args, **kwargs)
          File "/usr/lib/python3.5/contextlib.py", line 30, in inner
            return func(*args, **kwds)
          File "/usr/lib/python3/dist-packages/maasserver/websockets/handlers/vlan.py", line 86, in delete
          File "/usr/lib/python3/dist-packages/maasserver/models/vlan.py", line 276, in delete
            "This VLAN is the default VLAN in the fabric, "
        django.core.exceptions.ValidationError: ['This VLAN is the default VLAN in the fabric, it cannot be deleted.']

Related branches

Changed in maas:
importance: Undecided → Medium
Changed in maas:
milestone: none → 2.0.0
Changed in maas:
status: New → In Progress
status: In Progress → Triaged
LaMont Jones (lamont) on 2016-06-09
Changed in maas:
assignee: nobody → LaMont Jones (lamont)
Changed in maas:
status: Triaged → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers