500 error: UnboundLocalError: local variable 'key_required' referenced before assignment

Bug #1456892 reported by Ashley Lai
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Unassigned
1.7
Fix Released
Critical
Unassigned

Bug Description

Maas returns the 500 internal server error in juju status:

'7':
    agent-state-info: 'gomaasapi: got error back from server: 500 INTERNAL SERVER
      ERROR (local variable ''key_required'' referenced before assignment)'
    containers:
      7/lxc/0:
        instance-id: pending
        series: trusty
    instance-id: pending
    series: trusty

https://oil.canonical.com/pipeline/97748223-9628-4104-a709-cdddaab5f224

Could this be a duplicate of https://bugs.launchpad.net/maas/+bug/1453954 ?
Both bugs return 500 error but with different error messages.

Tags: oil

Related branches

Revision history for this message
Raphaël Badin (rvb) wrote :

It doesn't look like it can be a duplicate of bug 1453954… can you please provide the maas logs (/var/log/maas/*) from around the time the error happened so that we can identify the issue? (You'll find a stacktrace with the "'key_required' referenced before assignment" error).

Changed in maas:
importance: Undecided → Critical
status: New → Incomplete
Larry Michel (lmic)
tags: added: oil
Revision history for this message
Ashley Lai (alai) wrote :

Here's the "key_required" error message from regiond.log. Please see the regiond and maas attached. The timestamp for this pipeline is around Fri, 08 May 2015 09:39:21.

2015-05-08 09:47:40 [maasserver] ERROR: ################################ Exception: local variable 'key_required' referenced before assignment ################################
2015-05-08 09:47:40 [maasserver] ERROR: Traceback (most recent call last):
  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/api/support.py", line 52, in __call__
    response = upcall(request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/django/views/decorators/vary.py", line 19, in inner_func
    response = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/piston/resource.py", line 167, in __call__
    result = self.error_handler(e, request, meth, em_format)
  File "/usr/lib/python2.7/dist-packages/piston/resource.py", line 165, in __call__
    result = meth(request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/maasserver/api/support.py", line 200, in dispatch
    return function(self, request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/maasserver/api/nodes.py", line 401, in start
    form = Form(instance=node)
  File "/usr/lib/python2.7/dist-packages/maasserver/forms.py", line 750, in __init__
    data=data, instance=instance, **kwargs)
  File "/usr/lib/python2.7/dist-packages/maasserver/forms.py", line 410, in __init__
    self.set_up_osystem_and_distro_series_fields(instance)
  File "/usr/lib/python2.7/dist-packages/maasserver/forms.py", line 480, in set_up_osystem_and_distro_series_fields
    initial_value = get_distro_series_initial(osystems, instance)
  File "/usr/lib/python2.7/dist-packages/maasserver/utils/osystems.py", line 157, in get_distro_series_initial
    return '%s/%s%s' % (osystem_name, series, key_required)
UnboundLocalError: local variable 'key_required' referenced before assignment

Changed in maas:
status: Incomplete → New
Raphaël Badin (rvb)
Changed in maas:
status: New → Triaged
Raphaël Badin (rvb)
summary: - 500 error from juju status
+ 500 error: UnboundLocalError: local variable 'key_required' referenced
+ before assignment
Changed in maas:
status: Triaged → Fix Committed
milestone: none → 1.8.0
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.