Nodes don't go to ready, after commissioning they get a 500 error when reporting back to maas
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Critical
|
Raphaël Badin | ||
1.2 |
Fix Released
|
Critical
|
Raphaël Badin | ||
maas (Ubuntu) |
Fix Released
|
Critical
|
Andres Rodriguez | ||
Raring |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
maas version installed: 1.2+bzr1359+
We enlist a node, the accept and commission it and the node stays in Commissioning state.
We see that after cloud-init the node tries to access maas and gets an internal server error.
In the maas.log file we see this:
ERROR 2013-02-21 16:11:46,283 maas.maasserver #######
ERROR 2013-02-21 16:11:46,283 maas.maasserver Traceback (most recent call last):
File "/usr/lib/
response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/
response = func(*args, **kwargs)
File "/usr/lib/
result = self.error_
File "/usr/lib/
result = meth(request, *args, **kwargs)
File "/usr/lib/
return function(self, request, *args, **kwargs)
File "/usr/lib/
self.
File "/usr/lib/
node.
File "/usr/lib/
update_
File "/usr/lib/
has_tag = evaluator(
File "xpath.pxi", line 321, in lxml.etree.
File "xpath.pxi", line 239, in lxml.etree.
File "xpath.pxi", line 225, in lxml.etree.
XPathEvalError: Invalid expression
Maybe related, on juju we set a maas-name constraint to install each service to a particular. node (that worked) and then constraints weren't recognized at some point (we destroyed the juju environment and started again).
[Impact]
MAAS machines in the commissioning process fail to successfully commission and be placed into Ready state. This is caused when the user defines tag with no definition. These tag with no definition simply server for node identification purposes. Without this fix, machine wont be able to commission successfully if the user has previously defined a 'no-definition' tag.
[Test Case]
To reproduce do the following:
1. Install MAAS
2. Enlist machines
3. Define a tag with no definition
4. Try to commission machines,
These will fail to commission, or if they do, their hardware requirements wont be appear and juju wont be able to deploy these machines.
5. Try the proposed fix.
Machines would be able to commission successfully.
[Regression Potential]
Minimal, this actually fixes a regression. This has been tested both manually and in automated labs.
Related branches
- Martin Packman (community): Approve
- Gavin Panella (community): Approve
-
Diff: 36 lines (+15/-0)2 files modifiedsrc/maasserver/models/node.py (+2/-0)
src/maasserver/tests/test_node.py (+13/-0)
- Raphaël Badin (community): Approve
-
Diff: 307 lines (+116/-29)6 files modifiedsrc/maasserver/api.py (+29/-3)
src/maasserver/models/node.py (+2/-0)
src/maasserver/testing/factory.py (+19/-0)
src/maasserver/tests/test_api.py (+46/-0)
src/maasserver/tests/test_forms.py (+7/-26)
src/maasserver/tests/test_node.py (+13/-0)
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → Critical |
Changed in maas (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → Critical |
assignee: | nobody → Andres Rodriguez (andreserl) |
description: | updated |
Changed in maas: | |
assignee: | nobody → Raphaël Badin (rvb) |
status: | Triaged → Fix Committed |
description: | updated |
Changed in maas: | |
status: | Fix Committed → Fix Released |
Something seems to be wrong with the tag, can you please give of the value of the tag's 'definition'?
Here is how to print the definitions for all the tags:
# start python shell
sudo maas shell
# in python shell:
>>> from maasserver.models import Tag
>>> [tag.definition for tag in Tag.objects.all()]