~juju-qa/ubuntu/xenial/juju/2.0-rc2

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/worker/deployer/deployer.go

  • Committer: Nicholas Skaggs
  • Date: 2016-09-30 14:39:30 UTC
  • mfrom: (1.8.1)
  • Revision ID: nicholas.skaggs@canonical.com-20160930143930-vwwhrefh6ftckccy
import upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
        "github.com/juju/juju/agent"
16
16
        apideployer "github.com/juju/juju/api/deployer"
17
17
        "github.com/juju/juju/apiserver/params"
 
18
        "github.com/juju/juju/status"
18
19
        "github.com/juju/juju/watcher"
19
20
        "github.com/juju/juju/worker"
20
21
)
151
152
        if d.deployed.Contains(unit.Name()) {
152
153
                panic("must not re-deploy a deployed unit")
153
154
        }
 
155
        if err := unit.SetStatus(status.Waiting, status.MessageInstallingAgent, nil); err != nil {
 
156
                return errors.Trace(err)
 
157
        }
154
158
        logger.Infof("deploying unit %q", unitName)
155
159
        initialPassword, err := utils.RandomPassword()
156
160
        if err != nil {