commission fails with 500 error for /MAAS/metadata/latest/by-id/ and django.db.utils.IntegrityError

Bug #1589664 reported by John George
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
New
Undecided
Unassigned

Bug Description

Commission of nodes fails.

Reproduce by installing 2.0.0~beta6 and trigger commission of a machine.

||/ Name Version Architecture Description
+++-===============================-====================================-============-=================================================
ii maas 2.0.0~beta6+bzr5073-0ubuntu1~xenial1 all "Metal as a Service" is a physical cloud and IPAM
ii maas-cli 2.0.0~beta6+bzr5073-0ubuntu1~xenial1 all MAAS client and command-line interface
un maas-cluster-controller <none> <none> (no description available)
ii maas-common 2.0.0~beta6+bzr5073-0ubuntu1~xenial1 all MAAS server common files
ii maas-dhcp 2.0.0~beta6+bzr5073-0ubuntu1~xenial1 all MAAS DHCP server
ii maas-dns 2.0.0~beta6+bzr5073-0ubuntu1~xenial1 all MAAS DNS server
ii maas-proxy 2.0.0~beta6+bzr5073-0ubuntu1~xenial1 all MAAS Caching Proxy
ii maas-rack-controller 2.0.0~beta6+bzr5073-0ubuntu1~xenial1 all Rack Controller for MAAS
ii maas-region-api 2.0.0~beta6+bzr5073-0ubuntu1~xenial1 all Region controller API service for MAAS
ii maas-region-controller 2.0.0~beta6+bzr5073-0ubuntu1~xenial1 all Region Controller for MAAS
un maas-region-controller-min <none> <none> (no description available)
un python-django-maas <none> <none> (no description available)
un python-maas-client <none> <none> (no description available)
un python-maas-provisioningserver <none> <none> (no description available)
ii python3-django-maas 2.0.0~beta6+bzr5073-0ubuntu1~xenial1 all MAAS server Django web framework (Python 3)
ii python3-maas-client 2.0.0~beta6+bzr5073-0ubuntu1~xenial1 all MAAS python API client (Python 3)
ii python3-maas-provisioningserver 2.0.0~beta6+bzr5073-0ubuntu1~xenial1 all MAAS server provisioning libraries (Python 3)

Trace from regiond.log:

2016-06-06 19:04:06 [HTTPChannel,222,127.0.0.1] 500 Error - /MAAS/metadata/latest/by-id/4y3h7y/
        Traceback (most recent call last):
          File "/usr/lib/python3/dist-packages/twisted/web/wsgi.py", line 496, in run
            appIterator = self.application(self.environ, self.startResponse)
          File "/usr/lib/python3/dist-packages/django/core/handlers/wsgi.py", line 189, in __call__
            response = self.get_response(request)
          File "/usr/lib/python3/dist-packages/maasserver/utils/views.py", line 227, in get_response
            response = get_response(request)
          File "/usr/lib/python3/dist-packages/maasserver/utils/views.py", line 216, in get_response
            request, get_resolver(None), sys.exc_info())
        --- <exception caught here> ---
          File "/usr/lib/python3/dist-packages/maasserver/utils/views.py", line 201, in get_response
            return django_get_response(request)
          File "/usr/lib/python3/dist-packages/django/db/transaction.py", line 225, in __exit__
            connection.commit()
          File "/usr/lib/python3/dist-packages/django/db/backends/base/base.py", line 173, in commit
            self._commit()
          File "/usr/lib/python3/dist-packages/django/db/backends/base/base.py", line 142, in _commit
            return self.connection.commit()
          File "/usr/lib/python3/dist-packages/django/db/utils.py", line 98, in __exit__
            six.reraise(dj_exc_type, dj_exc_value, traceback)
          File "/usr/lib/python3/dist-packages/django/utils/six.py", line 685, in reraise
            raise value.with_traceback(tb)
          File "/usr/lib/python3/dist-packages/django/db/backends/base/base.py", line 142, in _commit
            return self.connection.commit()
        django.db.utils.IntegrityError: insert or update on table "piston3_consumer" violates foreign key constraint "piston3_consumer_user_id_279f98de55b85c90_fk_auth_user_id"
        DETAIL: Key (user_id)=(2) is not present in table "auth_user".

Revision history for this message
John George (jog) wrote :
Revision history for this message
John George (jog) wrote :
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.