worker/modelupgrade: set model status #7609

Merged
merged 1 commit into from Jul 10, 2017

Conversation

Projects
None yet
3 participants
Member

axw commented Jul 10, 2017

Description of change

Set model status before and after upgrading the
model's environ. Allow the "error" status for
models, so that we can indicate that the model
requires attention (e.g. credentials are out of
date and need to be refreshed.)

QA steps

  1. juju bootstrap localhost
  2. modify provider code, bumping provider version to 1, and introducing an environ upgrade step that fails
  3. juju upgrade-juju -m controller
  4. observe model status indicates a failure occurred
  5. fix the provider code, re-run juju upgrade-juju -m controller
  6. observe model status is back to normal

Documentation changes

None.

Bug reference

https://bugs.launchpad.net/juju/+bug/1700451

I think we need to surface the actual error in the status message so the user know what went wrong

worker/modelupgrader/worker.go
@@ -174,8 +189,14 @@ func newUpgradeWorker(config Config, targetVersion int) (worker.Worker, error) {
targetVersion,
setVersion,
); err != nil {
+ if err := setStatus(status.Error, "failed to upgrade environ"); err != nil {
@wallyworld

wallyworld Jul 10, 2017

Owner

what not include the error in the status message?

@axw

axw Jul 10, 2017

Member

I thought it might be TMI for non-controller admins. I'll include it, we can change based on feedback.

worker/modelupgrade: set model status
Set model status before and after upgrading the
model's environ. Allow the "error" status for
models, so that we can indicate that the model
requires attention (e.g. credentials are out of
date and need to be refreshed.)
Member

axw commented Jul 10, 2017

$$merge$$

Contributor

jujubot commented Jul 10, 2017

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

@jujubot jujubot merged commit 2643110 into juju:2.2 Jul 10, 2017

1 check passed

github-check-merge-juju Ran tests against PR. Use !!.*!! to request another build. IE, !!build!!, !!retry!!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment