[2.0b7, API/CLI] allows you to add machines with power_type and no power_parameters
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Critical
|
Lee Trager | ||
2.0 |
Fix Released
|
Critical
|
Lee Trager |
Bug Description
There's a combination of issues:
1. MAAS allows you to add a machine only specifying power_type, e.g. "ipmi". (The only reason when this should be allowed is when power_type=manual). There's also a error that should be addressed in https:/
2. When you add multiple machines only specifying power_type (no power_parameter
How to solve
=============
1. When adding a machine with power_type=manual, and no power_parameter
2. When adding a machine with power_type=
=======
I am enlisting servers on maas through the CLI and I ended up with one power controller controlling 37 nodes. I wonder whether this had to do with me executing these commands as a script, because not all of them ended up on the same power controller. I saw another 2 servers that shared their power controller which was separate from the one controlling the 37 nodes.
I deleted one these servers and added it again through the CLI; it came up fine with its own power controller. I am guessing I can work around this by putting a sleep (1 or 2 seconds) between each commands?
maas root machines create architecture=amd64 subarchitecture
maas root machines create architecture=amd64 subarchitecture
maas root machines create architecture=amd64 subarchitecture
There are no error during the machines create. However, when I try to update the power parameters on the UI, I see this warning message:
This power controller manages 37 other nodes. Changing power parameters will affect these nodes.
Then I see that they all have same values. If update the power parameters for one, it updates for every nodes:
For example:
maas root machine update 4y3hed power_parameter
"4y3han": {
},
"4y3hed": {
},
The same thing happens when updating from the CLI.
If I delete the server and add through the UI.
ubuntu@
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Architecture Description
+++-===
ii maas 2.0.0~beta7+
ii maas-cli 2.0.0~beta7+
un maas-cluster-
ii maas-common 2.0.0~beta7+
ii maas-dhcp 2.0.0~beta7+
ii maas-dns 2.0.0~beta7+
ii maas-proxy 2.0.0~beta7+
ii maas-rack-
ii maas-region-api 2.0.0~beta7+
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.0.0~beta7+
ii python3-maas-client 2.0.0~beta7+
ii python3-
ubuntu@
Related branches
- Blake Rouse (community): Approve
-
Diff: 1216 lines (+296/-142)21 files modifiedsrc/maasserver/api/machines.py (+0/-3)
src/maasserver/api/tests/test_enlistment.py (+21/-12)
src/maasserver/api/tests/test_machine.py (+33/-22)
src/maasserver/api/tests/test_node.py (+1/-1)
src/maasserver/api/tests/test_rackcontroller.py (+2/-1)
src/maasserver/api/tests/test_utils.py (+20/-0)
src/maasserver/api/utils.py (+14/-1)
src/maasserver/clusterrpc/power_parameters.py (+24/-5)
src/maasserver/clusterrpc/tests/test_power_parameters.py (+48/-0)
src/maasserver/config_forms.py (+3/-0)
src/maasserver/forms.py (+37/-6)
src/maasserver/rpc/nodes.py (+0/-4)
src/maasserver/rpc/tests/test_nodes.py (+18/-32)
src/maasserver/testing/factory.py (+2/-3)
src/maasserver/tests/test_config_forms.py (+9/-0)
src/maasserver/tests/test_forms_controller.py (+4/-2)
src/maasserver/tests/test_forms_machine.py (+4/-1)
src/maasserver/websockets/handlers/machine.py (+2/-9)
src/maasserver/websockets/handlers/tests/test_machine.py (+7/-4)
src/maasserver/websockets/tests/test_base.py (+2/-2)
src/provisioningserver/power/schema.py (+45/-34)
- Mike Pontillo (community): Approve
-
Diff: 1223 lines (+297/-141)21 files modifiedsrc/maasserver/api/machines.py (+0/-3)
src/maasserver/api/tests/test_enlistment.py (+21/-12)
src/maasserver/api/tests/test_machine.py (+35/-22)
src/maasserver/api/tests/test_node.py (+1/-1)
src/maasserver/api/tests/test_rackcontroller.py (+2/-1)
src/maasserver/api/tests/test_utils.py (+20/-0)
src/maasserver/api/utils.py (+14/-1)
src/maasserver/clusterrpc/power_parameters.py (+24/-5)
src/maasserver/clusterrpc/tests/test_power_parameters.py (+48/-0)
src/maasserver/config_forms.py (+3/-0)
src/maasserver/forms.py (+37/-6)
src/maasserver/rpc/nodes.py (+0/-4)
src/maasserver/rpc/tests/test_nodes.py (+18/-32)
src/maasserver/testing/factory.py (+2/-3)
src/maasserver/tests/test_config_forms.py (+9/-0)
src/maasserver/tests/test_forms_controller.py (+4/-2)
src/maasserver/tests/test_forms_machine.py (+4/-1)
src/maasserver/websockets/handlers/machine.py (+2/-9)
src/maasserver/websockets/handlers/tests/test_machine.py (+7/-4)
src/maasserver/websockets/tests/test_base.py (+2/-2)
src/provisioningserver/power/schema.py (+44/-33)
- MAAS Maintainers: Pending requested
-
Diff: 4158 lines (+3178/-21) (has conflicts)42 files modifiedMakefile (+1/-1)
docs/about.rst (+9/-0)
docs/changelog.rst (+522/-0)
docs/index.rst (+9/-0)
src/maasserver/api/account.py (+23/-0)
src/maasserver/api/interfaces.py (+4/-0)
src/maasserver/api/tests/test_ipaddresses.py (+9/-0)
src/maasserver/api/tests/test_machine.py (+37/-0)
src/maasserver/bootresources.py (+37/-0)
src/maasserver/dhcp.py (+72/-0)
src/maasserver/enum.py (+6/-0)
src/maasserver/migrations/builtin/maasserver/0066_allow_squashfs.py (+22/-0)
src/maasserver/models/node.py (+101/-17)
src/maasserver/models/staticipaddress.py (+94/-0)
src/maasserver/models/tests/test_node.py (+177/-0)
src/maasserver/models/tests/test_staticipaddress.py (+68/-3)
src/maasserver/node_status.py (+16/-0)
src/maasserver/preseed_network.py (+12/-0)
src/maasserver/rpc/tests/test_regionservice.py (+14/-0)
src/maasserver/static/css/maas-styles.css.OTHER (+1/-0)
src/maasserver/static/js/angular/controllers/tests/test_node_details_storage.js (+89/-0)
src/maasserver/static/partials/node-details.html (+6/-0)
src/maasserver/static/partials/node-events.html (+14/-0)
src/maasserver/static/partials/nodes-list.html (+173/-0)
src/maasserver/static/scss/maas/components/_accordion.scss.OTHER (+112/-0)
src/maasserver/templates/maasserver/base.html (+7/-0)
src/maasserver/templates/maasserver/index.html (+21/-0)
src/maasserver/templates/maasserver/prefs.html (+5/-0)
src/maasserver/testing/factory.py (+5/-0)
src/maasserver/tests/test_bootresources.py (+108/-0)
src/maasserver/tests/test_dhcp.py (+74/-0)
src/maasserver/tests/test_preseed.py (+27/-0)
src/maasserver/tests/test_preseed_network.py (+4/-0)
src/maasserver/tests/test_start_up.py (+93/-0)
src/maasserver/triggers/tests/test_websocket_listener.py (+124/-0)
src/maasserver/views/tests/test_images.py.OTHER (+991/-0)
src/metadataserver/api.py (+7/-0)
src/provisioningserver/dns/tests/test_zoneconfig.py (+47/-0)
src/provisioningserver/events.py (+11/-0)
src/provisioningserver/plugin.py (+12/-0)
src/provisioningserver/power/schema.py (+6/-0)
src/provisioningserver/tests/test_plugin.py (+8/-0)
summary: |
- 2.0 beta7: nodes enlisted manually through CLI added with a single power + [2.0b7] nodes enlisted manually through CLI added with a single power controller controlling all the nodes for power type IPMI |
summary: |
- [2.0b7] nodes enlisted manually through CLI added with a single power + [2.0rc1] nodes enlisted manually through CLI added with a single power controller controlling all the nodes for power type IPMI |
description: | updated |
summary: |
- [2.0rc1] nodes enlisted manually through CLI added with a single power - controller controlling all the nodes for power type IPMI + [2.0rc1] nodes enlisted manually as IPMI all have the same BMC |
description: | updated |
summary: |
- [2.0rc1] nodes enlisted manually as IPMI all have the same BMC + [2.0b7, API/CLI] allow's you to add machines with power_type and no + power_parameters |
Changed in maas: | |
importance: | Undecided → Medium |
status: | New → In Progress |
assignee: | nobody → Jeffrey C Jones (trapnine) |
summary: |
- [2.0b7, API/CLI] allow's you to add machines with power_type and no + [2.0b7, API/CLI] allows you to add machines with power_type but no power_parameters |
summary: |
- [2.0b7, API/CLI] allows you to add machines with power_type but no + [2.0b7, API/CLI] allows you to add machines with power_type and no power_parameters |
Changed in maas: | |
importance: | Medium → Critical |
Changed in maas: | |
milestone: | 2.1.0 → 2.1.1 |
This is very easy to recreate:
https:/ /pastebin. canonical. com/160427/
All the nodes of the same power type end up on a single controller. To workaround I am having to first save them with APU which breaks that bond, then going back to IPMI to edit. Without doing that, it ends up editing a single entry shared amount 70+ or so of the IPMI ones and 10+ of the AMT ones.