~jameinel/juju-core/api-facade-registry

« back to all changes in this revision

Viewing changes to worker/provisioner/lxc-broker.go

  • Committer: John Arbash Meinel
  • Date: 2014-05-14 12:29:15 UTC
  • mfrom: (2715.2.15 juju-core)
  • Revision ID: john@arbash-meinel.com-20140514122915-lf70e9bkkxx9m11q
Merge trunk r2730

Show diffs side-by-side

added added

removed removed

Lines of Context:
102
102
}
103
103
 
104
104
// StopInstances shuts down the given instances.
105
 
func (broker *lxcBroker) StopInstances(instances []instance.Instance) error {
 
105
func (broker *lxcBroker) StopInstances(ids ...instance.Id) error {
106
106
        // TODO: potentially parallelise.
107
 
        for _, instance := range instances {
108
 
                lxcLogger.Infof("stopping lxc container for instance: %s", instance.Id())
109
 
                if err := broker.manager.DestroyContainer(instance); err != nil {
 
107
        for _, id := range ids {
 
108
                lxcLogger.Infof("stopping lxc container for instance: %s", id)
 
109
                if err := broker.manager.DestroyContainer(id); err != nil {
110
110
                        lxcLogger.Errorf("container did not stop: %v", err)
111
111
                        return err
112
112
                }