Skip to content

Commit

Permalink
provision/swarm: ignores task status for register unit
Browse files Browse the repository at this point in the history
  • Loading branch information
andrestc committed Jun 13, 2017
1 parent 624b214 commit 3c38fb4
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions provision/swarm/provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,16 @@ func (p *swarmProvisioner) RegisterUnit(a provision.App, unitId string, customDa
if err != nil {
return err
}
units, err := tasksToUnits(client, []swarm.Task{*task})
service, err := client.InspectService(task.ServiceID)
if err != nil {
return err
return errors.WithStack(err)
}
node, err := client.InspectNode(task.NodeID)
if err != nil {
return errors.WithStack(err)
}
err = bindUnit(a, &units[0])
unit := taskToUnit(task, service, node, a)
err = bindUnit(a, &unit)
if err != nil {
return err
}
Expand Down

0 comments on commit 3c38fb4

Please sign in to comment.