Curtin failure is not detected as an installation script failure

Bug #1701352 reported by Lee Trager
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Low
Lee Trager

Bug Description

When Curtin signals its status using the status handler. On Curtin completion it includes a value with the Curtin output. MAAS stores this file as a script result. However Curtin doesn't include a return code so the default, 0, is used. When 0 is used MAAS assumes the script result passed. The machine is still put into failed_deployment, the script result needs to be failed as well.

Related branches

Revision history for this message
Andres Rodriguez (andreserl) wrote :

can you provide more logs, information on how this is causing an error ? If the machine was marked failed deployment even though the curtin log was passed successfully, there may be a different reason why it was marked failed deployment.

For example, curtin may work successfully, but cloud-init failed and because of that, marked the machine as failed.

That said, this is a log, not a script result. As such, this should not be treated as one with status codes.

Changed in maas:
status: In Progress → Triaged
milestone: none → 2.3.0
assignee: Lee Trager (ltrager) → nobody
importance: High → Low
status: Triaged → Incomplete
Revision history for this message
Lee Trager (ltrager) wrote :

This is triggered whenever Curtin fails to deploy, I discovered it while testing CentOS updates which have since been fixed. MAAS has always stored installation logs as results. Previously they were stored as NodeResults, now ScriptResults. Both models store the return code and when none is given default to 0.

With ScriptResults MAAS also stores the status, if none is set its determined by looking at the return code. So because no return code or status is set the status is set to passed. The UI and API use ScriptSet.status to show the user what the overall status of commissioning, testing, and installation are. The result is while the node is still put into FAILED_DEPLOYMENT and the installation log shows an error, the UI displays a green check instead of a red x. Likewise

maas <profile> node-script-results read <system> type=installation | jq -r '.[0]["status_name"]'

Will always return 'Passed' even though one look at the log file shows that is not true.

Changed in maas:
status: Incomplete → Triaged
Changed in maas:
milestone: 2.3.0 → 2.3.x
Lee Trager (ltrager)
Changed in maas:
assignee: nobody → Lee Trager (ltrager)
milestone: 2.3.x → 2.4.0rc2
status: Triaged → In Progress
milestone: 2.4.0rc2 → 2.4.0rc1
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
milestone: 2.4.0rc1 → 2.4.0beta3
Changed in maas:
status: Fix Committed → Fix Released
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.