Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(5074)

Issue 93720044: worker/provisioner: no tools is an error

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years ago by jameinel
Modified:
10 years ago
Reviewers:
mp+217011, natefinch, fwereade
Visibility:
Public.

Description

worker/provisioner: no tools is an error We were treating no tools found as an error of the Provisioner, rather than an error with the machine we were trying to provision (bug #1311676). This now sets the status of the machine to an error state, which lets us continue with our lives. In the original bug about not having tools, it was shown that in the local provider, doing juju bootstrap -e local juju deploy -e local precise/ubuntu juju deploy -e local trusty/ubuntu ubuntu-t Would end up with both machines stuck in Pending. Now it says: $ juju status -e local environment: local machines: "0": agent-state: started agent-version: 1.18.2.1 dns-name: localhost instance-id: localhost series: trusty "1": agent-state-info: '(error: no matching tools available)' instance-id: pending series: precise "2": agent-state: started agent-version: 1.18.2.1 dns-name: 10.0.3.194 instance-id: jameinel-local-machine-2 series: trusty hardware: arch=amd64 And you can see that it succeeded in deploying trusty because it put precise into an error state. https://code.launchpad.net/~jameinel/juju-core/1.18-provisioner-no-tools-is-fatal-1311676/+merge/217011 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -1 line) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M worker/provisioner/provisioner_task.go View 1 chunk +7 lines, -1 line 1 comment Download
M worker/provisioner/provisioner_test.go View 1 chunk +35 lines, -0 lines 0 comments Download

Messages

Total messages: 3
jameinel
Please take a look.
10 years ago (2014-04-24 09:31:35 UTC) #1
natefinch
LGTM
10 years ago (2014-04-24 09:52:02 UTC) #2
fwereade
10 years ago (2014-04-24 10:11:19 UTC) #3
LGTM if either use the existing method or have some good reason why it's
unsuitable.

https://codereview.appspot.com/93720044/diff/1/worker/provisioner/provisioner...
File worker/provisioner/provisioner_task.go (right):

https://codereview.appspot.com/93720044/diff/1/worker/provisioner/provisioner...
worker/provisioner/provisioner_task.go:423: if err1 :=
machine.SetStatus(params.StatusError, err.Error(), nil); err1 != nil {
isn't there a setErrorStatus method already?
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b