MAAS returns HTTP/500 when adding a second managed interface to cluster controller

Bug #1234853 reported by Eduardo Damato
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Raphaël Badin
1.2
Fix Released
Critical
Raphaël Badin
1.3
Fix Released
Critical
Raphaël Badin

Bug Description

1. Description of the problem:

Adding a second managed interface to a MAAS cluster controller is forbidden by design but permitted by interface.

2. Ubuntu release, software version, Release Number and Architecture of the selected components.

12.04.3 LTS

ii maas 1.2+bzr1373+dfsg-0ubuntu1~12.04.2 Ubuntu MAAS Server
ii maas-cli 1.2+bzr1373+dfsg-0ubuntu1~12.04.2 Ubuntu MAAS Client Tool
ii maas-cluster-controller 1.2+bzr1373+dfsg-0ubuntu1~12.04.2 Ubuntu MAAS Cluster Controller
ii maas-common 1.2+bzr1373+dfsg-0ubuntu1~12.04.2 Ubuntu MAAS Server
ii maas-region-controller 1.2+bzr1373+dfsg-0ubuntu1~12.04.2 Ubuntu MAAS Server
ii python-django-maas 1.2+bzr1373+dfsg-0ubuntu1~12.04.2 Ubuntu MAAS Server - (django files)
ii python-maas-client 1.2+bzr1373+dfsg-0ubuntu1~12.04.2 Ubuntu MAAS API Client - (python files)
ii python-maas-provisioningserver 1.2+bzr1373+dfsg-0ubuntu1~12.04.2 Ubuntu MAAS Server

3. How reproducible is the problem?

every time

4. Steps to Reproduce:

4.1. Go on WebUI and click on the gears
4.2. Click on edit the cluster controller
4.3. Check that there is a managed interface
4.3. Click on add interface
4.4. Fill in all the details and choose managed interface
4.5. Click on save

 a. Actual Results: HTTP error 500
 b. Expected Results: MAAS UI not allow such configuration if it goes against the design/implementation.

5. Known Workaround:

None atm

6. Additional information:

Trace from maas log showing that validation failed:

ERROR 2013-10-03 18:15:49,465 django.request Internal Server Error: /MAAS/clusters/d4262a5f-5d0c-4dbb-9144-dc3398ac8035/interfaces/add/
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python2.7/dist-packages/django/contrib/auth/decorators.py", line 23, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 47, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 68, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/django/views/generic/edit.py", line 172, in post
    return super(BaseCreateView, self).post(request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/django/views/generic/edit.py", line 138, in post
    return self.form_valid(form)
  File "/usr/lib/python2.7/dist-packages/maasserver/views/settings_clusters.py", line 134, in form_valid
    self.object = form.save(nodegroup=self.get_nodegroup())
  File "/usr/lib/python2.7/dist-packages/maasserver/forms.py", line 720, in save
    interface.save(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/maasserver/models/cleansave.py", line 35, in save
    self.full_clean()
  File "/usr/lib/python2.7/dist-packages/django/db/models/base.py", line 828, in full_clean
    raise ValidationError(errors)
ValidationError: {u'management': [u'Another managed interface already exists for this cluster.']}

Related branches

Raphaël Badin (rvb)
Changed in maas:
status: New → Triaged
importance: Undecided → Critical
Raphaël Badin (rvb)
Changed in maas:
milestone: none → 13.10
assignee: nobody → Raphaël Badin (rvb)
status: Triaged → In Progress
Changed in maas:
status: Fix Committed → 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.