This commit ensures that when a plugin instance is closed the goroutines
responsible for streaming stdout and stderr of the called binary will
also exit, preventing a goroutines leak.
Before this commit these goroutines could stay blocked forever if
Close() was called while the binary still had some pending output.
I found this bug after debugging a real world goroutine leak, the
goroutines dump would show thousands of goroutines at:
```
github.com/tsuru/tsuru/vendor/github.com/docker/machine/libmachine/drivers/plugin/localbinary.stream(0xc023013d80, 0xc0000aad20)
/home/travis/gopath/src/github.com/tsuru/tsuru/vendor/github.com/docker/machine/libmachine/drivers/plugin/localbinary/plugin.go:177 +0x7c
created by github.com/tsuru/tsuru/vendor/github.com/docker/machine/libmachine/drivers/plugin/localbinary.(*Plugin).AttachStream
/home/travis/gopath/src/github.com/tsuru/tsuru/vendor/github.com/docker/machine/libmachine/drivers/plugin/localbinary/plugin.go:183 +0x67
```
Signed-off-by: Cezar Sa Espinola <cezarsa@gmail.com>
With this commit the RPC client driver tries closing the plugin binary
even when closing the driver server fails. This prevents the driver
process from entering in <defunct> state when it failed before closing.
Signed-off-by: André Carvalho <asantostc@gmail.com>
This change provide more information which exact binary for
particular driver is missing in PATH
Signed-off-by: Alexander Kanevskiy <kad@linux.intel.com>
The new driver uses Azure Resource Manager APIs and offers a lot
more functionality compared to the old Azure driver. It is also
easier to authenticate and does not require user to create and place
certificate files. It only has a single required argument.
This is a breaking change: The new driver cannot work with machines
created with the older Azure driver and vice versa (as the APIs are
entirely different and resources are not shared between old/new azure
APIs).
The new driver addresses many issues about the azure driver reported
so far.
This resolves#2742, resolves#1368, resolves#1142, resolves#2236,
resolves#2408, resolves#1126, resolves#774.
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
This commit temporarily removes Azure driver and its dependencies
from the source tree and adds dependencies for the new Azure driver
(so that Azure driver PR will not have godeps changes and will be
easier to review).
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Added compatibility for both 5.0 and 5.1 RPC plugins.
Addresses #2325
Signed-off-by: Jeff Nickoloff <jeff@allingeek.com>
modified: libmachine/drivers/plugin/register_driver.go
modified: libmachine/drivers/rpc/client_driver.go