MAASAPINotFound: Unknown metadata attribute: public-keys during commissioning

Bug #1058313 reported by Diogo Matsubara
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Jeroen T. Vermeulen

Bug Description

During enlistment of nodes the MAAS server logs this error:

ERROR 2012-09-28 15:55:54,991 maas.maasserver ################################ Exception: Unknown metadata attribute: public-keys ################################
ERROR 2012-09-28 15:55:54,992 maas.maasserver 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/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/metadataserver/api.py", line 378, in read
    raise MAASAPINotFound("Unknown metadata attribute: %s" % item)
MAASAPINotFound: Unknown metadata attribute: public-keys

Even though the admin user has a ssh-key added to account and the enlistment process continues fine.

Related branches

Changed in maas:
assignee: nobody → Jeroen T. Vermeulen (jtv)
status: New → In Progress
Changed in maas:
status: In Progress → Fix Committed
Revision history for this message
Julian Edwards (julian-edwards) wrote :

The fix done has completely broken commissioning, the metadata server does this:

ERROR 2012-10-04 16:37:59,374 maas.maasserver ################################ Exception: No registered public keys ################################ ERROR 2012-10-04 16:37:59,411 maas.maasserver 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/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.py", line 287, in dispatch return function(self, request, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/metadataserver/api.py", line 328, in read return producer(node, version, item) File "/usr/lib/python2.7/dist-packages/metadataserver/api.py", line 342, in public_keys raise MAASAPINotFound("No registered public keys") MAASAPINotFound: No registered public keys

which makes cloud-init stall.

Changed in maas:
status: Fix Committed → Triaged
importance: Undecided → Critical
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

This new problem is similar to but different from the original bug, which was actually about an enlisting node not a commissioning one. They share a cause in that the client requests public-keys without first checking whether that resource actually exists. That didn't seem to break enlistment, but in this case the client apparently errors out when it gets a 404.

I don't believe the fix to this bug caused the new error: it only touched an API view that was specific to enlistment, turning a "Not Found" exception into a 404 HTTP response (so that we wouldn't get a traceaback). The new error happens in a different server-side code path that may simply need a similar fix. Not quite the same one though: it looks as if the client needs an empty success response rather than a 404 if there are no ssh keys.

Changed in maas:
status: Triaged → Fix Committed
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.