Unable to commission nodes

Asked by Cavendish McKay on 2012-07-04

I have installed MAAS and powered on some nodes to let them declare themselves to the MAAS server (they now show up as "Declared" in the nodes list). When I try to "Accept and Commission", however, I get back a page saying "Internal Server Error". The apache logs don't show anything (neither an attempt to access something, nor any information about an error).

If instead I try to add the MAC addresses manually, the add node page gives the message:
Unable to create Node: Commissioning script is missing: etc/maas/commissioning-user-data

Looking in /etc/maas, the needed script is not, in fact, missing.

Can someone give me a pointer as to what to try next?

Thanks,

Question information

Language:
English Edit question
Status:
Answered
For:
MAAS Edit question
Assignee:
No assignee Edit question
Last query:
2012-07-05
Last reply:
2012-07-06
Raphaël Badin (rvb) said : #1

This definitely looks like a bug (I've filed https://bugs.launchpad.net/bugs/1021382). We will investigate some more by in the mean time:
a) When you're getting the "Internal Server Error", could you please have a look at the files in /var/log/maas/ and especially maas.log to see if you can find more information about the error?
b) When you're adding the MAC addresses manually, could you try adding the line:
COMMISSIONING_SCRIPT = 'etc/maas/commissioning-user-data'
at the end of the file /etc/maas/maas_local_settings.py?
(Note that you'll need to restart MAAS for that change to apply: sudo /etc/init.d/apache2 restart

Here is the relevant entry from maas.log:

ERROR 2012-07-05 14:13:00,596 django.request Internal Server Error: /MAAS/nodes/node-404e98c4-c61f-11e1-87ce-90e2ba0993e2/view/
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/generic/base.py", line 47, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 68, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/django/views/generic/edit.py", line 195, in post
    return super(BaseUpdateView, self).post(request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/django/views/generic/edit.py", line 138, in post
    return self.form_valid(form)
  File "/usr/lib/python2.7/dist-packages/django/views/generic/edit.py", line 112, in form_valid
    self.object = form.save()
  File "/usr/lib/python2.7/dist-packages/maasserver/forms.py", line 353, in save
    execute(self.node, self.user)
  File "/usr/lib/python2.7/dist-packages/maasserver/forms.py", line 278, in <lambda>
    'execute': lambda node, user: Node.start_commissioning(node, user),
  File "/usr/lib/python2.7/dist-packages/maasserver/models.py", line 617, in start_commissioning
    "Commissioning script is missing: %s" % path)
ValidationError: [u'Commissioning script is missing: etc/maas/commissioning-user-data']

So, the message is the same in either case, though it presents differently.

Adding COMMISSIONING_SCRIPT = '/etc/maas/commissioning-user-data' (note the leading slash; different from what you suggested) to /etc/maas/maas_local_settings.py makes the problem go away.

Raphaël Badin (rvb) said : #3

All right, so the bug I filed is definitely confirmed, thanks for reporting this.

Raphaël Badin (rvb) said : #4

> Adding COMMISSIONING_SCRIPT = '/etc/maas/commissioning-user-data' (note the leading slash; different from what you
> suggested) to /etc/maas/maas_local_settings.py makes the problem go away.

Yeah, my mistake my suggestion was indeed to add the leading slash ;)

Can you help with this problem?

Provide an answer of your own, or ask Cavendish McKay for more information if necessary.

To post a message you must log in.