mirror of
https://github.com/kemko/nomad.git
synced 2026-01-05 09:55:44 +03:00
drivers: Implement InternalPluginDriver interface
This implements the InternalPluginDriver interface in each driver, and calls the cancellation fn for their respective eventers. This fixes a per task goroutine leak during test suite execution.
This commit is contained in:
@@ -1242,3 +1242,7 @@ func sliceMergeUlimit(ulimitsRaw map[string]string) ([]docker.ULimit, error) {
|
||||
}
|
||||
return ulimits, nil
|
||||
}
|
||||
|
||||
func (d *Driver) Shutdown() {
|
||||
d.signalShutdown()
|
||||
}
|
||||
|
||||
@@ -143,9 +143,8 @@ func (d *Driver) SetConfig(cfg *base.Config) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *Driver) Shutdown(ctx context.Context) error {
|
||||
func (d *Driver) Shutdown() {
|
||||
d.signalShutdown()
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *Driver) TaskConfigSchema() (*hclspec.Spec, error) {
|
||||
|
||||
@@ -556,3 +556,7 @@ func GetAbsolutePath(bin string) (string, error) {
|
||||
|
||||
return filepath.EvalSymlinks(lp)
|
||||
}
|
||||
|
||||
func (d *Driver) Shutdown() {
|
||||
d.signalShutdown()
|
||||
}
|
||||
|
||||
@@ -216,9 +216,8 @@ func (d *Driver) SetConfig(cfg *base.Config) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *Driver) Shutdown(ctx context.Context) error {
|
||||
func (d *Driver) Shutdown() {
|
||||
d.signalShutdown()
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *Driver) TaskConfigSchema() (*hclspec.Spec, error) {
|
||||
|
||||
@@ -550,3 +550,7 @@ func (d *Driver) GetHandle(taskID string) *taskHandle {
|
||||
h, _ := d.tasks.Get(taskID)
|
||||
return h
|
||||
}
|
||||
|
||||
func (d *Driver) Shutdown() {
|
||||
d.signalShutdown()
|
||||
}
|
||||
|
||||
@@ -644,3 +644,7 @@ func sendQemuShutdown(logger hclog.Logger, monitorPath string, userPid int) erro
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (d *Driver) Shutdown() {
|
||||
d.signalShutdown()
|
||||
}
|
||||
|
||||
@@ -189,9 +189,8 @@ func (d *Driver) SetConfig(cfg *base.Config) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *Driver) Shutdown(ctx context.Context) error {
|
||||
func (d *Driver) Shutdown() {
|
||||
d.signalShutdown()
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *Driver) TaskConfigSchema() (*hclspec.Spec, error) {
|
||||
|
||||
@@ -1054,3 +1054,7 @@ func (d *Driver) handleWait(ctx context.Context, handle *taskHandle, ch chan *dr
|
||||
case ch <- result:
|
||||
}
|
||||
}
|
||||
|
||||
func (d *Driver) Shutdown() {
|
||||
d.signalShutdown()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user