Mark broken, Mark Fixed seems to un-deploy the node

Bug #1834500 reported by Jay Kuri
28
This bug affects 6 people
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

Changed in maas:
status: New → In Progress
assignee: nobody → Newell Jensen (newell-jensen)
importance: Undecided → High
milestone: none → 2.7.0alpha1
Revision history for this message
Haw Loeung (hloeung) wrote :

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='myworkingmachine';

-- 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)

Changed in maas:
status: In Progress → Fix Committed
Revision history for this message
Ramon Grullon (rgrullon) wrote :

Can confirm issue is present in MAAS 2.5.2.

Reproducing steps identical to original post.

My customer had to put machine into Broken state for a DIMM replacement. Once the maintenance was done, he clicked fixed and powered on machine. Its now in a Ready state. I expected the machine to return to a deployed state.

Changed in maas:
status: Fix Committed → Fix Released
Revision history for this message
Douglas Santos de Oliveira (douglasddr8) wrote (last edit ):

I can confirm this issue present on MAAS 2.9.2

Identical steps.

Update: Problem solved with Haw Loeung workaround suggestion.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.