mirror of
https://github.com/kemko/nomad.git
synced 2026-01-07 19:05:42 +03:00
deps: update go-plugin to 1.6.2 (#24265)
During allocation recovery, the go-plugin reattachment workflow checks to see if the PID we stored in client state is still running. If so, we try to connect to that process. If that fails, we kill the process under the presumption it's not working. But during reattachment we don't know that the PID we have is still valid. Which means that the process we're trying to attach to may have exited and a different process has spawned with the same PID. This results in some unrelated process getting silently killed. Update go-plugin to 1.6.2, which includes a bug fix so we do not kill the process. Fixes: https://github.com/hashicorp/nomad/issues/23969
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
hclog "github.com/hashicorp/go-hclog"
|
||||
@@ -25,7 +26,6 @@ import (
|
||||
"github.com/hashicorp/nomad/plugins/drivers"
|
||||
"github.com/hashicorp/nomad/plugins/drivers/fsisolation"
|
||||
"github.com/hashicorp/nomad/plugins/shared/hclspec"
|
||||
testing "github.com/mitchellh/go-testing-interface"
|
||||
"github.com/shoenig/test/must"
|
||||
)
|
||||
|
||||
@@ -33,7 +33,7 @@ type DriverHarness struct {
|
||||
drivers.DriverPlugin
|
||||
client *plugin.GRPCClient
|
||||
server *plugin.GRPCServer
|
||||
t testing.T
|
||||
t *testing.T
|
||||
logger hclog.Logger
|
||||
impl drivers.DriverPlugin
|
||||
cgroup string
|
||||
@@ -42,7 +42,7 @@ type DriverHarness struct {
|
||||
func (h *DriverHarness) Impl() drivers.DriverPlugin {
|
||||
return h.impl
|
||||
}
|
||||
func NewDriverHarness(t testing.T, d drivers.DriverPlugin) *DriverHarness {
|
||||
func NewDriverHarness(t *testing.T, d drivers.DriverPlugin) *DriverHarness {
|
||||
logger := testlog.HCLogger(t).Named("driver_harness")
|
||||
pd := drivers.NewDriverPlugin(d, logger)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user