[1.9.1] Deleting user in UI leads to 500

Bug #1573219 reported by David Britton on 2016-04-21
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Newell Jensen
Newell Jensen

Bug Description

MAAS 1.9, Trusty, Click on trashcan next to user in UI as the admin user, and I get:

root@atlas:/var/log/maas# dpkg -l \grep maas
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
ii grep 2.16-1 amd64 GNU grep, egrep and fgrep
ii maas 1.9.0+bzr4533-0ubu all MAAS server all-in-one metapackage

2016-04-21 19:56:25 [HTTPChannel,3524,] 500 Error - /MAAS/accounts/smadden_nonadmin/del/
        Traceback (most recent call last):
          File "/usr/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 206, in __call__
            response = self.get_response(request)
          File "/usr/lib/python2.7/dist-packages/maasserver/utils/views.py", line 236, in get_response
            response = get_response(request)
          File "/usr/lib/python2.7/dist-packages/maasserver/utils/views.py", line 210, in get_response
            return django_get_response(request)
          File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 194, in get_response
            response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
        --- <exception caught here> ---
          File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 112, in get_response
            response = wrapped_callback(request, *callback_args, **callback_kwargs)
          File "/usr/lib/python2.7/dist-packages/maasserver/utils/views.py", line 189, in view_atomic_with_post_commit_savepoint
            return view_atomic(*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/django/contrib/auth/decorators.py", line 22, in _wrapped_view
            return view_func(request, *args, **kwargs)
          File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 69, in view
            return self.dispatch(request, *args, **kwargs)
          File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 87, in dispatch
            return handler(request, *args, **kwargs)
          File "/usr/lib/python2.7/dist-packages/django/views/generic/edit.py", line 257, in post
            return self.delete(request, *args, **kwargs)
          File "/usr/lib/python2.7/dist-packages/maasserver/views/settings.py", line 116, in delete
          File "/usr/lib/python2.7/dist-packages/maasserver/models/userprofile.py", line 80, in delete
          File "/usr/lib/python2.7/dist-packages/django/db/models/base.py", line 694, in delete
          File "/usr/lib/python2.7/dist-packages/django/db/models/deletion.py", line 197, in collect
            field.rel.on_delete(self, field, sub_objs, self.using)
          File "/usr/lib/python2.7/dist-packages/django/db/models/deletion.py", line 27, in PROTECT
        django.db.models.deletion.ProtectedError: ("Cannot delete some instances of model 'User' because they are referenced through a protected foreign key: 'FileStorage.owner'", [<FileStorage: 5ec23fd2-0284-4983-8153-8f899c6876f9-provider-state>, <FileStorage: 823e7cf5-082b-4fdc-8b05-8d09394aaf98-provider-state>])

If you need anything else, let me know.

Related branches

David Britton (davidpbritton) wrote :
tags: added: landscape
summary: - Deleting user in UI leads to 500
+ [1.9] Deleting user in UI leads to 500
Changed in maas:
milestone: none → 1.9.3
importance: Undecided → High
status: New → Triaged
importance: High → Critical
summary: - [1.9] Deleting user in UI leads to 500
+ [1.9.1] Deleting user in UI leads to 500
Newell Jensen (newell-jensen) wrote :

This also affects trunk. Will backport to 1.9 as well.

Changed in maas:
assignee: nobody → Newell Jensen (newell-jensen)
no longer affects: maas/trunk
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

Bug attachments