[2.3, HWTv2] Machines changing states due to maas aborted operations may leave machines with 'pending' tests
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Lee Trager |
Bug Description
I had a machine that automatically transitioned from COMMISSIONING to NEW, and MAAS didn't abort the commissioning scripts nor the test scripts. In fact MAAS showed them as 'pending'.
This is how I reproduced it:
1. Add a machine with random power parameters e.g.
- AMT, random password, random IP
2. Machine will be added with power 'Unknown' and in state 'Commissioning'
3. After a while, machine will transition from COMMISSIONING to NEW. Logs show:
==> /var/log/
Nov 8 21:50:15 maas maas.node: [info] another: Status transition from NEW to COMMISSIONING
Nov 8 21:50:15 maas maas.node: [warn] another: Could not start node for commissioning; it must be started manually
4. The machine listing page shows a couple bad things (see screenshot)
4.1. The overall health status warning icon with tooltip "Machine has failed tests. use with caution!"
4.2. Pending tests (in this case just storage test as it was the only enabled.
4.3. In the machine details page 'Commissioning' and 'Hardware testing' tab, it shows scripts as 'Pending'.
Expected behavior:
1. The expected behavior is that scripts both commissioning and testing, to have been marked aborted in the DB.
Note his is *not* only a UI issue. This is also a backend issue where MAAS is not marked the tests as aborted.
Related branches
- Blake Rouse (community): Approve
- MAAS Lander: Needs Fixing
- Andres Rodriguez (community): Approve
-
Diff: 110 lines (+64/-5)2 files modifiedsrc/maasserver/models/node.py (+38/-3)
src/maasserver/models/tests/test_node.py (+26/-2)
summary: |
- [2.3, HWTv2] Machines changing states due to aborted operations may + [2.3, HWTv2] Machines changing states due to maas aborted operations may leave machines with 'pending' tests |
Changed in maas: | |
status: | Triaged → In Progress |
Changed in maas: | |
milestone: | 2.3.0rc2 → 2.3.0 |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |