Upgrade from 2.4 -> 2.5 doesn't upgrade manual power_type
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Critical
|
Newell Jensen | ||
2.5 |
Fix Released
|
Critical
|
Newell Jensen |
Bug Description
I have three nodes that have manual power control in my lab and after upgrading from MAAS 2.4.x to 2.5.0 I found that I could not add a fourth node.
The node had been enlisted and I couldn't set the power type to manual in the GUI. There was no error message in the GUI, the manual setting just seemed to not get saved. When I tried to set the power_type for the enlisted node from the CLI, I got a one line error message.
$ maas cli machine update ces6hn power_type=manual
get() returned more than one BMC -- it returned 3!
I found that error message in the middle of Django and went looking for the BMC table. Sure enough, there were three manual entries listed there and they were associated with three different nodes.
I deleted one of the nodes matching the three manual BMC entries and sure enough, the error message changed to complain about two entries instead of three. I realised that I was only using one of my three manually controlled nodes, and so I just deleted the second unused node leaving only one manual power_type entry in the maasserver_bmc table.
I reran "maas cli machine update ces6hn power_type=manual" and this time it spat out a whole pile of JSON like I expected it to. Also, I checked the maasserver_bmc table and it still only had one entry in it.
Did the MAAS code get changed so that the manual power type is now effectively a singleton in the maasserver_bmc table? It makes some kind of sense, because it's not like the manual power type has any parameters. It also looks like the upgrade doesn't collapse all the existing manual BMCs into the single one that is now expected.
For completeness here is my package listing followed by the traceback from regiond.log.
lloyd@maas:~$ dpkg -l '*maas*'|cat
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Architecture Description
+++-===
ii maas 2.5.0-7442-
ii maas-cli 2.5.0-7442-
un maas-cluster-
ii maas-common 2.5.0-7442-
ii maas-dhcp 2.5.0-7442-
un maas-dns <none> <none> (no description available)
ii maas-proxy 2.5.0-7442-
ii maas-rack-
ii maas-region-api 2.5.0-7442-
ii maas-region-
un maas-region-
un python-django-maas <none> <none> (no description available)
un python-maas-client <none> <none> (no description available)
un python-
ii python3-django-maas 2.5.0-7442-
ii python3-maas-client 2.5.0-7442-
ii python3-
2019-01-19 20:29:43 maasserver.
Traceback (most recent call last):
File "/usr/lib/
File "/usr/lib/
return target()
File "/usr/lib/
task()
File "/usr/lib/
task()
--- <exception caught here> ---
File "/usr/lib/
result = inContext.theWork()
File "/usr/lib/
File "/usr/lib/
return self.currentCon
File "/usr/lib/
return func(*args,**kw)
File "/usr/lib/
return func(*args, **kwargs)
File "/usr/lib/
result = func(*args, **kwargs)
File "/usr/lib/
return func_outside_
File "/usr/lib/
return func(*args, **kwargs)
File "/usr/lib/
return func(*args, **kwds)
File "/usr/lib/
data = super(NodeHandler, self).update(
File "/usr/lib/
obj = form.save()
File "/usr/lib/
node = super(WithMACAd
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
return getattr(
File "/usr/lib/
return self.get(**lookup), False
File "/usr/lib/
Related branches
- Newell Jensen (community): Approve
-
Diff: 71 lines (+37/-4)2 files modifiedsrc/maasserver/models/node.py (+8/-3)
src/maasserver/models/tests/test_node.py (+29/-1)
- Blake Rouse (community): Approve
- MAAS Lander: Approve
-
Diff: 71 lines (+37/-4)2 files modifiedsrc/maasserver/models/node.py (+8/-3)
src/maasserver/models/tests/test_node.py (+29/-1)
Changed in maas: | |
milestone: | none → 2.6.0 |
importance: | Undecided → Critical |
assignee: | nobody → Newell Jensen (newell-jensen) |
Changed in maas: | |
status: | New → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
milestone: | 2.6.0 → 2.6.0alpha1 |
Changed in maas: | |
status: | Fix Committed → Fix Released |