tabular format does not give enough details about machine provisioning errors

Bug #1478156 reported by Marco Ceppi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Eric Snow
1.25
Fix Released
High
Eric Snow

Bug Description

Since tabular format is going to be default it needs to elevate machine provisioning errors. When running `juju status --format=tabular` or using the Juju flag for status 2.0, when a machine fails to provision this is what's provided (see machine 5)

http://paste.ubuntu.com/11933352/

When --format yaml is used, the user will actually see the error

http://paste.ubuntu.com/11933358/

It seems agent-state-info is the key, but it should be easy to determine that when an a provisioning error is made the STATE field (empty atm) could have an "error" or "provisioning error" if error is already used. As to the untrained eye it seems like GCE is just taking a long ass time to create the instance since inst-id is pending.

Tags: charmers
Curtis Hovey (sinzui)
Changed in juju-core:
status: New → Triaged
importance: Undecided → High
milestone: none → 1.25.0
summary: - summary format does not give enough details about machine provisioning
+ tabular format does not give enough details about machine provisioning
errors
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 1.25-alpha1 → 1.25-beta1
Changed in juju-core:
milestone: 1.25-beta1 → 1.25.1
Changed in juju-core:
assignee: nobody → Eric Snow (ericsnowcurrently)
status: Triaged → In Progress
milestone: 1.25.1 → 1.26.0
milestone: 1.26.0 → none
Revision history for this message
Eric Snow (ericsnowcurrently) wrote :

From what I can tell, the message in "agent-state-info" indicates that provisioning failed. If that were the case then AgentState should have been set to "error". [1] Instead it appears to be unset. This implies to me that there is a bug in how instance provisioning failures are handled. I'm going to look into that here. If it turns out I've misunderstood then I'll circle back to injecting a more meaningful message in this case.

[1] https://github.com/juju/juju/blob/ab40176fcf72/worker/provisioner/provisioner_task.go#L703

Revision history for this message
Eric Snow (ericsnowcurrently) wrote :

I've verified that the right thing isn't happening here. If I call task.setErrorStatus (and return) at the beginning of the startMachine method (in worker/provisioner/provisioner_task.go) then I get exactly the same situation. Status reports the correct "agent-state-info" but "agent-state" is not set. So I'm on the right trail.

Revision history for this message
Eric Snow (ericsnowcurrently) wrote :

TestProvisionerSetsErrorStatusWhenStartInstanceFailed (in worker/provisioner) should cover any direct problems so I'm guessing that there's an indirect problem here. Most likely there's some code that sets the status after provisioning happens.

Revision history for this message
Eric Snow (ericsnowcurrently) wrote :

Ah, there's a silenced panic coming out of task.setErrorStatus (in worker/provision). Getting closer!

Revision history for this message
Eric Snow (ericsnowcurrently) wrote :

hmm. Looks like there wasn't a panic after all.

Revision history for this message
Eric Snow (ericsnowcurrently) wrote :

At this point I suspect that the status formatter isn't pulling the right info or is doing so in a selective way (incorrectly).

Revision history for this message
Eric Snow (ericsnowcurrently) wrote :
Changed in juju-core:
milestone: none → 1.26-alpha1
Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
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.