Mark broken, Mark Fixed seems to un-deploy the node
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Newell Jensen | ||
2.6 |
Fix Released
|
Medium
|
Newell Jensen |
Bug Description
In MAAS 2.3.5, when you mark an already Deployed node broken, and then mark it fixed, it returns the node to the 'Ready' state instead of Deployed.
What I did:
In MAAS UI, I was on the node view screen, and I clicked 'Mark Broken' and later clicked 'Mark Fixed'
What I expected:
The unit would be unmodified by maas while marked broken, and return to 'Deployed' when marked fixed.
What happened instead:
The unit was unmodified by maas while broken, but upon clicking 'Mark Fixed' it set the unit's status to 'Ready' instead of 'Deployed'
Details:
When performing some maintenance in two separate MAAS clouds, both running 2.3.5, I performed the above actions, marking a node broken while working on it, then marking it fixed when complete. This caused the units to return to 'Ready' status rather than 'Deployed' as expected.
I spoke with Andres Rodriguez about it and he agreed with what I expected, and upon testing himself saw the same behavior ('Deployed' -> mark broken -> mark fixed -> 'Ready')
Related branches
- MAAS Maintainers: Pending requested
-
Diff: 3421 lines (+1314/-676) (has conflicts)36 files modified.eslintrc.js (+3/-0)
Makefile (+7/-0)
debian/changelog (+11/-1)
debian/copyright (+0/-4)
dev/null (+0/-631)
jest.config.js (+6/-0)
package.json (+16/-0)
src/maasserver/models/signals/scriptresult.py (+6/-0)
src/maasserver/models/signals/tests/test_scriptresult.py (+13/-0)
src/maasserver/static/js/angular/controllers/pods_list.js (+5/-0)
src/maasserver/static/js/angular/controllers/settings.js (+114/-0)
src/maasserver/static/js/angular/controllers/tests/test_pods_list.js (+5/-0)
src/maasserver/static/js/angular/controllers/tests/test_settings.js (+264/-0)
src/maasserver/static/js/angular/controllers/tests/test_zones_list.js (+4/-0)
src/maasserver/static/js/angular/directives/machines_table.js (+31/-9)
src/maasserver/static/js/angular/directives/script_status.js (+3/-0)
src/maasserver/static/js/angular/directives/tests/test_machines_table.js (+30/-0)
src/maasserver/static/js/angular/entry.js (+1/-7)
src/maasserver/static/js/bundle/maas-min.js (+4/-0)
src/maasserver/static/js/bundle/maas-min.js.map (+5/-1)
src/maasserver/static/js/bundle/vendor-min.js (+4/-0)
src/maasserver/static/js/bundle/vendor-min.js.map (+5/-1)
src/maasserver/static/partials/dashboard.html (+1/-1)
src/maasserver/static/partials/machines-table.html (+24/-2)
src/maasserver/static/partials/networks-list.html (+2/-2)
src/maasserver/static/partials/node-events.html (+1/-1)
src/maasserver/static/partials/nodes-list.html (+66/-2)
src/maasserver/static/partials/pods-list.html (+5/-0)
src/maasserver/static/partials/subnet-details.html (+1/-1)
src/maasserver/static/partials/switches-table.html (+1/-1)
src/maasserver/static/partials/zones-list.html (+6/-0)
src/maasserver/testing/html-loader.js (+0/-0)
src/metadataserver/user_data/templates/snippets/maas_run_remote_scripts.py (+8/-0)
src/metadataserver/user_data/templates/snippets/tests/test_maas_run_remote_scripts.py (+20/-0)
src/provisioningserver/utils/version.py (+4/-0)
yarn.lock (+638/-12)
- Newell Jensen (community): Approve
-
Diff: 72 lines (+12/-5)5 files modifiedsrc/maasserver/models/node.py (+4/-1)
src/maasserver/models/tests/test_node.py (+6/-0)
src/maasserver/node_action.py (+0/-3)
src/maasserver/node_status.py (+1/-0)
src/maasserver/tests/test_node_action.py (+1/-1)
- Lee Trager (community): Approve
- Alberto Donato (community): Approve
-
Diff: 72 lines (+12/-5)5 files modifiedsrc/maasserver/models/node.py (+4/-1)
src/maasserver/models/tests/test_node.py (+6/-0)
src/maasserver/node_action.py (+0/-3)
src/maasserver/node_status.py (+1/-0)
src/maasserver/tests/test_node_action.py (+1/-1)
Changed in maas: | |
status: | New → In Progress |
assignee: | nobody → Newell Jensen (newell-jensen) |
importance: | Undecided → High |
milestone: | none → 2.7.0alpha1 |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
Per Jay's findings, current workaround involves DB surgery below:
How to reset state in the maasdb database (to 'Deployed')
On the maas machine:
sudo maas-region dbshell
-- find node system_id (get it from maas UI, at the end of the url: #/node/xxxxxx)
-- find owner_id (for maas-root, or main maas user if maas-root is incorrect) - easiest way is to find a working machine that is owned by that user also:
maasdb=# select id, system_id, owner_id, hostname, status, previous_status, power_state from maasserver_node where hostname= 'myworkingmachi ne';
-- assuming your owner_id is 3, and your system_id of your broken machine is 'xyzpd4'
update maasserver_node set owner_id=3, status=6 where system_id='xyzpd4';
-- this will put your machine back in the correct status and with the correct owner. (Owner will be wiped on the previous transition to READY, it seems)