Adding a device with a MAC address that's belongs to another node, fails without providing any feedback

Bug #1533719 reported by Andres Rodriguez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Unassigned
1.9
Won't Fix
High
Unassigned
2.1
Won't Fix
High
Unassigned

Bug Description

When trying to add a device that had a MAC owned by another device, it failed without providing any user feedback in the UI. However, the following was provided in the log:

2016-01-13 23:23:37 [-] Error on request (35) device.create: {"mac_addresses": ["MAC address aa:bb:cc:dd:ee:f1 already in use on testone."]}
 Traceback (most recent call last):
   File "/usr/lib/python2.7/threading.py", line 783, in __bootstrap
     self.__bootstrap_inner()
   File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
     self.run()
   File "/usr/lib/python2.7/threading.py", line 763, in run
     self.__target(*self.__args, **self.__kwargs)
   File "/usr/lib/python2.7/dist-packages/provisioningserver/utils/twisted.py", line 791, in _worker
     return super(ThreadPool, self)._worker()
 --- <exception caught here> ---
   File "/usr/lib/python2.7/dist-packages/twisted/python/threadpool.py", line 191, in _worker
     result = context.call(ctx, function, *args, **kwargs)
   File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext
     return self.currentContext().callWithContext(ctx, func, *args, **kw)
   File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext
     return func(*args,**kw)
   File "/usr/lib/python2.7/dist-packages/maasserver/utils/orm.py", line 501, in call_within_transaction
     return func_outside_txn(*args, **kwargs)
   File "/usr/lib/python2.7/dist-packages/maasserver/utils/orm.py", line 328, in retrier
     return func(*args, **kwargs)
   File "/usr/lib/python2.7/dist-packages/django/db/transaction.py", line 339, in inner
     return func(*args, **kwargs)
   File "/usr/lib/python2.7/dist-packages/maasserver/websockets/handlers/device.py", line 306, in create
     data = super(DeviceHandler, self).create(params)
   File "/usr/lib/python2.7/dist-packages/maasserver/websockets/base.py", line 364, in create
     raise HandlerValidationError(e.error_dict)
 maasserver.websockets.base.HandlerValidationError: {u'mac_addresses': [u'MAC address aa:bb:cc:dd:ee:f1 already in use on testone.']}

no longer affects: maas/2.0
Changed in maas:
milestone: none → 2.0.0
Changed in maas:
status: New → Triaged
importance: Undecided → High
no longer affects: maas/1.10
Changed in maas:
milestone: 2.0.0 → 2.1.0
tags: added: error-surface
Changed in maas:
milestone: 2.1.0 → 2.1.1
Revision history for this message
Lee Trager (ltrager) wrote :

I get an error message in the UI on trunk.

no longer affects: maas/2.0
no longer affects: maas/trunk
Changed in maas:
status: Invalid → Triaged
milestone: 2.1.1 → 2.1.2
Changed in maas:
milestone: 2.1.2 → 2.1.3
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.