[2.5, UI] Assigning multiple machines to a newly created pool only does for the first machine
Bug #1773454 reported by
Andres Rodriguez
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Björn Tillenius |
Bug Description
In the machine listing page, if I select multiple machines and try to assign a pool, which is a new pool to be created from the action form, the machines don't really get assigned because each iteration tries to create the pool again.
To reproduce:
1. Select multiple machines
2. Click 'Set resource pool' action
3. On the action menu, click 'Create pool'.
4. Enter pool name
5. Click on 'Set pool for X machines'.
You will see the following error:
The set resource pool action for failed with error: {"name": ["Resource pool with this Name already exists."]}"
But only one machine of all selected were transitioned to the new pool
Related branches
~ack/maas:resource-pools-2.4
- MAAS Lander: Approve
- MAAS Maintainers: Pending requested
-
Diff: 6862 lines (+2422/-1271)96 files modifieddev/null (+0/-145)
src/maasserver/api/machines.py (+11/-4)
src/maasserver/api/nodes.py (+9/-0)
src/maasserver/api/pods.py (+21/-3)
src/maasserver/api/resourcepools.py (+90/-0)
src/maasserver/api/tests/test_commissioning.py (+0/-4)
src/maasserver/api/tests/test_enlistment.py (+2/-0)
src/maasserver/api/tests/test_maas.py (+1/-2)
src/maasserver/api/tests/test_machine.py (+13/-0)
src/maasserver/api/tests/test_machines.py (+59/-39)
src/maasserver/api/tests/test_nodes.py (+28/-2)
src/maasserver/api/tests/test_pods.py (+101/-1)
src/maasserver/api/tests/test_resourcepool.py (+105/-0)
src/maasserver/api/tests/test_resourcepools.py (+59/-0)
src/maasserver/api/tests/test_tag.py (+13/-14)
src/maasserver/api/users.py (+1/-0)
src/maasserver/config.py (+0/-4)
src/maasserver/context_processors.py (+2/-6)
src/maasserver/forms/__init__.py (+7/-77)
src/maasserver/forms/pods.py (+17/-21)
src/maasserver/forms/tests/test_machine.py (+1/-0)
src/maasserver/forms/tests/test_node.py (+1/-0)
src/maasserver/forms/tests/test_pods.py (+212/-134)
src/maasserver/forms/tests/test_resourcepool.py (+0/-31)
src/maasserver/forms/tests/test_user.py (+0/-20)
src/maasserver/migrations/builtin/maasserver/0141_add_default_usergroup.py (+4/-4)
src/maasserver/migrations/builtin/maasserver/0157_drop_usergroup_and_role.py (+48/-0)
src/maasserver/migrations/builtin/maasserver/0158_pod_default_pool_to_pod.py (+20/-0)
src/maasserver/migrations/builtin/maasserver/0159_pod_storage_pools.py (+43/-0)
src/maasserver/migrations/builtin/maasserver/0160_storage_pools_notification.py (+37/-0)
src/maasserver/migrations/builtin/maasserver/0161_userprofile_auth_last_check_no_now_default.py (+23/-0)
src/maasserver/models/__init__.py (+3/-19)
src/maasserver/models/bmc.py (+10/-6)
src/maasserver/models/node.py (+1/-7)
src/maasserver/models/resourcepool.py (+0/-120)
src/maasserver/models/tests/test_bmc.py (+12/-13)
src/maasserver/models/tests/test_node.py (+5/-80)
src/maasserver/models/tests/test_resourcepool.py (+0/-155)
src/maasserver/models/tests/test_userprofile.py (+0/-15)
src/maasserver/models/user.py (+0/-5)
src/maasserver/models/userprofile.py (+0/-8)
src/maasserver/node_action.py (+22/-1)
src/maasserver/node_constraint_filter_forms.py (+45/-0)
src/maasserver/static/css/build.css (+1/-1)
src/maasserver/static/js/angular/controllers/add_hardware.js (+23/-5)
src/maasserver/static/js/angular/controllers/node_details.js (+19/-2)
src/maasserver/static/js/angular/controllers/nodes_list.js (+105/-26)
src/maasserver/static/js/angular/controllers/pod_details.js (+7/-2)
src/maasserver/static/js/angular/controllers/pods_list.js (+7/-3)
src/maasserver/static/js/angular/controllers/tests/test_add_hardware.js (+19/-3)
src/maasserver/static/js/angular/controllers/tests/test_node_details.js (+34/-7)
src/maasserver/static/js/angular/controllers/tests/test_nodes_list.js (+196/-2)
src/maasserver/static/js/angular/controllers/tests/test_pod_details.js (+20/-2)
src/maasserver/static/js/angular/controllers/tests/test_pods_list.js (+22/-2)
src/maasserver/static/js/angular/directives/machines_table.js (+4/-7)
src/maasserver/static/js/angular/directives/tests/test_machines_table.js (+6/-21)
src/maasserver/static/js/angular/factories/machines.js (+3/-0)
src/maasserver/static/js/angular/factories/resourcepools.js (+42/-0)
src/maasserver/static/js/angular/factories/tests/test_machines.js (+1/-1)
src/maasserver/static/js/angular/factories/tests/test_resourcepools.js (+42/-0)
src/maasserver/static/js/angular/filters/nodes.js (+3/-0)
src/maasserver/static/js/angular/filters/tests/test_nodes.js (+15/-0)
src/maasserver/static/js/angular/maas.js (+2/-5)
src/maasserver/static/js/bundle/maas-min.js (+1/-1)
src/maasserver/static/js/bundle/maas-min.js.map (+1/-1)
src/maasserver/static/partials/cards/machine.html (+1/-1)
src/maasserver/static/partials/machines-table.html (+6/-12)
src/maasserver/static/partials/node-details.html (+1/-1)
src/maasserver/static/partials/nodes-list.html (+145/-25)
src/maasserver/static/partials/pod-details.html (+22/-14)
src/maasserver/static/partials/pods-list.html (+2/-0)
src/maasserver/static/scss/_maas.scss (+4/-0)
src/maasserver/static/scss/_tables.scss (+2/-2)
src/maasserver/templates/maasserver/base.html (+3/-0)
src/maasserver/templates/maasserver/index.html (+6/-0)
src/maasserver/templates/maasserver/js-conf.html (+1/-2)
src/maasserver/testing/factory.py (+5/-40)
src/maasserver/tests/test_auth.py (+0/-11)
src/maasserver/tests/test_node_action.py (+13/-27)
src/maasserver/tests/test_node_constraint_filter_forms.py (+70/-0)
src/maasserver/triggers/__init__.py (+6/-0)
src/maasserver/triggers/testing.py (+16/-0)
src/maasserver/triggers/tests/test_init.py (+6/-0)
src/maasserver/triggers/tests/test_websocket_listener.py (+214/-0)
src/maasserver/triggers/websocket.py (+66/-0)
src/maasserver/urls_api.py (+14/-1)
src/maasserver/websockets/base.py (+4/-0)
src/maasserver/websockets/handlers/__init__.py (+2/-0)
src/maasserver/websockets/handlers/machine.py (+8/-0)
src/maasserver/websockets/handlers/node.py (+3/-6)
src/maasserver/websockets/handlers/pod.py (+5/-0)
src/maasserver/websockets/handlers/resourcepool.py (+68/-0)
src/maasserver/websockets/handlers/tests/test_machine.py (+9/-14)
src/maasserver/websockets/handlers/tests/test_pod.py (+30/-84)
src/maasserver/websockets/handlers/tests/test_resourcepool.py (+89/-0)
src/maasserver/websockets/tests/test_protocol.py (+2/-0)
~ack/maas:resource-pools-2.4
- MAAS Lander: Approve
- MAAS Maintainers: Pending requested
-
Diff: 1718 lines (+553/-249)32 files modifiedsrc/maasserver/api/pods.py (+21/-3)
src/maasserver/api/tests/test_machines.py (+1/-1)
src/maasserver/api/tests/test_pods.py (+101/-1)
src/maasserver/forms/pods.py (+13/-5)
src/maasserver/forms/tests/test_pods.py (+89/-20)
src/maasserver/migrations/builtin/maasserver/0158_pod_default_pool_to_pod.py (+20/-0)
src/maasserver/migrations/builtin/maasserver/0159_pod_storage_pools.py (+43/-0)
src/maasserver/migrations/builtin/maasserver/0160_storage_pools_notification.py (+37/-0)
src/maasserver/migrations/builtin/maasserver/0161_userprofile_auth_last_check_no_now_default.py (+23/-0)
src/maasserver/models/bmc.py (+10/-6)
src/maasserver/models/tests/test_bmc.py (+12/-13)
src/maasserver/node_action.py (+2/-6)
src/maasserver/static/css/build.css (+1/-1)
src/maasserver/static/js/angular/controllers/nodes_list.js (+46/-26)
src/maasserver/static/js/angular/controllers/pod_details.js (+1/-0)
src/maasserver/static/js/angular/controllers/tests/test_nodes_list.js (+37/-7)
src/maasserver/static/js/angular/controllers/tests/test_pod_details.js (+13/-0)
src/maasserver/static/js/angular/directives/machines_table.js (+4/-7)
src/maasserver/static/js/angular/directives/tests/test_machines_table.js (+6/-21)
src/maasserver/static/js/bundle/maas-min.js (+1/-1)
src/maasserver/static/js/bundle/maas-min.js.map (+1/-1)
src/maasserver/static/partials/machines-table.html (+6/-10)
src/maasserver/static/partials/nodes-list.html (+22/-17)
src/maasserver/static/partials/pod-details.html (+2/-0)
src/maasserver/static/scss/_maas.scss (+4/-0)
src/maasserver/static/scss/_tables.scss (+2/-2)
src/maasserver/testing/factory.py (+4/-1)
src/maasserver/tests/test_node_action.py (+0/-11)
src/maasserver/websockets/handlers/pod.py (+3/-3)
src/maasserver/websockets/handlers/resourcepool.py (+1/-0)
src/maasserver/websockets/handlers/tests/test_pod.py (+20/-86)
src/maasserver/websockets/handlers/tests/test_resourcepool.py (+7/-0)
~ack/maas:resource-pools-2.4
- MAAS Lander: Approve
- MAAS Maintainers: Pending requested
-
Diff: 6862 lines (+2422/-1271)96 files modifieddev/null (+0/-145)
src/maasserver/api/machines.py (+11/-4)
src/maasserver/api/nodes.py (+9/-0)
src/maasserver/api/pods.py (+21/-3)
src/maasserver/api/resourcepools.py (+90/-0)
src/maasserver/api/tests/test_commissioning.py (+0/-4)
src/maasserver/api/tests/test_enlistment.py (+2/-0)
src/maasserver/api/tests/test_maas.py (+1/-2)
src/maasserver/api/tests/test_machine.py (+13/-0)
src/maasserver/api/tests/test_machines.py (+59/-39)
src/maasserver/api/tests/test_nodes.py (+28/-2)
src/maasserver/api/tests/test_pods.py (+101/-1)
src/maasserver/api/tests/test_resourcepool.py (+105/-0)
src/maasserver/api/tests/test_resourcepools.py (+59/-0)
src/maasserver/api/tests/test_tag.py (+13/-14)
src/maasserver/api/users.py (+1/-0)
src/maasserver/config.py (+0/-4)
src/maasserver/context_processors.py (+2/-6)
src/maasserver/forms/__init__.py (+7/-77)
src/maasserver/forms/pods.py (+17/-21)
src/maasserver/forms/tests/test_machine.py (+1/-0)
src/maasserver/forms/tests/test_node.py (+1/-0)
src/maasserver/forms/tests/test_pods.py (+212/-134)
src/maasserver/forms/tests/test_resourcepool.py (+0/-31)
src/maasserver/forms/tests/test_user.py (+0/-20)
src/maasserver/migrations/builtin/maasserver/0141_add_default_usergroup.py (+4/-4)
src/maasserver/migrations/builtin/maasserver/0157_drop_usergroup_and_role.py (+48/-0)
src/maasserver/migrations/builtin/maasserver/0158_pod_default_pool_to_pod.py (+20/-0)
src/maasserver/migrations/builtin/maasserver/0159_pod_storage_pools.py (+43/-0)
src/maasserver/migrations/builtin/maasserver/0160_storage_pools_notification.py (+37/-0)
src/maasserver/migrations/builtin/maasserver/0161_userprofile_auth_last_check_no_now_default.py (+23/-0)
src/maasserver/models/__init__.py (+3/-19)
src/maasserver/models/bmc.py (+10/-6)
src/maasserver/models/node.py (+1/-7)
src/maasserver/models/resourcepool.py (+0/-120)
src/maasserver/models/tests/test_bmc.py (+12/-13)
src/maasserver/models/tests/test_node.py (+5/-80)
src/maasserver/models/tests/test_resourcepool.py (+0/-155)
src/maasserver/models/tests/test_userprofile.py (+0/-15)
src/maasserver/models/user.py (+0/-5)
src/maasserver/models/userprofile.py (+0/-8)
src/maasserver/node_action.py (+22/-1)
src/maasserver/node_constraint_filter_forms.py (+45/-0)
src/maasserver/static/css/build.css (+1/-1)
src/maasserver/static/js/angular/controllers/add_hardware.js (+23/-5)
src/maasserver/static/js/angular/controllers/node_details.js (+19/-2)
src/maasserver/static/js/angular/controllers/nodes_list.js (+105/-26)
src/maasserver/static/js/angular/controllers/pod_details.js (+7/-2)
src/maasserver/static/js/angular/controllers/pods_list.js (+7/-3)
src/maasserver/static/js/angular/controllers/tests/test_add_hardware.js (+19/-3)
src/maasserver/static/js/angular/controllers/tests/test_node_details.js (+34/-7)
src/maasserver/static/js/angular/controllers/tests/test_nodes_list.js (+196/-2)
src/maasserver/static/js/angular/controllers/tests/test_pod_details.js (+20/-2)
src/maasserver/static/js/angular/controllers/tests/test_pods_list.js (+22/-2)
src/maasserver/static/js/angular/directives/machines_table.js (+4/-7)
src/maasserver/static/js/angular/directives/tests/test_machines_table.js (+6/-21)
src/maasserver/static/js/angular/factories/machines.js (+3/-0)
src/maasserver/static/js/angular/factories/resourcepools.js (+42/-0)
src/maasserver/static/js/angular/factories/tests/test_machines.js (+1/-1)
src/maasserver/static/js/angular/factories/tests/test_resourcepools.js (+42/-0)
src/maasserver/static/js/angular/filters/nodes.js (+3/-0)
src/maasserver/static/js/angular/filters/tests/test_nodes.js (+15/-0)
src/maasserver/static/js/angular/maas.js (+2/-5)
src/maasserver/static/js/bundle/maas-min.js (+1/-1)
src/maasserver/static/js/bundle/maas-min.js.map (+1/-1)
src/maasserver/static/partials/cards/machine.html (+1/-1)
src/maasserver/static/partials/machines-table.html (+6/-12)
src/maasserver/static/partials/node-details.html (+1/-1)
src/maasserver/static/partials/nodes-list.html (+145/-25)
src/maasserver/static/partials/pod-details.html (+22/-14)
src/maasserver/static/partials/pods-list.html (+2/-0)
src/maasserver/static/scss/_maas.scss (+4/-0)
src/maasserver/static/scss/_tables.scss (+2/-2)
src/maasserver/templates/maasserver/base.html (+3/-0)
src/maasserver/templates/maasserver/index.html (+6/-0)
src/maasserver/templates/maasserver/js-conf.html (+1/-2)
src/maasserver/testing/factory.py (+5/-40)
src/maasserver/tests/test_auth.py (+0/-11)
src/maasserver/tests/test_node_action.py (+13/-27)
src/maasserver/tests/test_node_constraint_filter_forms.py (+70/-0)
src/maasserver/triggers/__init__.py (+6/-0)
src/maasserver/triggers/testing.py (+16/-0)
src/maasserver/triggers/tests/test_init.py (+6/-0)
src/maasserver/triggers/tests/test_websocket_listener.py (+214/-0)
src/maasserver/triggers/websocket.py (+66/-0)
src/maasserver/urls_api.py (+14/-1)
src/maasserver/websockets/base.py (+4/-0)
src/maasserver/websockets/handlers/__init__.py (+2/-0)
src/maasserver/websockets/handlers/machine.py (+8/-0)
src/maasserver/websockets/handlers/node.py (+3/-6)
src/maasserver/websockets/handlers/pod.py (+5/-0)
src/maasserver/websockets/handlers/resourcepool.py (+68/-0)
src/maasserver/websockets/handlers/tests/test_machine.py (+9/-14)
src/maasserver/websockets/handlers/tests/test_pod.py (+30/-84)
src/maasserver/websockets/handlers/tests/test_resourcepool.py (+89/-0)
src/maasserver/websockets/tests/test_protocol.py (+2/-0)
~bjornt/maas:bug-1773454-pool-assign-multiple
- Alberto Donato (community): Approve
- MAAS Lander: Pending (unittests) requested
-
Diff: 255 lines (+63/-40)4 files modifiedsrc/maasserver/node_action.py (+2/-6)
src/maasserver/static/js/angular/controllers/nodes_list.js (+36/-19)
src/maasserver/static/js/angular/controllers/tests/test_nodes_list.js (+25/-4)
src/maasserver/tests/test_node_action.py (+0/-11)
Changed in maas: | |
milestone: | none → 2.5.0 |
importance: | Undecided → High |
status: | New → Triaged |
assignee: | nobody → Björn Tillenius (bjornt) |
tags: | added: resource-pools |
Changed in maas: | |
status: | Triaged → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
milestone: | 2.5.0 → 2.5.0alpha1 |
Changed in maas: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.