juju/juju — pull request #1026 by alesstimec (2014-11-03 15:40:04+00:00)
Title: Fixes bug #1364939

- Added RetryableCreationError type to the instance/instance.go, which indicates that something went
wrong during instance creationg, but the cleanup was successful and instance creation can safely be
retried
- Added transientErrorInjection channel to the dummy provider, which enables tests to
patch this variable to induce errors in instance creation (see PatchTransientErrorInjectionChannel function
and StartInstance function in provider/dummy/environs.go
- Added retry once code to the provisioner (provisioner_task.go) in case the RetryableCreationError
is received
- Added tests to the provisioner
- In the lxc.go added a destroy call if a container fails to start - we need to cleanup the environment
in case of errors - and a RetryableCreationError is returned
- Added tests to the lxc (via an error injection channel)