Cannot find 'interface_set' on User object, 'staticipaddress_set__user__interface_set__node' is an invalid parameter to prefetch_related()

Bug #1508072 reported by Andres Rodriguez on 2015-10-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Critical
Blake Rouse

Bug Description

When trying to access the node details of a machine, the following error is shown:

2015-10-20 15:25:09 [-] Error on request (22) subnet.list: Cannot find 'interface_set' on User object, 'staticipaddress_set__user__interface_set__node' is an invalid parameter to prefetch_related()
        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 480, in call_within_transaction
            return func_outside_txn(*args, **kwargs)
          File "/usr/lib/python2.7/dist-packages/maasserver/utils/orm.py", line 307, 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/base.py", line 332, in list
            objs = list(queryset)
          File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 96, in __iter__
            self._fetch_all()
          File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 856, in _fetch_all
            self._prefetch_related_objects()
          File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 517, in _prefetch_related_objects
            prefetch_related_objects(self._result_cache, self._prefetch_related_lookups)
          File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 1587, in prefetch_related_objects
            (attr, first_obj.__class__.__name__, lookup))
        exceptions.AttributeError: Cannot find 'interface_set' on User object, 'staticipaddress_set__user__interface_set__node' is an invalid pa
rameter to prefetch_related()

Related branches

summary: - Deployed machine Cannot find 'interface_set' on User object,
+ Cannot find 'interface_set' on User object,
'staticipaddress_set__user__interface_set__node' is an invalid parameter
to prefetch_related()
description: updated
Changed in maas:
status: New → In Progress
importance: Undecided → Critical
assignee: nobody → Blake Rouse (blake-rouse)
milestone: none → 1.9.0
Changed in maas:
status: In Progress → 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