diff --git a/client/driver/executor/executor.go b/client/driver/executor/executor.go index 280f107c5..62c3b71af 100644 --- a/client/driver/executor/executor.go +++ b/client/driver/executor/executor.go @@ -68,7 +68,7 @@ type Executor interface { // Version returns the executor API version Version() (*ExecutorVersion, error) - // Stats fetchs process usage stats for the executor and each pid if availble + // Stats fetchs process usage stats for the executor and each pid if available Stats() (*cstructs.TaskResourceUsage, error) // Signal sends the given signal to the user process diff --git a/plugins/base/plugin.go b/plugins/base/plugin.go index 79c151ea4..32a369900 100644 --- a/plugins/base/plugin.go +++ b/plugins/base/plugin.go @@ -61,3 +61,8 @@ var MsgpackHandle = func() *codec.MsgpackHandle { func MsgPackDecode(buf []byte, out interface{}) error { return codec.NewDecoder(bytes.NewReader(buf), MsgpackHandle).Decode(out) } + +// MsgPackEncode is used to encode an object to MsgPack +func MsgPackEncode(b *[]byte, in interface{}) error { + return codec.NewEncoderBytes(b, MsgpackHandle).Encode(in) +} diff --git a/plugins/drivers/client.go b/plugins/drivers/client.go new file mode 100644 index 000000000..1d1631caf --- /dev/null +++ b/plugins/drivers/client.go @@ -0,0 +1,302 @@ +package drivers + +import ( + "errors" + "fmt" + "io" + "time" + + "github.com/golang/protobuf/ptypes" + hclog "github.com/hashicorp/go-hclog" + "github.com/hashicorp/nomad/plugins/base" + "github.com/hashicorp/nomad/plugins/drivers/proto" + "github.com/hashicorp/nomad/plugins/shared/hclspec" + "golang.org/x/net/context" +) + +var _ DriverPlugin = &driverPluginClient{} + +type driverPluginClient struct { + base.BasePluginClient + + client proto.DriverClient + logger hclog.Logger +} + +func (d *driverPluginClient) TaskConfigSchema() (*hclspec.Spec, error) { + req := &proto.TaskConfigSchemaRequest{} + + resp, err := d.client.TaskConfigSchema(context.Background(), req) + if err != nil { + return nil, err + } + + return resp.Spec, nil +} + +func (d *driverPluginClient) Capabilities() (*Capabilities, error) { + req := &proto.CapabilitiesRequest{} + + resp, err := d.client.Capabilities(context.Background(), req) + if err != nil { + return nil, err + } + + caps := &Capabilities{} + if resp.Capabilities != nil { + caps.SendSignals = resp.Capabilities.SendSignals + caps.Exec = resp.Capabilities.Exec + + switch resp.Capabilities.FsIsolation { + case proto.DriverCapabilities_NONE: + caps.FSIsolation = FSIsolationNone + case proto.DriverCapabilities_CHROOT: + caps.FSIsolation = FSIsolationChroot + case proto.DriverCapabilities_IMAGE: + caps.FSIsolation = FSIsolationImage + default: + caps.FSIsolation = FSIsolationNone + } + } + + return caps, nil +} + +// Fingerprint the driver, return a chan that will be pushed to periodically and on changes to health +func (d *driverPluginClient) Fingerprint(ctx context.Context) (<-chan *Fingerprint, error) { + req := &proto.FingerprintRequest{} + + stream, err := d.client.Fingerprint(context.Background(), req) + if err != nil { + return nil, err + } + + ch := make(chan *Fingerprint) + go d.handleFingerprint(ch, stream) + + return ch, nil +} + +func (d *driverPluginClient) handleFingerprint(ch chan *Fingerprint, stream proto.Driver_FingerprintClient) { + defer close(ch) + for { + pb, err := stream.Recv() + if err == io.EOF { + break + } + if err != nil { + d.logger.Error("error receiving stream from Fingerprint driver RPC", "error", err) + ch <- &Fingerprint{Err: fmt.Errorf("error from RPC stream: %v", err)} + break + } + f := &Fingerprint{ + Attributes: pb.Attributes, + Health: healthStateFromProto(pb.Health), + HealthDescription: pb.HealthDescription, + } + ch <- f + } + +} + +// RecoverTask does internal state recovery to be able to control the task of +// the given TaskHandle +func (d *driverPluginClient) RecoverTask(h *TaskHandle) error { + req := &proto.RecoverTaskRequest{Handle: taskHandleToProto(h)} + + _, err := d.client.RecoverTask(context.Background(), req) + return err +} + +// StartTask starts execution of a task with the given TaskConfig. A TaskHandle +// is returned to the caller that can be used to recover state of the task, +// should the driver crash or exit prematurely. +func (d *driverPluginClient) StartTask(c *TaskConfig) (*TaskHandle, error) { + req := &proto.StartTaskRequest{ + Task: taskConfigToProto(c), + } + + resp, err := d.client.StartTask(context.Background(), req) + if err != nil { + return nil, err + } + + return taskHandleFromProto(resp.Handle), nil +} + +// WaitTask returns a channel that will have an ExitResult pushed to it once when the task +// exits on its own or is killed. If WaitTask is called after the task has exited, the channel +// will immedialy return the ExitResult. WaitTask can be called multiple times for +// the same task without issue. +func (d *driverPluginClient) WaitTask(ctx context.Context, id string) (<-chan *ExitResult, error) { + ch := make(chan *ExitResult) + go d.handleWaitTask(ctx, id, ch) + return ch, nil +} + +func (d *driverPluginClient) handleWaitTask(ctx context.Context, id string, ch chan *ExitResult) { + defer close(ch) + var result ExitResult + req := &proto.WaitTaskRequest{ + TaskId: id, + } + + resp, err := d.client.WaitTask(ctx, req) + if err != nil { + result.Err = err + } else { + result.ExitCode = int(resp.Result.ExitCode) + result.Signal = int(resp.Result.Signal) + result.OOMKilled = resp.Result.OomKilled + if len(resp.Err) > 0 { + result.Err = errors.New(resp.Err) + } + } + ch <- &result +} + +// StopTask stops the task with the given taskID. A timeout and signal can be +// given to control a graceful termination of the task. The driver will send the +// given signal to the task and wait for the given timeout for it to exit. If the +// task does not exit within the timeout it will be forcefully killed. +func (d *driverPluginClient) StopTask(taskID string, timeout time.Duration, signal string) error { + req := &proto.StopTaskRequest{ + TaskId: taskID, + Timeout: ptypes.DurationProto(timeout), + Signal: signal, + } + + _, err := d.client.StopTask(context.Background(), req) + return err +} + +// DestroyTask removes the task from the driver's in memory state. The task +// cannot be running unless force is set to true. If force is set to true the +// driver will forcefully terminate the task before removing it. +func (d *driverPluginClient) DestroyTask(taskID string, force bool) error { + req := &proto.DestroyTaskRequest{ + TaskId: taskID, + Force: force, + } + + _, err := d.client.DestroyTask(context.Background(), req) + return err +} + +// InspectTask returns status information for a task +func (d *driverPluginClient) InspectTask(taskID string) (*TaskStatus, error) { + req := &proto.InspectTaskRequest{TaskId: taskID} + + resp, err := d.client.InspectTask(context.Background(), req) + if err != nil { + return nil, err + } + + status, err := taskStatusFromProto(resp.Task) + if err != nil { + return nil, err + } + + if resp.Driver != nil { + status.DriverAttributes = resp.Driver.Attributes + } + if resp.NetworkOverride != nil { + status.NetworkOverride = &NetworkOverride{ + PortMap: resp.NetworkOverride.PortMap, + Addr: resp.NetworkOverride.Addr, + AutoAdvertise: resp.NetworkOverride.AutoAdvertise, + } + } + + return status, nil +} + +// TaskStats returns resource usage statistics for the task +func (d *driverPluginClient) TaskStats(taskID string) (*TaskStats, error) { + req := &proto.TaskStatsRequest{TaskId: taskID} + + resp, err := d.client.TaskStats(context.Background(), req) + if err != nil { + return nil, err + } + + stats, err := taskStatsFromProto(resp.Stats) + if err != nil { + return nil, err + } + + return stats, nil +} + +// TaskEvents returns a channel that will receive events from the driver about all +// tasks such as lifecycle events, terminal errors, etc. +func (d *driverPluginClient) TaskEvents(ctx context.Context) (<-chan *TaskEvent, error) { + req := &proto.TaskEventsRequest{} + stream, err := d.client.TaskEvents(ctx, req) + if err != nil { + return nil, err + } + + ch := make(chan *TaskEvent) + go d.handleTaskEvents(ch, stream) + return ch, nil +} + +func (d *driverPluginClient) handleTaskEvents(ch chan *TaskEvent, stream proto.Driver_TaskEventsClient) { + defer close(ch) + for { + ev, err := stream.Recv() + if err == io.EOF { + break + } + if err != nil { + d.logger.Error("error receiving stream from TaskEvents driver RPC", "error", err) + ch <- &TaskEvent{Err: err} + break + } + timestamp, _ := ptypes.Timestamp(ev.Timestamp) + event := &TaskEvent{ + TaskID: ev.TaskId, + Annotations: ev.Annotations, + Message: ev.Message, + Timestamp: timestamp, + } + ch <- event + } +} + +// SignalTask will send the given signal to the specified task +func (d *driverPluginClient) SignalTask(taskID string, signal string) error { + req := &proto.SignalTaskRequest{ + TaskId: taskID, + Signal: signal, + } + _, err := d.client.SignalTask(context.Background(), req) + return err +} + +// ExecTask will run the given command within the execution context of the task. +// The driver will wait for the given timeout for the command to complete before +// terminating it. The stdout and stderr of the command will be return to the caller, +// along with other exit information such as exit code. +func (d *driverPluginClient) ExecTask(taskID string, cmd []string, timeout time.Duration) (*ExecTaskResult, error) { + req := &proto.ExecTaskRequest{ + TaskId: taskID, + Command: cmd, + Timeout: ptypes.DurationProto(timeout), + } + + resp, err := d.client.ExecTask(context.Background(), req) + if err != nil { + return nil, err + } + + result := &ExecTaskResult{ + Stdout: resp.Stdout, + Stderr: resp.Stderr, + ExitResult: exitResultFromProto(resp.Result), + } + + return result, nil + +} diff --git a/plugins/drivers/driver.go b/plugins/drivers/driver.go new file mode 100644 index 000000000..94c14851f --- /dev/null +++ b/plugins/drivers/driver.go @@ -0,0 +1,212 @@ +package drivers + +import ( + "fmt" + "path/filepath" + "sort" + "time" + + "github.com/hashicorp/nomad/client/allocdir" + cstructs "github.com/hashicorp/nomad/client/structs" + "github.com/hashicorp/nomad/plugins/base" + "github.com/hashicorp/nomad/plugins/shared/hclspec" + "golang.org/x/net/context" +) + +// DriverPlugin is the interface with drivers will implement. It is also +// implemented by a plugin client which proxies the calls to go-plugin. See +// the proto/driver.proto file for detailed information about each RPC and +// message structure. +type DriverPlugin interface { + base.BasePlugin + + TaskConfigSchema() (*hclspec.Spec, error) + Capabilities() (*Capabilities, error) + Fingerprint(context.Context) (<-chan *Fingerprint, error) + + RecoverTask(*TaskHandle) error + StartTask(*TaskConfig) (*TaskHandle, error) + WaitTask(ctx context.Context, taskID string) (<-chan *ExitResult, error) + StopTask(taskID string, timeout time.Duration, signal string) error + DestroyTask(taskID string, force bool) error + InspectTask(taskID string) (*TaskStatus, error) + TaskStats(taskID string) (*TaskStats, error) + TaskEvents(context.Context) (<-chan *TaskEvent, error) + + SignalTask(taskID string, signal string) error + ExecTask(taskID string, cmd []string, timeout time.Duration) (*ExecTaskResult, error) +} + +// DriverSignalTaskNotSupported can be embedded by drivers which don't support +// the SignalTask RPC. This satisfies the SignalTask func requirement for the +// DriverPlugin interface. +type DriverSignalTaskNotSupported struct{} + +func (_ DriverSignalTaskNotSupported) SignalTask(taskID, signal string) error { + return fmt.Errorf("SignalTask is not supported by this driver") +} + +// DriverExecTaskNotSupported can be embedded by drivers which don't support +// the ExecTask RPC. This satisfies the ExecTask func requirement of the +// DriverPlugin interface. +type DriverExecTaskNotSupported struct{} + +func (_ DriverExecTaskNotSupported) ExecTask(taskID, signal string) error { + return fmt.Errorf("ExecTask is not supported by this driver") +} + +type HealthState string + +var ( + HealthStateUndetected = HealthState("undetected") + HealthStateUnhealthy = HealthState("unhealthy") + HealthStateHealthy = HealthState("healthy") +) + +type Fingerprint struct { + Attributes map[string]string + Health HealthState + HealthDescription string + + // Err is set by the plugin if an error occured during fingerprinting + Err error +} + +type FSIsolation string + +var ( + FSIsolationNone = FSIsolation("none") + FSIsolationChroot = FSIsolation("chroot") + FSIsolationImage = FSIsolation("image") +) + +type Capabilities struct { + // SendSignals marks the driver as being able to send signals + SendSignals bool + + // Exec marks the driver as being able to execute arbitrary commands + // such as health checks. Used by the ScriptExecutor interface. + Exec bool + + //FSIsolation indicates what kind of filesystem isolation the driver supports. + FSIsolation FSIsolation +} + +type TaskConfig struct { + ID string + Name string + Env map[string]string + Resources Resources + Devices []DeviceConfig + Mounts []MountConfig + User string + AllocDir string + rawDriverConfig []byte +} + +func (tc *TaskConfig) EnvList() []string { + l := make([]string, 0, len(tc.Env)) + for k, v := range tc.Env { + l = append(l, k+"="+v) + } + + sort.Strings(l) + return l +} + +func (tc *TaskConfig) TaskDir() *allocdir.TaskDir { + taskDir := filepath.Join(tc.AllocDir, tc.Name) + return &allocdir.TaskDir{ + Dir: taskDir, + SharedAllocDir: filepath.Join(tc.AllocDir, allocdir.SharedAllocName), + LogDir: filepath.Join(tc.AllocDir, allocdir.SharedAllocName, allocdir.LogDirName), + SharedTaskDir: filepath.Join(taskDir, allocdir.SharedAllocName), + LocalDir: filepath.Join(taskDir, allocdir.TaskLocal), + SecretsDir: filepath.Join(taskDir, allocdir.TaskSecrets), + } +} + +func (tc *TaskConfig) DecodeDriverConfig(t interface{}) error { + return base.MsgPackDecode(tc.rawDriverConfig, t) +} + +func (tc *TaskConfig) EncodeDriverConfig(t interface{}) error { + return base.MsgPackEncode(&tc.rawDriverConfig, t) +} + +type Resources struct { + CPUPeriod int64 + CPUQuota int64 + CPUShares int64 + MemoryLimitBytes int64 + OOMScoreAdj int64 + CpusetCPUs string + CpusetMems string +} + +type DeviceConfig struct { + TaskPath string + HostPath string + Permissions string +} + +type MountConfig struct { + TaskPath string + HostPath string + Readonly bool +} + +const ( + TaskStateUnknown TaskState = "unknown" + TaskStateRunning TaskState = "running" + TaskStateExited TaskState = "exited" +) + +type TaskState string + +type NetworkOverride struct { + PortMap map[string]int32 + Addr string + AutoAdvertise bool +} + +type ExitResult struct { + ExitCode int + Signal int + OOMKilled bool + Err error +} + +type TaskStatus struct { + ID string + Name string + State TaskState + StartedAt time.Time + CompletedAt time.Time + ExitResult *ExitResult + DriverAttributes map[string]string + NetworkOverride *NetworkOverride +} + +type TaskStats struct { + ID string + Timestamp int64 + AggResourceUsage *cstructs.ResourceUsage + ResourceUsageByPid map[string]*cstructs.ResourceUsage +} + +type TaskEvent struct { + TaskID string + Timestamp time.Time + Message string + Annotations map[string]string + + // Err is only used if an error occured while consuming the RPC stream + Err error +} + +type ExecTaskResult struct { + Stdout []byte + Stderr []byte + ExitResult *ExitResult +} diff --git a/plugins/drivers/errors.go b/plugins/drivers/errors.go new file mode 100644 index 000000000..f67a9819e --- /dev/null +++ b/plugins/drivers/errors.go @@ -0,0 +1,5 @@ +package drivers + +import "fmt" + +var ErrTaskNotFound = fmt.Errorf("task not found for given id") diff --git a/plugins/drivers/plugin.go b/plugins/drivers/plugin.go new file mode 100644 index 000000000..10af11368 --- /dev/null +++ b/plugins/drivers/plugin.go @@ -0,0 +1,41 @@ +package drivers + +import ( + "context" + + hclog "github.com/hashicorp/go-hclog" + plugin "github.com/hashicorp/go-plugin" + "github.com/hashicorp/nomad/plugins/drivers/proto" + "google.golang.org/grpc" +) + +// PluginDriver wraps a DriverPlugin and implements go-plugins GRPCPlugin +// interface to expose the the interface over gRPC +type PluginDriver struct { + plugin.NetRPCUnsupportedPlugin + impl DriverPlugin + logger hclog.Logger +} + +func NewDriverPlugin(d DriverPlugin, logger hclog.Logger) plugin.GRPCPlugin { + return &PluginDriver{ + impl: d, + logger: logger.Named("driver_plugin"), + } +} + +func (p *PluginDriver) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error { + proto.RegisterDriverServer(s, &driverPluginServer{ + impl: p.impl, + broker: broker, + logger: p.logger, + }) + return nil +} + +func (p *PluginDriver) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) { + return &driverPluginClient{ + client: proto.NewDriverClient(c), + logger: p.logger, + }, nil +} diff --git a/plugins/drivers/plugin_test.go b/plugins/drivers/plugin_test.go new file mode 100644 index 000000000..c08d14150 --- /dev/null +++ b/plugins/drivers/plugin_test.go @@ -0,0 +1,242 @@ +package drivers + +import ( + "bytes" + "sync" + "testing" + "time" + + "github.com/hashicorp/nomad/nomad/structs" + "github.com/stretchr/testify/require" + "github.com/ugorji/go/codec" + "golang.org/x/net/context" +) + +type testDriverState struct { + Pid int + Log string +} + +func TestBaseDriver_Fingerprint(t *testing.T) { + t.Parallel() + require := require.New(t) + + fingerprints := []*Fingerprint{ + { + Attributes: map[string]string{"foo": "bar"}, + Health: HealthStateUnhealthy, + HealthDescription: "starting up", + }, + { + Attributes: map[string]string{"foo": "bar"}, + Health: HealthStateHealthy, + HealthDescription: "running", + }, + } + + var complete bool + impl := &MockDriver{ + FingerprintF: func(ctx context.Context) (<-chan *Fingerprint, error) { + ch := make(chan *Fingerprint) + go func() { + defer close(ch) + ch <- fingerprints[0] + time.Sleep(500 * time.Millisecond) + ch <- fingerprints[1] + complete = true + }() + return ch, nil + }, + } + + harness := NewDriverHarness(t, impl) + defer harness.Kill() + + ch, err := harness.Fingerprint(context.Background()) + require.NoError(err) + + var wg sync.WaitGroup + wg.Add(1) + go func() { + defer wg.Done() + select { + case f := <-ch: + require.Exactly(f, fingerprints[0]) + case <-time.After(1 * time.Second): + require.Fail("did not receive fingerprint[0]") + } + select { + case f := <-ch: + require.Exactly(f, fingerprints[1]) + case <-time.After(1 * time.Second): + require.Fail("did not receive fingerprint[1]") + } + }() + require.False(complete) + wg.Wait() + require.True(complete) + +} + +func TestBaseDriver_RecoverTask(t *testing.T) { + t.Parallel() + require := require.New(t) + + // build driver state and encode it into proto msg + state := testDriverState{Pid: 1, Log: "foo"} + var buf bytes.Buffer + enc := codec.NewEncoder(&buf, structs.MsgpackHandle) + enc.Encode(state) + + // mock the RecoverTask driver call + impl := &MockDriver{ + RecoverTaskF: func(h *TaskHandle) error { + var actual testDriverState + require.NoError(h.GetDriverState(&actual)) + require.Equal(state, actual) + return nil + }, + } + + harness := NewDriverHarness(t, impl) + defer harness.Kill() + + handle := &TaskHandle{ + driverState: buf.Bytes(), + } + err := harness.RecoverTask(handle) + require.NoError(err) +} + +func TestBaseDriver_StartTask(t *testing.T) { + t.Parallel() + require := require.New(t) + + cfg := &TaskConfig{ + ID: "foo", + } + state := &testDriverState{Pid: 1, Log: "log"} + var handle *TaskHandle + impl := &MockDriver{ + StartTaskF: func(c *TaskConfig) (*TaskHandle, error) { + handle = NewTaskHandle("test") + handle.Config = c + handle.State = TaskStateRunning + handle.SetDriverState(state) + return handle, nil + }, + } + + harness := NewDriverHarness(t, impl) + defer harness.Kill() + resp, err := harness.StartTask(cfg) + require.NoError(err) + require.Equal(cfg.ID, resp.Config.ID) + require.Equal(handle.State, resp.State) + + var actualState testDriverState + require.NoError(resp.GetDriverState(&actualState)) + require.Equal(*state, actualState) + +} + +func TestBaseDriver_WaitTask(t *testing.T) { + t.Parallel() + require := require.New(t) + + result := &ExitResult{ExitCode: 1, Signal: 9} + + signalTask := make(chan struct{}) + + impl := &MockDriver{ + WaitTaskF: func(_ context.Context, id string) (<-chan *ExitResult, error) { + ch := make(chan *ExitResult) + go func() { + <-signalTask + ch <- result + }() + return ch, nil + }, + } + + harness := NewDriverHarness(t, impl) + defer harness.Kill() + var wg sync.WaitGroup + wg.Add(1) + var finished bool + go func() { + defer wg.Done() + ch, err := harness.WaitTask(context.TODO(), "foo") + require.NoError(err) + actualResult := <-ch + finished = true + require.Exactly(result, actualResult) + }() + require.False(finished) + close(signalTask) + wg.Wait() + require.True(finished) +} + +func TestBaseDriver_TaskEvents(t *testing.T) { + t.Parallel() + require := require.New(t) + + now := time.Now().UTC().Truncate(time.Millisecond) + events := []*TaskEvent{ + { + TaskID: "abc", + Timestamp: now, + Annotations: map[string]string{"foo": "bar"}, + Message: "starting", + }, + { + TaskID: "xyz", + Timestamp: now.Add(2 * time.Second), + Annotations: map[string]string{"foo": "bar"}, + Message: "starting", + }, + { + TaskID: "xyz", + Timestamp: now.Add(3 * time.Second), + Annotations: map[string]string{"foo": "bar"}, + Message: "running", + }, + { + TaskID: "abc", + Timestamp: now.Add(4 * time.Second), + Annotations: map[string]string{"foo": "bar"}, + Message: "running", + }, + } + + impl := &MockDriver{ + TaskEventsF: func(ctx context.Context) (<-chan *TaskEvent, error) { + ch := make(chan *TaskEvent) + go func() { + defer close(ch) + for _, event := range events { + ch <- event + } + }() + return ch, nil + }, + } + + harness := NewDriverHarness(t, impl) + defer harness.Kill() + + ch, err := harness.TaskEvents(context.Background()) + require.NoError(err) + + for _, event := range events { + select { + case actual := <-ch: + require.Exactly(actual, event) + case <-time.After(500 * time.Millisecond): + require.Fail("failed to receive event") + + } + } + +} diff --git a/plugins/drivers/base/proto/driver.pb.go b/plugins/drivers/proto/driver.pb.go similarity index 77% rename from plugins/drivers/base/proto/driver.pb.go rename to plugins/drivers/proto/driver.pb.go index e170302c9..0c9542e5e 100644 --- a/plugins/drivers/base/proto/driver.pb.go +++ b/plugins/drivers/proto/driver.pb.go @@ -49,7 +49,7 @@ func (x TaskState) String() string { return proto.EnumName(TaskState_name, int32(x)) } func (TaskState) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{0} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{0} } type FingerprintResponse_HealthState int32 @@ -75,7 +75,7 @@ func (x FingerprintResponse_HealthState) String() string { return proto.EnumName(FingerprintResponse_HealthState_name, int32(x)) } func (FingerprintResponse_HealthState) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{5, 0} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{5, 0} } type StartTaskResponse_Result int32 @@ -101,7 +101,7 @@ func (x StartTaskResponse_Result) String() string { return proto.EnumName(StartTaskResponse_Result_name, int32(x)) } func (StartTaskResponse_Result) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{9, 0} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{9, 0} } type DriverCapabilities_FSIsolation int32 @@ -127,7 +127,7 @@ func (x DriverCapabilities_FSIsolation) String() string { return proto.EnumName(DriverCapabilities_FSIsolation_name, int32(x)) } func (DriverCapabilities_FSIsolation) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{27, 0} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{25, 0} } type CPUUsage_Fields int32 @@ -162,7 +162,7 @@ func (x CPUUsage_Fields) String() string { return proto.EnumName(CPUUsage_Fields_name, int32(x)) } func (CPUUsage_Fields) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{43, 0} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{41, 0} } type MemoryUsage_Fields int32 @@ -170,7 +170,7 @@ type MemoryUsage_Fields int32 const ( MemoryUsage_RSS MemoryUsage_Fields = 0 MemoryUsage_CACHE MemoryUsage_Fields = 1 - MemoryUsage_MAX_UASGE MemoryUsage_Fields = 2 + MemoryUsage_MAX_USAGE MemoryUsage_Fields = 2 MemoryUsage_KERNEL_USAGE MemoryUsage_Fields = 3 MemoryUsage_KERNEL_MAX_USAGE MemoryUsage_Fields = 4 ) @@ -178,14 +178,14 @@ const ( var MemoryUsage_Fields_name = map[int32]string{ 0: "RSS", 1: "CACHE", - 2: "MAX_UASGE", + 2: "MAX_USAGE", 3: "KERNEL_USAGE", 4: "KERNEL_MAX_USAGE", } var MemoryUsage_Fields_value = map[string]int32{ "RSS": 0, "CACHE": 1, - "MAX_UASGE": 2, + "MAX_USAGE": 2, "KERNEL_USAGE": 3, "KERNEL_MAX_USAGE": 4, } @@ -194,7 +194,7 @@ func (x MemoryUsage_Fields) String() string { return proto.EnumName(MemoryUsage_Fields_name, int32(x)) } func (MemoryUsage_Fields) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{44, 0} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{42, 0} } type TaskConfigSchemaRequest struct { @@ -207,7 +207,7 @@ func (m *TaskConfigSchemaRequest) Reset() { *m = TaskConfigSchemaRequest func (m *TaskConfigSchemaRequest) String() string { return proto.CompactTextString(m) } func (*TaskConfigSchemaRequest) ProtoMessage() {} func (*TaskConfigSchemaRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{0} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{0} } func (m *TaskConfigSchemaRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TaskConfigSchemaRequest.Unmarshal(m, b) @@ -239,7 +239,7 @@ func (m *TaskConfigSchemaResponse) Reset() { *m = TaskConfigSchemaRespon func (m *TaskConfigSchemaResponse) String() string { return proto.CompactTextString(m) } func (*TaskConfigSchemaResponse) ProtoMessage() {} func (*TaskConfigSchemaResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{1} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{1} } func (m *TaskConfigSchemaResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TaskConfigSchemaResponse.Unmarshal(m, b) @@ -276,7 +276,7 @@ func (m *CapabilitiesRequest) Reset() { *m = CapabilitiesRequest{} } func (m *CapabilitiesRequest) String() string { return proto.CompactTextString(m) } func (*CapabilitiesRequest) ProtoMessage() {} func (*CapabilitiesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{2} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{2} } func (m *CapabilitiesRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CapabilitiesRequest.Unmarshal(m, b) @@ -311,7 +311,7 @@ func (m *CapabilitiesResponse) Reset() { *m = CapabilitiesResponse{} } func (m *CapabilitiesResponse) String() string { return proto.CompactTextString(m) } func (*CapabilitiesResponse) ProtoMessage() {} func (*CapabilitiesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{3} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{3} } func (m *CapabilitiesResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CapabilitiesResponse.Unmarshal(m, b) @@ -348,7 +348,7 @@ func (m *FingerprintRequest) Reset() { *m = FingerprintRequest{} } func (m *FingerprintRequest) String() string { return proto.CompactTextString(m) } func (*FingerprintRequest) ProtoMessage() {} func (*FingerprintRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{4} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{4} } func (m *FingerprintRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FingerprintRequest.Unmarshal(m, b) @@ -378,7 +378,7 @@ type FingerprintResponse struct { // * UNHEALTHY: driver dependencies are met but the driver is unable to // perform operations due to some other problem // * HEALTHY: driver is able to perform all operations - Health FingerprintResponse_HealthState `protobuf:"varint,2,opt,name=health,proto3,enum=hashicorp.nomad.plugins.drivers.base.proto.FingerprintResponse_HealthState" json:"health,omitempty"` + Health FingerprintResponse_HealthState `protobuf:"varint,2,opt,name=health,proto3,enum=hashicorp.nomad.plugins.drivers.proto.FingerprintResponse_HealthState" json:"health,omitempty"` // HealthDescription is a human readable message describing the current // state of driver health HealthDescription string `protobuf:"bytes,3,opt,name=health_description,json=healthDescription,proto3" json:"health_description,omitempty"` @@ -391,7 +391,7 @@ func (m *FingerprintResponse) Reset() { *m = FingerprintResponse{} } func (m *FingerprintResponse) String() string { return proto.CompactTextString(m) } func (*FingerprintResponse) ProtoMessage() {} func (*FingerprintResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{5} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{5} } func (m *FingerprintResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FingerprintResponse.Unmarshal(m, b) @@ -446,7 +446,7 @@ func (m *RecoverTaskRequest) Reset() { *m = RecoverTaskRequest{} } func (m *RecoverTaskRequest) String() string { return proto.CompactTextString(m) } func (*RecoverTaskRequest) ProtoMessage() {} func (*RecoverTaskRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{6} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{6} } func (m *RecoverTaskRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RecoverTaskRequest.Unmarshal(m, b) @@ -490,7 +490,7 @@ func (m *RecoverTaskResponse) Reset() { *m = RecoverTaskResponse{} } func (m *RecoverTaskResponse) String() string { return proto.CompactTextString(m) } func (*RecoverTaskResponse) ProtoMessage() {} func (*RecoverTaskResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{7} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{7} } func (m *RecoverTaskResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RecoverTaskResponse.Unmarshal(m, b) @@ -522,7 +522,7 @@ func (m *StartTaskRequest) Reset() { *m = StartTaskRequest{} } func (m *StartTaskRequest) String() string { return proto.CompactTextString(m) } func (*StartTaskRequest) ProtoMessage() {} func (*StartTaskRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{8} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{8} } func (m *StartTaskRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_StartTaskRequest.Unmarshal(m, b) @@ -558,7 +558,7 @@ type StartTaskResponse struct { // * FATAL: A fatal error occurred and is not likely to succeed if retried // // If Result is not successful, the DriverErrorMsg will be set. - Result StartTaskResponse_Result `protobuf:"varint,1,opt,name=result,proto3,enum=hashicorp.nomad.plugins.drivers.base.proto.StartTaskResponse_Result" json:"result,omitempty"` + Result StartTaskResponse_Result `protobuf:"varint,1,opt,name=result,proto3,enum=hashicorp.nomad.plugins.drivers.proto.StartTaskResponse_Result" json:"result,omitempty"` // DriverErrorMsg is set if an error occurred DriverErrorMsg string `protobuf:"bytes,2,opt,name=driver_error_msg,json=driverErrorMsg,proto3" json:"driver_error_msg,omitempty"` // Handle is opaque to the client, but must be stored in order to recover @@ -576,7 +576,7 @@ func (m *StartTaskResponse) Reset() { *m = StartTaskResponse{} } func (m *StartTaskResponse) String() string { return proto.CompactTextString(m) } func (*StartTaskResponse) ProtoMessage() {} func (*StartTaskResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{9} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{9} } func (m *StartTaskResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_StartTaskResponse.Unmarshal(m, b) @@ -636,7 +636,7 @@ func (m *WaitTaskRequest) Reset() { *m = WaitTaskRequest{} } func (m *WaitTaskRequest) String() string { return proto.CompactTextString(m) } func (*WaitTaskRequest) ProtoMessage() {} func (*WaitTaskRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{10} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{10} } func (m *WaitTaskRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_WaitTaskRequest.Unmarshal(m, b) @@ -677,7 +677,7 @@ func (m *WaitTaskResponse) Reset() { *m = WaitTaskResponse{} } func (m *WaitTaskResponse) String() string { return proto.CompactTextString(m) } func (*WaitTaskResponse) ProtoMessage() {} func (*WaitTaskResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{11} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{11} } func (m *WaitTaskResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_WaitTaskResponse.Unmarshal(m, b) @@ -729,7 +729,7 @@ func (m *StopTaskRequest) Reset() { *m = StopTaskRequest{} } func (m *StopTaskRequest) String() string { return proto.CompactTextString(m) } func (*StopTaskRequest) ProtoMessage() {} func (*StopTaskRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{12} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{12} } func (m *StopTaskRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_StopTaskRequest.Unmarshal(m, b) @@ -780,7 +780,7 @@ func (m *StopTaskResponse) Reset() { *m = StopTaskResponse{} } func (m *StopTaskResponse) String() string { return proto.CompactTextString(m) } func (*StopTaskResponse) ProtoMessage() {} func (*StopTaskResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{13} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{13} } func (m *StopTaskResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_StopTaskResponse.Unmarshal(m, b) @@ -802,7 +802,9 @@ var xxx_messageInfo_StopTaskResponse proto.InternalMessageInfo type DestroyTaskRequest struct { // TaskId is the ID of the target task - TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + // Force destroys the task even if it is still in a running state + Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -812,7 +814,7 @@ func (m *DestroyTaskRequest) Reset() { *m = DestroyTaskRequest{} } func (m *DestroyTaskRequest) String() string { return proto.CompactTextString(m) } func (*DestroyTaskRequest) ProtoMessage() {} func (*DestroyTaskRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{14} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{14} } func (m *DestroyTaskRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DestroyTaskRequest.Unmarshal(m, b) @@ -839,6 +841,13 @@ func (m *DestroyTaskRequest) GetTaskId() string { return "" } +func (m *DestroyTaskRequest) GetForce() bool { + if m != nil { + return m.Force + } + return false +} + type DestroyTaskResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -849,7 +858,7 @@ func (m *DestroyTaskResponse) Reset() { *m = DestroyTaskResponse{} } func (m *DestroyTaskResponse) String() string { return proto.CompactTextString(m) } func (*DestroyTaskResponse) ProtoMessage() {} func (*DestroyTaskResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{15} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{15} } func (m *DestroyTaskResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DestroyTaskResponse.Unmarshal(m, b) @@ -869,75 +878,6 @@ func (m *DestroyTaskResponse) XXX_DiscardUnknown() { var xxx_messageInfo_DestroyTaskResponse proto.InternalMessageInfo -type ListTasksRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListTasksRequest) Reset() { *m = ListTasksRequest{} } -func (m *ListTasksRequest) String() string { return proto.CompactTextString(m) } -func (*ListTasksRequest) ProtoMessage() {} -func (*ListTasksRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{16} -} -func (m *ListTasksRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListTasksRequest.Unmarshal(m, b) -} -func (m *ListTasksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListTasksRequest.Marshal(b, m, deterministic) -} -func (dst *ListTasksRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListTasksRequest.Merge(dst, src) -} -func (m *ListTasksRequest) XXX_Size() int { - return xxx_messageInfo_ListTasksRequest.Size(m) -} -func (m *ListTasksRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListTasksRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListTasksRequest proto.InternalMessageInfo - -type ListTasksResponse struct { - // Tasks includes a list of summary information for each task - Tasks []*TaskStatus `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListTasksResponse) Reset() { *m = ListTasksResponse{} } -func (m *ListTasksResponse) String() string { return proto.CompactTextString(m) } -func (*ListTasksResponse) ProtoMessage() {} -func (*ListTasksResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{17} -} -func (m *ListTasksResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListTasksResponse.Unmarshal(m, b) -} -func (m *ListTasksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListTasksResponse.Marshal(b, m, deterministic) -} -func (dst *ListTasksResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListTasksResponse.Merge(dst, src) -} -func (m *ListTasksResponse) XXX_Size() int { - return xxx_messageInfo_ListTasksResponse.Size(m) -} -func (m *ListTasksResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListTasksResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListTasksResponse proto.InternalMessageInfo - -func (m *ListTasksResponse) GetTasks() []*TaskStatus { - if m != nil { - return m.Tasks - } - return nil -} - type InspectTaskRequest struct { // TaskId is the ID of the target task TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` @@ -950,7 +890,7 @@ func (m *InspectTaskRequest) Reset() { *m = InspectTaskRequest{} } func (m *InspectTaskRequest) String() string { return proto.CompactTextString(m) } func (*InspectTaskRequest) ProtoMessage() {} func (*InspectTaskRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{18} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{16} } func (m *InspectTaskRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InspectTaskRequest.Unmarshal(m, b) @@ -993,7 +933,7 @@ func (m *InspectTaskResponse) Reset() { *m = InspectTaskResponse{} } func (m *InspectTaskResponse) String() string { return proto.CompactTextString(m) } func (*InspectTaskResponse) ProtoMessage() {} func (*InspectTaskResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{19} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{17} } func (m *InspectTaskResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InspectTaskResponse.Unmarshal(m, b) @@ -1046,7 +986,7 @@ func (m *TaskStatsRequest) Reset() { *m = TaskStatsRequest{} } func (m *TaskStatsRequest) String() string { return proto.CompactTextString(m) } func (*TaskStatsRequest) ProtoMessage() {} func (*TaskStatsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{20} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{18} } func (m *TaskStatsRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TaskStatsRequest.Unmarshal(m, b) @@ -1085,7 +1025,7 @@ func (m *TaskStatsResponse) Reset() { *m = TaskStatsResponse{} } func (m *TaskStatsResponse) String() string { return proto.CompactTextString(m) } func (*TaskStatsResponse) ProtoMessage() {} func (*TaskStatsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{21} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{19} } func (m *TaskStatsResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TaskStatsResponse.Unmarshal(m, b) @@ -1122,7 +1062,7 @@ func (m *TaskEventsRequest) Reset() { *m = TaskEventsRequest{} } func (m *TaskEventsRequest) String() string { return proto.CompactTextString(m) } func (*TaskEventsRequest) ProtoMessage() {} func (*TaskEventsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{22} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{20} } func (m *TaskEventsRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TaskEventsRequest.Unmarshal(m, b) @@ -1156,7 +1096,7 @@ func (m *SignalTaskRequest) Reset() { *m = SignalTaskRequest{} } func (m *SignalTaskRequest) String() string { return proto.CompactTextString(m) } func (*SignalTaskRequest) ProtoMessage() {} func (*SignalTaskRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{23} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{21} } func (m *SignalTaskRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignalTaskRequest.Unmarshal(m, b) @@ -1200,7 +1140,7 @@ func (m *SignalTaskResponse) Reset() { *m = SignalTaskResponse{} } func (m *SignalTaskResponse) String() string { return proto.CompactTextString(m) } func (*SignalTaskResponse) ProtoMessage() {} func (*SignalTaskResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{24} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{22} } func (m *SignalTaskResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignalTaskResponse.Unmarshal(m, b) @@ -1237,7 +1177,7 @@ func (m *ExecTaskRequest) Reset() { *m = ExecTaskRequest{} } func (m *ExecTaskRequest) String() string { return proto.CompactTextString(m) } func (*ExecTaskRequest) ProtoMessage() {} func (*ExecTaskRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{25} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{23} } func (m *ExecTaskRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ExecTaskRequest.Unmarshal(m, b) @@ -1294,7 +1234,7 @@ func (m *ExecTaskResponse) Reset() { *m = ExecTaskResponse{} } func (m *ExecTaskResponse) String() string { return proto.CompactTextString(m) } func (*ExecTaskResponse) ProtoMessage() {} func (*ExecTaskResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{26} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{24} } func (m *ExecTaskResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ExecTaskResponse.Unmarshal(m, b) @@ -1343,7 +1283,7 @@ type DriverCapabilities struct { // in the task's execution environment. Exec bool `protobuf:"varint,2,opt,name=exec,proto3" json:"exec,omitempty"` // FsIsolation indicates what kind of filesystem isolation a driver supports. - FsIsolation DriverCapabilities_FSIsolation `protobuf:"varint,3,opt,name=fs_isolation,json=fsIsolation,proto3,enum=hashicorp.nomad.plugins.drivers.base.proto.DriverCapabilities_FSIsolation" json:"fs_isolation,omitempty"` + FsIsolation DriverCapabilities_FSIsolation `protobuf:"varint,3,opt,name=fs_isolation,json=fsIsolation,proto3,enum=hashicorp.nomad.plugins.drivers.proto.DriverCapabilities_FSIsolation" json:"fs_isolation,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1353,7 +1293,7 @@ func (m *DriverCapabilities) Reset() { *m = DriverCapabilities{} } func (m *DriverCapabilities) String() string { return proto.CompactTextString(m) } func (*DriverCapabilities) ProtoMessage() {} func (*DriverCapabilities) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{27} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{25} } func (m *DriverCapabilities) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DriverCapabilities.Unmarshal(m, b) @@ -1424,7 +1364,7 @@ func (m *TaskConfig) Reset() { *m = TaskConfig{} } func (m *TaskConfig) String() string { return proto.CompactTextString(m) } func (*TaskConfig) ProtoMessage() {} func (*TaskConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{28} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{26} } func (m *TaskConfig) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TaskConfig.Unmarshal(m, b) @@ -1521,7 +1461,7 @@ func (m *Resources) Reset() { *m = Resources{} } func (m *Resources) String() string { return proto.CompactTextString(m) } func (*Resources) ProtoMessage() {} func (*Resources) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{29} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{27} } func (m *Resources) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Resources.Unmarshal(m, b) @@ -1570,7 +1510,7 @@ func (m *RawResources) Reset() { *m = RawResources{} } func (m *RawResources) String() string { return proto.CompactTextString(m) } func (*RawResources) ProtoMessage() {} func (*RawResources) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{30} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{28} } func (m *RawResources) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RawResources.Unmarshal(m, b) @@ -1641,7 +1581,7 @@ func (m *NetworkResource) Reset() { *m = NetworkResource{} } func (m *NetworkResource) String() string { return proto.CompactTextString(m) } func (*NetworkResource) ProtoMessage() {} func (*NetworkResource) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{31} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{29} } func (m *NetworkResource) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_NetworkResource.Unmarshal(m, b) @@ -1715,7 +1655,7 @@ func (m *NetworkPort) Reset() { *m = NetworkPort{} } func (m *NetworkPort) String() string { return proto.CompactTextString(m) } func (*NetworkPort) ProtoMessage() {} func (*NetworkPort) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{32} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{30} } func (m *NetworkPort) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_NetworkPort.Unmarshal(m, b) @@ -1773,7 +1713,7 @@ func (m *LinuxResources) Reset() { *m = LinuxResources{} } func (m *LinuxResources) String() string { return proto.CompactTextString(m) } func (*LinuxResources) ProtoMessage() {} func (*LinuxResources) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{33} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{31} } func (m *LinuxResources) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_LinuxResources.Unmarshal(m, b) @@ -1858,7 +1798,7 @@ func (m *Mount) Reset() { *m = Mount{} } func (m *Mount) String() string { return proto.CompactTextString(m) } func (*Mount) ProtoMessage() {} func (*Mount) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{34} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{32} } func (m *Mount) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Mount.Unmarshal(m, b) @@ -1921,7 +1861,7 @@ func (m *Device) Reset() { *m = Device{} } func (m *Device) String() string { return proto.CompactTextString(m) } func (*Device) ProtoMessage() {} func (*Device) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{35} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{33} } func (m *Device) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Device.Unmarshal(m, b) @@ -1967,7 +1907,7 @@ type TaskHandle struct { // Config is the TaskConfig for the task Config *TaskConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` // State is the state of the task's execution - State TaskState `protobuf:"varint,2,opt,name=state,proto3,enum=hashicorp.nomad.plugins.drivers.base.proto.TaskState" json:"state,omitempty"` + State TaskState `protobuf:"varint,2,opt,name=state,proto3,enum=hashicorp.nomad.plugins.drivers.proto.TaskState" json:"state,omitempty"` // DriverState is the encoded state for the specific driver DriverState []byte `protobuf:"bytes,3,opt,name=driver_state,json=driverState,proto3" json:"driver_state,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -1979,7 +1919,7 @@ func (m *TaskHandle) Reset() { *m = TaskHandle{} } func (m *TaskHandle) String() string { return proto.CompactTextString(m) } func (*TaskHandle) ProtoMessage() {} func (*TaskHandle) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{36} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{34} } func (m *TaskHandle) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TaskHandle.Unmarshal(m, b) @@ -2039,7 +1979,7 @@ func (m *NetworkOverride) Reset() { *m = NetworkOverride{} } func (m *NetworkOverride) String() string { return proto.CompactTextString(m) } func (*NetworkOverride) ProtoMessage() {} func (*NetworkOverride) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{37} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{35} } func (m *NetworkOverride) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_NetworkOverride.Unmarshal(m, b) @@ -2097,7 +2037,7 @@ func (m *ExitResult) Reset() { *m = ExitResult{} } func (m *ExitResult) String() string { return proto.CompactTextString(m) } func (*ExitResult) ProtoMessage() {} func (*ExitResult) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{38} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{36} } func (m *ExitResult) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ExitResult.Unmarshal(m, b) @@ -2143,17 +2083,14 @@ type TaskStatus struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // State is the state of the task's execution - State TaskState `protobuf:"varint,3,opt,name=state,proto3,enum=hashicorp.nomad.plugins.drivers.base.proto.TaskState" json:"state,omitempty"` - // SizeOnDiskMb is the disk space the driver reports the task is consuming - // in megabytes. - SizeOnDiskMb int64 `protobuf:"varint,4,opt,name=size_on_disk_mb,json=sizeOnDiskMb,proto3" json:"size_on_disk_mb,omitempty"` + State TaskState `protobuf:"varint,3,opt,name=state,proto3,enum=hashicorp.nomad.plugins.drivers.proto.TaskState" json:"state,omitempty"` // StartedAt is the timestamp when the task was started - StartedAt *timestamp.Timestamp `protobuf:"bytes,5,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` + StartedAt *timestamp.Timestamp `protobuf:"bytes,4,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` // CompletedAt is the timestamp when the task exited. // If the task is still running, CompletedAt will not be set - CompletedAt *timestamp.Timestamp `protobuf:"bytes,6,opt,name=completed_at,json=completedAt,proto3" json:"completed_at,omitempty"` + CompletedAt *timestamp.Timestamp `protobuf:"bytes,5,opt,name=completed_at,json=completedAt,proto3" json:"completed_at,omitempty"` // Result is set when CompletedAt is set. - Result *ExitResult `protobuf:"bytes,7,opt,name=result,proto3" json:"result,omitempty"` + Result *ExitResult `protobuf:"bytes,6,opt,name=result,proto3" json:"result,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2163,7 +2100,7 @@ func (m *TaskStatus) Reset() { *m = TaskStatus{} } func (m *TaskStatus) String() string { return proto.CompactTextString(m) } func (*TaskStatus) ProtoMessage() {} func (*TaskStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{39} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{37} } func (m *TaskStatus) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TaskStatus.Unmarshal(m, b) @@ -2204,13 +2141,6 @@ func (m *TaskStatus) GetState() TaskState { return TaskState_UNKNOWN } -func (m *TaskStatus) GetSizeOnDiskMb() int64 { - if m != nil { - return m.SizeOnDiskMb - } - return 0 -} - func (m *TaskStatus) GetStartedAt() *timestamp.Timestamp { if m != nil { return m.StartedAt @@ -2245,7 +2175,7 @@ func (m *TaskDriverStatus) Reset() { *m = TaskDriverStatus{} } func (m *TaskDriverStatus) String() string { return proto.CompactTextString(m) } func (*TaskDriverStatus) ProtoMessage() {} func (*TaskDriverStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{40} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{38} } func (m *TaskDriverStatus) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TaskDriverStatus.Unmarshal(m, b) @@ -2290,7 +2220,7 @@ func (m *TaskStats) Reset() { *m = TaskStats{} } func (m *TaskStats) String() string { return proto.CompactTextString(m) } func (*TaskStats) ProtoMessage() {} func (*TaskStats) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{41} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{39} } func (m *TaskStats) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TaskStats.Unmarshal(m, b) @@ -2352,7 +2282,7 @@ func (m *TaskResourceUsage) Reset() { *m = TaskResourceUsage{} } func (m *TaskResourceUsage) String() string { return proto.CompactTextString(m) } func (*TaskResourceUsage) ProtoMessage() {} func (*TaskResourceUsage) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{42} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{40} } func (m *TaskResourceUsage) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TaskResourceUsage.Unmarshal(m, b) @@ -2394,7 +2324,7 @@ type CPUUsage struct { ThrottledTime uint64 `protobuf:"varint,5,opt,name=throttled_time,json=throttledTime,proto3" json:"throttled_time,omitempty"` Percent float64 `protobuf:"fixed64,6,opt,name=percent,proto3" json:"percent,omitempty"` // MeasuredFields indicates which fields were actually sampled - MeasuredFields []CPUUsage_Fields `protobuf:"varint,7,rep,packed,name=measured_fields,json=measuredFields,proto3,enum=hashicorp.nomad.plugins.drivers.base.proto.CPUUsage_Fields" json:"measured_fields,omitempty"` + MeasuredFields []CPUUsage_Fields `protobuf:"varint,7,rep,packed,name=measured_fields,json=measuredFields,proto3,enum=hashicorp.nomad.plugins.drivers.proto.CPUUsage_Fields" json:"measured_fields,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2404,7 +2334,7 @@ func (m *CPUUsage) Reset() { *m = CPUUsage{} } func (m *CPUUsage) String() string { return proto.CompactTextString(m) } func (*CPUUsage) ProtoMessage() {} func (*CPUUsage) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{43} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{41} } func (m *CPUUsage) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CPUUsage.Unmarshal(m, b) @@ -2480,7 +2410,7 @@ type MemoryUsage struct { KernelUsage uint64 `protobuf:"varint,4,opt,name=kernel_usage,json=kernelUsage,proto3" json:"kernel_usage,omitempty"` KernelMaxUsage uint64 `protobuf:"varint,5,opt,name=kernel_max_usage,json=kernelMaxUsage,proto3" json:"kernel_max_usage,omitempty"` // MeasuredFields indicates which fields were actually sampled - MeasuredFields []MemoryUsage_Fields `protobuf:"varint,6,rep,packed,name=measured_fields,json=measuredFields,proto3,enum=hashicorp.nomad.plugins.drivers.base.proto.MemoryUsage_Fields" json:"measured_fields,omitempty"` + MeasuredFields []MemoryUsage_Fields `protobuf:"varint,6,rep,packed,name=measured_fields,json=measuredFields,proto3,enum=hashicorp.nomad.plugins.drivers.proto.MemoryUsage_Fields" json:"measured_fields,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2490,7 +2420,7 @@ func (m *MemoryUsage) Reset() { *m = MemoryUsage{} } func (m *MemoryUsage) String() string { return proto.CompactTextString(m) } func (*MemoryUsage) ProtoMessage() {} func (*MemoryUsage) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{44} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{42} } func (m *MemoryUsage) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemoryUsage.Unmarshal(m, b) @@ -2570,7 +2500,7 @@ func (m *DriverTaskEvent) Reset() { *m = DriverTaskEvent{} } func (m *DriverTaskEvent) String() string { return proto.CompactTextString(m) } func (*DriverTaskEvent) ProtoMessage() {} func (*DriverTaskEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_4db9b3af49fa7db9, []int{45} + return fileDescriptor_driver_c5fa1f582257ecd9, []int{43} } func (m *DriverTaskEvent) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DriverTaskEvent.Unmarshal(m, b) @@ -2619,64 +2549,62 @@ func (m *DriverTaskEvent) GetAnnotations() map[string]string { } func init() { - proto.RegisterType((*TaskConfigSchemaRequest)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskConfigSchemaRequest") - proto.RegisterType((*TaskConfigSchemaResponse)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskConfigSchemaResponse") - proto.RegisterType((*CapabilitiesRequest)(nil), "hashicorp.nomad.plugins.drivers.base.proto.CapabilitiesRequest") - proto.RegisterType((*CapabilitiesResponse)(nil), "hashicorp.nomad.plugins.drivers.base.proto.CapabilitiesResponse") - proto.RegisterType((*FingerprintRequest)(nil), "hashicorp.nomad.plugins.drivers.base.proto.FingerprintRequest") - proto.RegisterType((*FingerprintResponse)(nil), "hashicorp.nomad.plugins.drivers.base.proto.FingerprintResponse") - proto.RegisterMapType((map[string]string)(nil), "hashicorp.nomad.plugins.drivers.base.proto.FingerprintResponse.AttributesEntry") - proto.RegisterType((*RecoverTaskRequest)(nil), "hashicorp.nomad.plugins.drivers.base.proto.RecoverTaskRequest") - proto.RegisterType((*RecoverTaskResponse)(nil), "hashicorp.nomad.plugins.drivers.base.proto.RecoverTaskResponse") - proto.RegisterType((*StartTaskRequest)(nil), "hashicorp.nomad.plugins.drivers.base.proto.StartTaskRequest") - proto.RegisterType((*StartTaskResponse)(nil), "hashicorp.nomad.plugins.drivers.base.proto.StartTaskResponse") - proto.RegisterType((*WaitTaskRequest)(nil), "hashicorp.nomad.plugins.drivers.base.proto.WaitTaskRequest") - proto.RegisterType((*WaitTaskResponse)(nil), "hashicorp.nomad.plugins.drivers.base.proto.WaitTaskResponse") - proto.RegisterType((*StopTaskRequest)(nil), "hashicorp.nomad.plugins.drivers.base.proto.StopTaskRequest") - proto.RegisterType((*StopTaskResponse)(nil), "hashicorp.nomad.plugins.drivers.base.proto.StopTaskResponse") - proto.RegisterType((*DestroyTaskRequest)(nil), "hashicorp.nomad.plugins.drivers.base.proto.DestroyTaskRequest") - proto.RegisterType((*DestroyTaskResponse)(nil), "hashicorp.nomad.plugins.drivers.base.proto.DestroyTaskResponse") - proto.RegisterType((*ListTasksRequest)(nil), "hashicorp.nomad.plugins.drivers.base.proto.ListTasksRequest") - proto.RegisterType((*ListTasksResponse)(nil), "hashicorp.nomad.plugins.drivers.base.proto.ListTasksResponse") - proto.RegisterType((*InspectTaskRequest)(nil), "hashicorp.nomad.plugins.drivers.base.proto.InspectTaskRequest") - proto.RegisterType((*InspectTaskResponse)(nil), "hashicorp.nomad.plugins.drivers.base.proto.InspectTaskResponse") - proto.RegisterType((*TaskStatsRequest)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskStatsRequest") - proto.RegisterType((*TaskStatsResponse)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskStatsResponse") - proto.RegisterType((*TaskEventsRequest)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskEventsRequest") - proto.RegisterType((*SignalTaskRequest)(nil), "hashicorp.nomad.plugins.drivers.base.proto.SignalTaskRequest") - proto.RegisterType((*SignalTaskResponse)(nil), "hashicorp.nomad.plugins.drivers.base.proto.SignalTaskResponse") - proto.RegisterType((*ExecTaskRequest)(nil), "hashicorp.nomad.plugins.drivers.base.proto.ExecTaskRequest") - proto.RegisterType((*ExecTaskResponse)(nil), "hashicorp.nomad.plugins.drivers.base.proto.ExecTaskResponse") - proto.RegisterType((*DriverCapabilities)(nil), "hashicorp.nomad.plugins.drivers.base.proto.DriverCapabilities") - proto.RegisterType((*TaskConfig)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskConfig") - proto.RegisterMapType((map[string]string)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskConfig.EnvEntry") - proto.RegisterType((*Resources)(nil), "hashicorp.nomad.plugins.drivers.base.proto.Resources") - proto.RegisterType((*RawResources)(nil), "hashicorp.nomad.plugins.drivers.base.proto.RawResources") - proto.RegisterType((*NetworkResource)(nil), "hashicorp.nomad.plugins.drivers.base.proto.NetworkResource") - proto.RegisterType((*NetworkPort)(nil), "hashicorp.nomad.plugins.drivers.base.proto.NetworkPort") - proto.RegisterType((*LinuxResources)(nil), "hashicorp.nomad.plugins.drivers.base.proto.LinuxResources") - proto.RegisterType((*Mount)(nil), "hashicorp.nomad.plugins.drivers.base.proto.Mount") - proto.RegisterType((*Device)(nil), "hashicorp.nomad.plugins.drivers.base.proto.Device") - proto.RegisterType((*TaskHandle)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskHandle") - proto.RegisterType((*NetworkOverride)(nil), "hashicorp.nomad.plugins.drivers.base.proto.NetworkOverride") - proto.RegisterMapType((map[string]int32)(nil), "hashicorp.nomad.plugins.drivers.base.proto.NetworkOverride.PortMapEntry") - proto.RegisterType((*ExitResult)(nil), "hashicorp.nomad.plugins.drivers.base.proto.ExitResult") - proto.RegisterType((*TaskStatus)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskStatus") - proto.RegisterType((*TaskDriverStatus)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskDriverStatus") - proto.RegisterMapType((map[string]string)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskDriverStatus.AttributesEntry") - proto.RegisterType((*TaskStats)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskStats") - proto.RegisterMapType((map[string]*TaskResourceUsage)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskStats.ResourceUsageByPidEntry") - proto.RegisterType((*TaskResourceUsage)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskResourceUsage") - proto.RegisterType((*CPUUsage)(nil), "hashicorp.nomad.plugins.drivers.base.proto.CPUUsage") - proto.RegisterType((*MemoryUsage)(nil), "hashicorp.nomad.plugins.drivers.base.proto.MemoryUsage") - proto.RegisterType((*DriverTaskEvent)(nil), "hashicorp.nomad.plugins.drivers.base.proto.DriverTaskEvent") - proto.RegisterMapType((map[string]string)(nil), "hashicorp.nomad.plugins.drivers.base.proto.DriverTaskEvent.AnnotationsEntry") - proto.RegisterEnum("hashicorp.nomad.plugins.drivers.base.proto.TaskState", TaskState_name, TaskState_value) - proto.RegisterEnum("hashicorp.nomad.plugins.drivers.base.proto.FingerprintResponse_HealthState", FingerprintResponse_HealthState_name, FingerprintResponse_HealthState_value) - proto.RegisterEnum("hashicorp.nomad.plugins.drivers.base.proto.StartTaskResponse_Result", StartTaskResponse_Result_name, StartTaskResponse_Result_value) - proto.RegisterEnum("hashicorp.nomad.plugins.drivers.base.proto.DriverCapabilities_FSIsolation", DriverCapabilities_FSIsolation_name, DriverCapabilities_FSIsolation_value) - proto.RegisterEnum("hashicorp.nomad.plugins.drivers.base.proto.CPUUsage_Fields", CPUUsage_Fields_name, CPUUsage_Fields_value) - proto.RegisterEnum("hashicorp.nomad.plugins.drivers.base.proto.MemoryUsage_Fields", MemoryUsage_Fields_name, MemoryUsage_Fields_value) + proto.RegisterType((*TaskConfigSchemaRequest)(nil), "hashicorp.nomad.plugins.drivers.proto.TaskConfigSchemaRequest") + proto.RegisterType((*TaskConfigSchemaResponse)(nil), "hashicorp.nomad.plugins.drivers.proto.TaskConfigSchemaResponse") + proto.RegisterType((*CapabilitiesRequest)(nil), "hashicorp.nomad.plugins.drivers.proto.CapabilitiesRequest") + proto.RegisterType((*CapabilitiesResponse)(nil), "hashicorp.nomad.plugins.drivers.proto.CapabilitiesResponse") + proto.RegisterType((*FingerprintRequest)(nil), "hashicorp.nomad.plugins.drivers.proto.FingerprintRequest") + proto.RegisterType((*FingerprintResponse)(nil), "hashicorp.nomad.plugins.drivers.proto.FingerprintResponse") + proto.RegisterMapType((map[string]string)(nil), "hashicorp.nomad.plugins.drivers.proto.FingerprintResponse.AttributesEntry") + proto.RegisterType((*RecoverTaskRequest)(nil), "hashicorp.nomad.plugins.drivers.proto.RecoverTaskRequest") + proto.RegisterType((*RecoverTaskResponse)(nil), "hashicorp.nomad.plugins.drivers.proto.RecoverTaskResponse") + proto.RegisterType((*StartTaskRequest)(nil), "hashicorp.nomad.plugins.drivers.proto.StartTaskRequest") + proto.RegisterType((*StartTaskResponse)(nil), "hashicorp.nomad.plugins.drivers.proto.StartTaskResponse") + proto.RegisterType((*WaitTaskRequest)(nil), "hashicorp.nomad.plugins.drivers.proto.WaitTaskRequest") + proto.RegisterType((*WaitTaskResponse)(nil), "hashicorp.nomad.plugins.drivers.proto.WaitTaskResponse") + proto.RegisterType((*StopTaskRequest)(nil), "hashicorp.nomad.plugins.drivers.proto.StopTaskRequest") + proto.RegisterType((*StopTaskResponse)(nil), "hashicorp.nomad.plugins.drivers.proto.StopTaskResponse") + proto.RegisterType((*DestroyTaskRequest)(nil), "hashicorp.nomad.plugins.drivers.proto.DestroyTaskRequest") + proto.RegisterType((*DestroyTaskResponse)(nil), "hashicorp.nomad.plugins.drivers.proto.DestroyTaskResponse") + proto.RegisterType((*InspectTaskRequest)(nil), "hashicorp.nomad.plugins.drivers.proto.InspectTaskRequest") + proto.RegisterType((*InspectTaskResponse)(nil), "hashicorp.nomad.plugins.drivers.proto.InspectTaskResponse") + proto.RegisterType((*TaskStatsRequest)(nil), "hashicorp.nomad.plugins.drivers.proto.TaskStatsRequest") + proto.RegisterType((*TaskStatsResponse)(nil), "hashicorp.nomad.plugins.drivers.proto.TaskStatsResponse") + proto.RegisterType((*TaskEventsRequest)(nil), "hashicorp.nomad.plugins.drivers.proto.TaskEventsRequest") + proto.RegisterType((*SignalTaskRequest)(nil), "hashicorp.nomad.plugins.drivers.proto.SignalTaskRequest") + proto.RegisterType((*SignalTaskResponse)(nil), "hashicorp.nomad.plugins.drivers.proto.SignalTaskResponse") + proto.RegisterType((*ExecTaskRequest)(nil), "hashicorp.nomad.plugins.drivers.proto.ExecTaskRequest") + proto.RegisterType((*ExecTaskResponse)(nil), "hashicorp.nomad.plugins.drivers.proto.ExecTaskResponse") + proto.RegisterType((*DriverCapabilities)(nil), "hashicorp.nomad.plugins.drivers.proto.DriverCapabilities") + proto.RegisterType((*TaskConfig)(nil), "hashicorp.nomad.plugins.drivers.proto.TaskConfig") + proto.RegisterMapType((map[string]string)(nil), "hashicorp.nomad.plugins.drivers.proto.TaskConfig.EnvEntry") + proto.RegisterType((*Resources)(nil), "hashicorp.nomad.plugins.drivers.proto.Resources") + proto.RegisterType((*RawResources)(nil), "hashicorp.nomad.plugins.drivers.proto.RawResources") + proto.RegisterType((*NetworkResource)(nil), "hashicorp.nomad.plugins.drivers.proto.NetworkResource") + proto.RegisterType((*NetworkPort)(nil), "hashicorp.nomad.plugins.drivers.proto.NetworkPort") + proto.RegisterType((*LinuxResources)(nil), "hashicorp.nomad.plugins.drivers.proto.LinuxResources") + proto.RegisterType((*Mount)(nil), "hashicorp.nomad.plugins.drivers.proto.Mount") + proto.RegisterType((*Device)(nil), "hashicorp.nomad.plugins.drivers.proto.Device") + proto.RegisterType((*TaskHandle)(nil), "hashicorp.nomad.plugins.drivers.proto.TaskHandle") + proto.RegisterType((*NetworkOverride)(nil), "hashicorp.nomad.plugins.drivers.proto.NetworkOverride") + proto.RegisterMapType((map[string]int32)(nil), "hashicorp.nomad.plugins.drivers.proto.NetworkOverride.PortMapEntry") + proto.RegisterType((*ExitResult)(nil), "hashicorp.nomad.plugins.drivers.proto.ExitResult") + proto.RegisterType((*TaskStatus)(nil), "hashicorp.nomad.plugins.drivers.proto.TaskStatus") + proto.RegisterType((*TaskDriverStatus)(nil), "hashicorp.nomad.plugins.drivers.proto.TaskDriverStatus") + proto.RegisterMapType((map[string]string)(nil), "hashicorp.nomad.plugins.drivers.proto.TaskDriverStatus.AttributesEntry") + proto.RegisterType((*TaskStats)(nil), "hashicorp.nomad.plugins.drivers.proto.TaskStats") + proto.RegisterMapType((map[string]*TaskResourceUsage)(nil), "hashicorp.nomad.plugins.drivers.proto.TaskStats.ResourceUsageByPidEntry") + proto.RegisterType((*TaskResourceUsage)(nil), "hashicorp.nomad.plugins.drivers.proto.TaskResourceUsage") + proto.RegisterType((*CPUUsage)(nil), "hashicorp.nomad.plugins.drivers.proto.CPUUsage") + proto.RegisterType((*MemoryUsage)(nil), "hashicorp.nomad.plugins.drivers.proto.MemoryUsage") + proto.RegisterType((*DriverTaskEvent)(nil), "hashicorp.nomad.plugins.drivers.proto.DriverTaskEvent") + proto.RegisterMapType((map[string]string)(nil), "hashicorp.nomad.plugins.drivers.proto.DriverTaskEvent.AnnotationsEntry") + proto.RegisterEnum("hashicorp.nomad.plugins.drivers.proto.TaskState", TaskState_name, TaskState_value) + proto.RegisterEnum("hashicorp.nomad.plugins.drivers.proto.FingerprintResponse_HealthState", FingerprintResponse_HealthState_name, FingerprintResponse_HealthState_value) + proto.RegisterEnum("hashicorp.nomad.plugins.drivers.proto.StartTaskResponse_Result", StartTaskResponse_Result_name, StartTaskResponse_Result_value) + proto.RegisterEnum("hashicorp.nomad.plugins.drivers.proto.DriverCapabilities_FSIsolation", DriverCapabilities_FSIsolation_name, DriverCapabilities_FSIsolation_value) + proto.RegisterEnum("hashicorp.nomad.plugins.drivers.proto.CPUUsage_Fields", CPUUsage_Fields_name, CPUUsage_Fields_value) + proto.RegisterEnum("hashicorp.nomad.plugins.drivers.proto.MemoryUsage_Fields", MemoryUsage_Fields_name, MemoryUsage_Fields_value) } // Reference imports to suppress errors if they are not otherwise used. @@ -2721,11 +2649,8 @@ type DriverClient interface { StopTask(ctx context.Context, in *StopTaskRequest, opts ...grpc.CallOption) (*StopTaskResponse, error) // DestroyTask removes the task from the driver's internal state and cleans // up any additional resources created by the driver. It cannot be called - // on a running task. + // on a running task, unless force is set to true. DestroyTask(ctx context.Context, in *DestroyTaskRequest, opts ...grpc.CallOption) (*DestroyTaskResponse, error) - // ListTasks returns a list of summary information of all the tasks the - // driver is tracking. - ListTasks(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) // InspectTask returns detailed information for the given task InspectTask(ctx context.Context, in *InspectTaskRequest, opts ...grpc.CallOption) (*InspectTaskResponse, error) // TaskStats collects and returns runtime metrics for the given task @@ -2749,7 +2674,7 @@ func NewDriverClient(cc *grpc.ClientConn) DriverClient { func (c *driverClient) TaskConfigSchema(ctx context.Context, in *TaskConfigSchemaRequest, opts ...grpc.CallOption) (*TaskConfigSchemaResponse, error) { out := new(TaskConfigSchemaResponse) - err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.base.proto.Driver/TaskConfigSchema", in, out, opts...) + err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.proto.Driver/TaskConfigSchema", in, out, opts...) if err != nil { return nil, err } @@ -2758,7 +2683,7 @@ func (c *driverClient) TaskConfigSchema(ctx context.Context, in *TaskConfigSchem func (c *driverClient) Capabilities(ctx context.Context, in *CapabilitiesRequest, opts ...grpc.CallOption) (*CapabilitiesResponse, error) { out := new(CapabilitiesResponse) - err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.base.proto.Driver/Capabilities", in, out, opts...) + err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.proto.Driver/Capabilities", in, out, opts...) if err != nil { return nil, err } @@ -2766,7 +2691,7 @@ func (c *driverClient) Capabilities(ctx context.Context, in *CapabilitiesRequest } func (c *driverClient) Fingerprint(ctx context.Context, in *FingerprintRequest, opts ...grpc.CallOption) (Driver_FingerprintClient, error) { - stream, err := c.cc.NewStream(ctx, &_Driver_serviceDesc.Streams[0], "/hashicorp.nomad.plugins.drivers.base.proto.Driver/Fingerprint", opts...) + stream, err := c.cc.NewStream(ctx, &_Driver_serviceDesc.Streams[0], "/hashicorp.nomad.plugins.drivers.proto.Driver/Fingerprint", opts...) if err != nil { return nil, err } @@ -2799,7 +2724,7 @@ func (x *driverFingerprintClient) Recv() (*FingerprintResponse, error) { func (c *driverClient) RecoverTask(ctx context.Context, in *RecoverTaskRequest, opts ...grpc.CallOption) (*RecoverTaskResponse, error) { out := new(RecoverTaskResponse) - err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.base.proto.Driver/RecoverTask", in, out, opts...) + err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.proto.Driver/RecoverTask", in, out, opts...) if err != nil { return nil, err } @@ -2808,7 +2733,7 @@ func (c *driverClient) RecoverTask(ctx context.Context, in *RecoverTaskRequest, func (c *driverClient) StartTask(ctx context.Context, in *StartTaskRequest, opts ...grpc.CallOption) (*StartTaskResponse, error) { out := new(StartTaskResponse) - err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.base.proto.Driver/StartTask", in, out, opts...) + err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.proto.Driver/StartTask", in, out, opts...) if err != nil { return nil, err } @@ -2817,7 +2742,7 @@ func (c *driverClient) StartTask(ctx context.Context, in *StartTaskRequest, opts func (c *driverClient) WaitTask(ctx context.Context, in *WaitTaskRequest, opts ...grpc.CallOption) (*WaitTaskResponse, error) { out := new(WaitTaskResponse) - err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.base.proto.Driver/WaitTask", in, out, opts...) + err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.proto.Driver/WaitTask", in, out, opts...) if err != nil { return nil, err } @@ -2826,7 +2751,7 @@ func (c *driverClient) WaitTask(ctx context.Context, in *WaitTaskRequest, opts . func (c *driverClient) StopTask(ctx context.Context, in *StopTaskRequest, opts ...grpc.CallOption) (*StopTaskResponse, error) { out := new(StopTaskResponse) - err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.base.proto.Driver/StopTask", in, out, opts...) + err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.proto.Driver/StopTask", in, out, opts...) if err != nil { return nil, err } @@ -2835,16 +2760,7 @@ func (c *driverClient) StopTask(ctx context.Context, in *StopTaskRequest, opts . func (c *driverClient) DestroyTask(ctx context.Context, in *DestroyTaskRequest, opts ...grpc.CallOption) (*DestroyTaskResponse, error) { out := new(DestroyTaskResponse) - err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.base.proto.Driver/DestroyTask", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *driverClient) ListTasks(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) { - out := new(ListTasksResponse) - err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.base.proto.Driver/ListTasks", in, out, opts...) + err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.proto.Driver/DestroyTask", in, out, opts...) if err != nil { return nil, err } @@ -2853,7 +2769,7 @@ func (c *driverClient) ListTasks(ctx context.Context, in *ListTasksRequest, opts func (c *driverClient) InspectTask(ctx context.Context, in *InspectTaskRequest, opts ...grpc.CallOption) (*InspectTaskResponse, error) { out := new(InspectTaskResponse) - err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.base.proto.Driver/InspectTask", in, out, opts...) + err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.proto.Driver/InspectTask", in, out, opts...) if err != nil { return nil, err } @@ -2862,7 +2778,7 @@ func (c *driverClient) InspectTask(ctx context.Context, in *InspectTaskRequest, func (c *driverClient) TaskStats(ctx context.Context, in *TaskStatsRequest, opts ...grpc.CallOption) (*TaskStatsResponse, error) { out := new(TaskStatsResponse) - err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.base.proto.Driver/TaskStats", in, out, opts...) + err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.proto.Driver/TaskStats", in, out, opts...) if err != nil { return nil, err } @@ -2870,7 +2786,7 @@ func (c *driverClient) TaskStats(ctx context.Context, in *TaskStatsRequest, opts } func (c *driverClient) TaskEvents(ctx context.Context, in *TaskEventsRequest, opts ...grpc.CallOption) (Driver_TaskEventsClient, error) { - stream, err := c.cc.NewStream(ctx, &_Driver_serviceDesc.Streams[1], "/hashicorp.nomad.plugins.drivers.base.proto.Driver/TaskEvents", opts...) + stream, err := c.cc.NewStream(ctx, &_Driver_serviceDesc.Streams[1], "/hashicorp.nomad.plugins.drivers.proto.Driver/TaskEvents", opts...) if err != nil { return nil, err } @@ -2903,7 +2819,7 @@ func (x *driverTaskEventsClient) Recv() (*DriverTaskEvent, error) { func (c *driverClient) SignalTask(ctx context.Context, in *SignalTaskRequest, opts ...grpc.CallOption) (*SignalTaskResponse, error) { out := new(SignalTaskResponse) - err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.base.proto.Driver/SignalTask", in, out, opts...) + err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.proto.Driver/SignalTask", in, out, opts...) if err != nil { return nil, err } @@ -2912,7 +2828,7 @@ func (c *driverClient) SignalTask(ctx context.Context, in *SignalTaskRequest, op func (c *driverClient) ExecTask(ctx context.Context, in *ExecTaskRequest, opts ...grpc.CallOption) (*ExecTaskResponse, error) { out := new(ExecTaskResponse) - err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.base.proto.Driver/ExecTask", in, out, opts...) + err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.proto.Driver/ExecTask", in, out, opts...) if err != nil { return nil, err } @@ -2951,11 +2867,8 @@ type DriverServer interface { StopTask(context.Context, *StopTaskRequest) (*StopTaskResponse, error) // DestroyTask removes the task from the driver's internal state and cleans // up any additional resources created by the driver. It cannot be called - // on a running task. + // on a running task, unless force is set to true. DestroyTask(context.Context, *DestroyTaskRequest) (*DestroyTaskResponse, error) - // ListTasks returns a list of summary information of all the tasks the - // driver is tracking. - ListTasks(context.Context, *ListTasksRequest) (*ListTasksResponse, error) // InspectTask returns detailed information for the given task InspectTask(context.Context, *InspectTaskRequest) (*InspectTaskResponse, error) // TaskStats collects and returns runtime metrics for the given task @@ -2983,7 +2896,7 @@ func _Driver_TaskConfigSchema_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/hashicorp.nomad.plugins.drivers.base.proto.Driver/TaskConfigSchema", + FullMethod: "/hashicorp.nomad.plugins.drivers.proto.Driver/TaskConfigSchema", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DriverServer).TaskConfigSchema(ctx, req.(*TaskConfigSchemaRequest)) @@ -3001,7 +2914,7 @@ func _Driver_Capabilities_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/hashicorp.nomad.plugins.drivers.base.proto.Driver/Capabilities", + FullMethod: "/hashicorp.nomad.plugins.drivers.proto.Driver/Capabilities", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DriverServer).Capabilities(ctx, req.(*CapabilitiesRequest)) @@ -3040,7 +2953,7 @@ func _Driver_RecoverTask_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/hashicorp.nomad.plugins.drivers.base.proto.Driver/RecoverTask", + FullMethod: "/hashicorp.nomad.plugins.drivers.proto.Driver/RecoverTask", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DriverServer).RecoverTask(ctx, req.(*RecoverTaskRequest)) @@ -3058,7 +2971,7 @@ func _Driver_StartTask_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/hashicorp.nomad.plugins.drivers.base.proto.Driver/StartTask", + FullMethod: "/hashicorp.nomad.plugins.drivers.proto.Driver/StartTask", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DriverServer).StartTask(ctx, req.(*StartTaskRequest)) @@ -3076,7 +2989,7 @@ func _Driver_WaitTask_Handler(srv interface{}, ctx context.Context, dec func(int } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/hashicorp.nomad.plugins.drivers.base.proto.Driver/WaitTask", + FullMethod: "/hashicorp.nomad.plugins.drivers.proto.Driver/WaitTask", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DriverServer).WaitTask(ctx, req.(*WaitTaskRequest)) @@ -3094,7 +3007,7 @@ func _Driver_StopTask_Handler(srv interface{}, ctx context.Context, dec func(int } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/hashicorp.nomad.plugins.drivers.base.proto.Driver/StopTask", + FullMethod: "/hashicorp.nomad.plugins.drivers.proto.Driver/StopTask", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DriverServer).StopTask(ctx, req.(*StopTaskRequest)) @@ -3112,7 +3025,7 @@ func _Driver_DestroyTask_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/hashicorp.nomad.plugins.drivers.base.proto.Driver/DestroyTask", + FullMethod: "/hashicorp.nomad.plugins.drivers.proto.Driver/DestroyTask", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DriverServer).DestroyTask(ctx, req.(*DestroyTaskRequest)) @@ -3120,24 +3033,6 @@ func _Driver_DestroyTask_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } -func _Driver_ListTasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListTasksRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DriverServer).ListTasks(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/hashicorp.nomad.plugins.drivers.base.proto.Driver/ListTasks", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DriverServer).ListTasks(ctx, req.(*ListTasksRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Driver_InspectTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(InspectTaskRequest) if err := dec(in); err != nil { @@ -3148,7 +3043,7 @@ func _Driver_InspectTask_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/hashicorp.nomad.plugins.drivers.base.proto.Driver/InspectTask", + FullMethod: "/hashicorp.nomad.plugins.drivers.proto.Driver/InspectTask", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DriverServer).InspectTask(ctx, req.(*InspectTaskRequest)) @@ -3166,7 +3061,7 @@ func _Driver_TaskStats_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/hashicorp.nomad.plugins.drivers.base.proto.Driver/TaskStats", + FullMethod: "/hashicorp.nomad.plugins.drivers.proto.Driver/TaskStats", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DriverServer).TaskStats(ctx, req.(*TaskStatsRequest)) @@ -3205,7 +3100,7 @@ func _Driver_SignalTask_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/hashicorp.nomad.plugins.drivers.base.proto.Driver/SignalTask", + FullMethod: "/hashicorp.nomad.plugins.drivers.proto.Driver/SignalTask", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DriverServer).SignalTask(ctx, req.(*SignalTaskRequest)) @@ -3223,7 +3118,7 @@ func _Driver_ExecTask_Handler(srv interface{}, ctx context.Context, dec func(int } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/hashicorp.nomad.plugins.drivers.base.proto.Driver/ExecTask", + FullMethod: "/hashicorp.nomad.plugins.drivers.proto.Driver/ExecTask", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DriverServer).ExecTask(ctx, req.(*ExecTaskRequest)) @@ -3232,7 +3127,7 @@ func _Driver_ExecTask_Handler(srv interface{}, ctx context.Context, dec func(int } var _Driver_serviceDesc = grpc.ServiceDesc{ - ServiceName: "hashicorp.nomad.plugins.drivers.base.proto.Driver", + ServiceName: "hashicorp.nomad.plugins.drivers.proto.Driver", HandlerType: (*DriverServer)(nil), Methods: []grpc.MethodDesc{ { @@ -3263,10 +3158,6 @@ var _Driver_serviceDesc = grpc.ServiceDesc{ MethodName: "DestroyTask", Handler: _Driver_DestroyTask_Handler, }, - { - MethodName: "ListTasks", - Handler: _Driver_ListTasks_Handler, - }, { MethodName: "InspectTask", Handler: _Driver_InspectTask_Handler, @@ -3299,184 +3190,179 @@ var _Driver_serviceDesc = grpc.ServiceDesc{ Metadata: "driver.proto", } -func init() { proto.RegisterFile("driver.proto", fileDescriptor_driver_4db9b3af49fa7db9) } +func init() { proto.RegisterFile("driver.proto", fileDescriptor_driver_c5fa1f582257ecd9) } -var fileDescriptor_driver_4db9b3af49fa7db9 = []byte{ - // 2810 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0x5f, 0x6f, 0xe3, 0xc6, - 0x11, 0x37, 0xf5, 0xcf, 0xd2, 0x48, 0x96, 0x79, 0x7b, 0x77, 0x8d, 0xa2, 0xa0, 0xcd, 0x85, 0x40, - 0x00, 0x23, 0x69, 0xe4, 0xc6, 0x69, 0xd3, 0xfc, 0xb9, 0xbb, 0x44, 0x91, 0x78, 0x67, 0xe7, 0x2c, - 0xd9, 0x59, 0xc9, 0x48, 0x52, 0x24, 0x61, 0x68, 0x72, 0x4f, 0x62, 0x2c, 0xfe, 0x09, 0x97, 0xf2, - 0xd9, 0x01, 0x0a, 0xe4, 0x21, 0x40, 0x81, 0xa2, 0x2d, 0x8a, 0xb4, 0xef, 0x41, 0xdf, 0x8b, 0xa2, - 0xaf, 0x7d, 0xea, 0x17, 0x08, 0xd0, 0x4f, 0xd0, 0x2f, 0x50, 0xa0, 0x7d, 0xe8, 0x27, 0x28, 0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0x30, 0xff, 0x52, 0xbb, 0x09, 0xd7, 0x3b, 0x66, 0x60, 0x1e, - 0x3b, 0x13, 0x27, 0x72, 0x08, 0x8d, 0x99, 0x7e, 0x01, 0x37, 0xe6, 0xc9, 0x92, 0xe1, 0x31, 0xd4, - 0xac, 0x14, 0x5d, 0x32, 0xbe, 0xdb, 0xba, 0xba, 0xb6, 0x5b, 0x5d, 0x4e, 0x9a, 0x43, 0x9f, 0xc3, - 0xd4, 0x6e, 0x00, 0xba, 0xe7, 0x78, 0x23, 0x12, 0x06, 0xa1, 0xe3, 0x45, 0xb1, 0x44, 0x7f, 0xcc, - 0xc3, 0xf5, 0x39, 0xb2, 0x94, 0xc8, 0x07, 0x30, 0xa3, 0x28, 0x74, 0x8e, 0xa7, 0x11, 0x97, 0x27, - 0xbf, 0x55, 0xdd, 0x39, 0xc8, 0x22, 0xcf, 0x25, 0xa0, 0xad, 0x76, 0x82, 0xa8, 0x7b, 0x51, 0x78, - 0x8e, 0x53, 0x2c, 0x90, 0x05, 0xa5, 0x31, 0x31, 0x27, 0xd1, 0xb8, 0x91, 0xbb, 0xa5, 0x6c, 0xd5, - 0x77, 0x1e, 0xac, 0xca, 0x6c, 0x97, 0xa3, 0x0d, 0x22, 0x33, 0x22, 0x58, 0x42, 0xa3, 0x97, 0x00, - 0x89, 0x37, 0xc3, 0x26, 0xd4, 0x0a, 0x9d, 0x80, 0xb9, 0x63, 0x23, 0x7f, 0x4b, 0xd9, 0xaa, 0xe0, - 0x6b, 0x62, 0xa6, 0x3b, 0x9b, 0x68, 0xde, 0x81, 0xcd, 0x0b, 0x22, 0x23, 0x15, 0xf2, 0x27, 0xe4, - 0x9c, 0x1b, 0xa8, 0x82, 0xd9, 0x2b, 0xba, 0x01, 0xc5, 0x53, 0x73, 0x32, 0x25, 0x5c, 0xee, 0x0a, - 0x16, 0x83, 0x37, 0x72, 0xaf, 0x29, 0xda, 0xeb, 0x50, 0x4d, 0x09, 0x81, 0xea, 0x00, 0x47, 0x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82, 0xdc, 0x17, 0x18, 0x07, 0x12, 0x02, 0x6f, 0x7a, 0xf3, 0x04, - 0xed, 0x45, 0x28, 0x89, 0x7f, 0x66, 0x2e, 0x36, 0x38, 0xea, 0x74, 0xf4, 0xc1, 0x40, 0x5d, 0x43, - 0x15, 0x28, 0x62, 0x7d, 0x88, 0x99, 0xeb, 0x55, 0xa0, 0x78, 0xaf, 0x3d, 0x6c, 0xef, 0xab, 0x39, - 0xed, 0x05, 0xd8, 0x7c, 0xdf, 0x74, 0xa2, 0xab, 0x78, 0x9d, 0x16, 0x81, 0x3a, 0x5b, 0x2b, 0x8d, - 0xd5, 0x9f, 0x33, 0x56, 0x46, 0x25, 0xe9, 0x67, 0x4e, 0x74, 0xc1, 0x3c, 0x2a, 0xe4, 0x49, 0x18, - 0x4a, 0x8b, 0xb0, 0x57, 0xed, 0x11, 0x6c, 0x0e, 0x22, 0x3f, 0xb8, 0xd2, 0xbe, 0x78, 0x05, 0xd6, - 0x59, 0x52, 0xf1, 0xa7, 0x91, 0xdc, 0x18, 0x4f, 0xb7, 0x44, 0xd2, 0x69, 0xc5, 0x49, 0xa7, 0xd5, - 0x95, 0x49, 0x09, 0xc7, 0x2b, 0xd1, 0x0f, 0xa0, 0x44, 0x9d, 0x91, 0x67, 0x4e, 0x64, 0x60, 0x90, - 0x23, 0x0d, 0x31, 0xef, 0x8f, 0x19, 0xcb, 0x1d, 0xf1, 0x12, 0xa0, 0x2e, 0xa1, 0x51, 0xe8, 0x9f, - 0x5f, 0x49, 0x63, 0x37, 0xe1, 0xfa, 0xdc, 0x72, 0x89, 0x82, 0x40, 0xdd, 0x77, 0x28, 0x57, 0x64, - 0x92, 0x2a, 0x4c, 0xb8, 0x96, 0xa2, 0x49, 0xed, 0xee, 0x43, 0x91, 0x21, 0xc5, 0x01, 0x39, 0xb3, - 0x07, 0xb2, 0x40, 0x34, 0xa5, 0x58, 0x80, 0x30, 0xe1, 0xf7, 0x3c, 0x96, 0xae, 0xae, 0x66, 0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x3d, 0x16, 0x15, 0x9f, 0x81, - 0x0a, 0x3b, 0x22, 0x88, 0xe9, 0x1c, 0x9f, 0x2e, 0x33, 0x02, 0x9f, 0x7c, 0x16, 0xaa, 0x91, 0x1f, - 0x99, 0x13, 0x23, 0x72, 0xac, 0x13, 0x91, 0x44, 0x15, 0x0c, 0x9c, 0x34, 0x64, 0x14, 0xf4, 0x22, - 0x5c, 0x8b, 0xc6, 0xa1, 0x1f, 0x45, 0x13, 0x56, 0x10, 0xf2, 0xc2, 0x47, 0x14, 0x29, 0x05, 0xac, - 0x26, 0x13, 0xa2, 0x20, 0xa2, 0x2c, 0x1d, 0xcc, 0x16, 0x33, 0xaf, 0xe6, 0x61, 0xaa, 0x80, 0x37, - 0x12, 0x2a, 0xf3, 0x7a, 0xd4, 0x80, 0xf5, 0x80, 0x84, 0x16, 0xf1, 0x44, 0x24, 0x52, 0x70, 0x3c, - 0x44, 0x36, 0x6c, 0xba, 0xc4, 0xa4, 0xd3, 0x90, 0xd8, 0xc6, 0x43, 0x87, 0x4c, 0x6c, 0x71, 0x60, - 0xaa, 0x67, 0xab, 0xa1, 0x63, 0xdd, 0xb4, 0xee, 0x71, 0x08, 0x5c, 0x8f, 0x31, 0xc5, 0x98, 0x15, - 0x21, 0xe2, 0x0d, 0x6d, 0x42, 0x75, 0xf0, 0xe1, 0x60, 0xa8, 0xf7, 0x8c, 0xde, 0x41, 0x57, 0x97, - 0x57, 0xfa, 0x03, 0x1d, 0x8b, 0xa1, 0xc2, 0xe6, 0x87, 0x07, 0xc3, 0xf6, 0xbe, 0x31, 0xdc, 0xeb, - 0x3c, 0x18, 0xa8, 0x39, 0x74, 0x13, 0xae, 0x0d, 0x77, 0xf1, 0xc1, 0x70, 0xb8, 0xaf, 0x77, 0x8d, - 0x43, 0x1d, 0xef, 0x1d, 0x74, 0x07, 0x6a, 0x1e, 0x21, 0xa8, 0xcf, 0xc8, 0xc3, 0xbd, 0x9e, 0xae, - 0x16, 0x50, 0x15, 0xd6, 0x0f, 0x75, 0xdc, 0xd1, 0xfb, 0x43, 0xb5, 0xa8, 0xfd, 0x33, 0x07, 0xd5, - 0x94, 0x29, 0x99, 0x73, 0x87, 0x54, 0x1c, 0xa1, 0x0a, 0x98, 0xbd, 0xb2, 0x60, 0x63, 0x99, 0xd6, - 0x58, 0x98, 0xa8, 0x80, 0xc5, 0x80, 0x19, 0xcf, 0x35, 0xcf, 0x52, 0x71, 0xa0, 0x80, 0xcb, 0xae, - 0x79, 0x26, 0x40, 0x9e, 0x83, 0xda, 0x09, 0x09, 0x3d, 0x32, 0x91, 0xf3, 0xc2, 0x2c, 0x55, 0x41, - 0x13, 0x4b, 0xb6, 0x40, 0x95, 0x4b, 0x66, 0x30, 0xc2, 0x26, 0x75, 0x41, 0xef, 0xc5, 0x60, 0xa3, - 0x45, 0xd5, 0x97, 0xb8, 0xea, 0xef, 0x2e, 0xe9, 0xae, 0x8f, 0xd3, 0xfe, 0x20, 0xd1, 0xfe, 0x3a, - 0xe4, 0x71, 0x7c, 0x93, 0xdd, 0x69, 0x77, 0x76, 0x99, 0xc6, 0x37, 0xa0, 0xd2, 0x6b, 0x7f, 0x60, - 0x1c, 0xb5, 0x07, 0xf7, 0x75, 0x35, 0x87, 0x54, 0xa8, 0x3d, 0xd0, 0x71, 0x5f, 0xdf, 0x37, 0x8e, - 0x06, 0xed, 0xfb, 0xba, 0x9a, 0x47, 0x37, 0x40, 0x95, 0x14, 0xbe, 0x8e, 0x53, 0x0b, 0xda, 0x5f, - 0x72, 0xb0, 0x29, 0x82, 0x7f, 0x72, 0x61, 0xf6, 0xf8, 0x9b, 0xab, 0xe5, 0xe3, 0x73, 0x03, 0xd6, - 0x5d, 0x42, 0x13, 0x63, 0x54, 0x70, 0x3c, 0x44, 0x1e, 0x54, 0x4d, 0xcf, 0xf3, 0x23, 0x7e, 0xd7, - 0x42, 0x65, 0x04, 0xdd, 0xcf, 0x7e, 0xb5, 0x93, 0x88, 0xdf, 0x6a, 0xcf, 0xe0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, 0xd6, 0xbc, 0xbd, 0xdc, 0xc7, 0x89, 0x24, 0xcc, 0x67, 0x52, 0x8d, 0xb0, - 0x6c, 0x3e, 0xb3, 0xd8, 0x70, 0xcb, 0xe6, 0x33, 0x97, 0x75, 0xe0, 0x84, 0xcf, 0x24, 0x0d, 0xb7, - 0x6c, 0x3e, 0x73, 0xb1, 0x77, 0x97, 0xcd, 0x67, 0x16, 0xba, 0x7c, 0x52, 0x3f, 0xa9, 0x56, 0x5b, - 0x36, 0xfd, 0x2c, 0xf6, 0xf4, 0xb2, 0xe9, 0xe7, 0x92, 0x1e, 0x9f, 0xd4, 0xcf, 0xec, 0xcc, 0x72, - 0x7b, 0xb9, 0xc6, 0xd4, 0x32, 0xfa, 0x59, 0x68, 0x92, 0x69, 0x6b, 0xe8, 0x37, 0xf2, 0x52, 0x46, - 0xb4, 0xb6, 0x50, 0x66, 0xbc, 0xb9, 0x96, 0x58, 0xf3, 0xcd, 0x15, 0xf2, 0x2c, 0x0f, 0x81, 0xbf, - 0x55, 0x00, 0x66, 0xed, 0xb0, 0x6c, 0xe2, 0x2c, 0x34, 0xe3, 0x9a, 0x77, 0x97, 0xfd, 0x7c, 0x6e, - 0xa3, 0xc7, 0xcd, 0xb0, 0x6c, 0x1b, 0xfd, 0x42, 0xfb, 0x2e, 0xdb, 0x46, 0xbf, 0xd8, 0x7f, 0xd3, - 0xd6, 0xde, 0x59, 0xff, 0x45, 0x51, 0x94, 0x44, 0x25, 0xfe, 0x78, 0xe5, 0x7f, 0x01, 0x00, 0x00, - 0xff, 0xff, 0xb0, 0x0e, 0x99, 0xe1, 0x4f, 0x26, 0x00, 0x00, +var fileDescriptor_driver_c5fa1f582257ecd9 = []byte{ + // 2732 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x59, 0xcb, 0x6f, 0x23, 0xc7, + 0xd1, 0x17, 0x49, 0x91, 0x22, 0x8b, 0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0x16, 0x40, 0x9b, 0xae, 0xad, 0x14, 0xc9, 0xa5, 0x67, 0x0e, + 0x07, 0xe2, 0x6b, 0x37, 0xb0, 0xea, 0x29, 0x7a, 0xb2, 0xc5, 0x25, 0x9d, 0x44, 0x51, 0xe6, 0x08, + 0x29, 0x5d, 0xf3, 0x08, 0xd1, 0xff, 0x51, 0x00, 0x74, 0x39, 0xeb, 0x41, 0xaf, 0x41, 0x83, 0x12, + 0xdf, 0x31, 0xa5, 0x1a, 0xa5, 0x85, 0xab, 0xb8, 0xce, 0x69, 0x52, 0x9f, 0x14, 0x21, 0x58, 0x26, + 0x67, 0xc4, 0x56, 0xbb, 0x55, 0xb4, 0xd1, 0x18, 0x1a, 0xc7, 0xd4, 0x74, 0x69, 0x30, 0xb1, 0xd2, + 0xf4, 0xa0, 0xb9, 0x69, 0x2c, 0x9c, 0x7d, 0x75, 0x1e, 0x0d, 0x76, 0x12, 0x30, 0x5c, 0x3f, 0xa6, + 0x69, 0x47, 0xef, 0x40, 0x3d, 0xc3, 0x43, 0x55, 0x58, 0xee, 0xef, 0xf7, 0x0d, 0x6d, 0x09, 0x01, + 0x54, 0x7a, 0xdb, 0x78, 0x7f, 0x7f, 0x28, 0x4f, 0xed, 0x9d, 0xbd, 0xee, 0x63, 0x43, 0x2b, 0xea, + 0xff, 0x2e, 0x01, 0x4c, 0xc3, 0x27, 0x6a, 0x42, 0x31, 0xb5, 0x74, 0xd1, 0x75, 0xf8, 0xcf, 0xf8, + 0x96, 0x97, 0x24, 0x22, 0xa2, 0x8d, 0x36, 0xe1, 0xb6, 0x47, 0x47, 0xa1, 0x65, 0x9f, 0x98, 0x2a, + 0xea, 0xd9, 0x62, 0xb2, 0xf8, 0xab, 0x06, 0xbe, 0xa9, 0x98, 0x4a, 0x6a, 0x89, 0xbb, 0x0b, 0x25, + 0xe2, 0x9f, 0xb6, 0x96, 0x45, 0xaa, 0xf7, 0x70, 0xee, 0xb0, 0xde, 0x31, 0xfc, 0x53, 0x99, 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 0x23, 0xea, 0x85, 0x60, 0xde, 0x7c, 0x8d, 0xc8, 0x7c, 0x8d, 0xf0, 0xe4, 0x40, 0x05, + 0x44, 0x09, 0x27, 0xe3, 0x61, 0xdd, 0x49, 0x13, 0x59, 0xa2, 0xff, 0xb3, 0x90, 0x6e, 0xf9, 0x24, + 0xe1, 0x44, 0x9f, 0x43, 0x95, 0xef, 0x1e, 0xd3, 0xb3, 0x42, 0xf5, 0x16, 0xd2, 0x5b, 0x2c, 0x97, + 0xed, 0xf0, 0xcd, 0xb2, 0x67, 0x85, 0x32, 0x52, 0xae, 0x84, 0xb2, 0xc7, 0x8f, 0x0e, 0xcb, 0x99, + 0x1e, 0x1d, 0xbc, 0x8d, 0x5e, 0x87, 0xa6, 0x15, 0xb3, 0xc0, 0xb4, 0x9c, 0x53, 0x12, 0x31, 0x97, + 0x12, 0x65, 0xe1, 0x55, 0x4e, 0xed, 0x26, 0xc4, 0xf6, 0x43, 0x68, 0x64, 0x31, 0xbf, 0x2e, 0xb8, + 0x94, 0xb3, 0xc1, 0xe5, 0xbb, 0x00, 0xd3, 0xbc, 0x8a, 0x7b, 0x02, 0x39, 0x73, 0x99, 0x69, 0x07, + 0x8e, 0x3c, 0xda, 0xca, 0xb8, 0xca, 0x09, 0xbd, 0xc0, 0x21, 0x17, 0xb2, 0xd4, 0x72, 0x92, 0xa5, + 0xf2, 0xcd, 0xc7, 0xb7, 0xca, 0x89, 0x3b, 0x99, 0x10, 0x47, 0x49, 0x58, 0x0b, 0x02, 0xef, 0x89, + 0x20, 0xe8, 0x7f, 0x2e, 0x4a, 0x8f, 0x90, 0x77, 0x84, 0x5c, 0xb9, 0x4b, 0x6a, 0xea, 0xd2, 0xf5, + 0x4c, 0xfd, 0x00, 0x80, 0x32, 0x2b, 0x62, 0xc4, 0x31, 0x2d, 0xa6, 0xae, 0xdd, 0xed, 0x4b, 0x69, + 0xee, 0x30, 0x79, 0x6e, 0xc4, 0x35, 0x35, 0xba, 0xcb, 0xd0, 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8, 0xbf, + 0x2f, 0x41, 0x35, 0x41, 0xe7, 0x11, 0x97, 0x9e, 0x53, 0x46, 0x3c, 0xd3, 0x4b, 0x8e, 0xb0, 0x02, + 0x06, 0x49, 0xda, 0xe3, 0x87, 0xd8, 0x2b, 0x50, 0xe3, 0x99, 0xba, 0x64, 0x17, 0x05, 0xbb, 0xca, + 0x09, 0x82, 0xf9, 0x2a, 0xd4, 0x59, 0xc0, 0xac, 0x89, 0xc9, 0x5c, 0xfb, 0x44, 0x06, 0xb9, 0x02, + 0x06, 0x41, 0x1a, 0x72, 0x0a, 0x7a, 0x13, 0x6e, 0xb0, 0x71, 0x14, 0x30, 0x36, 0xe1, 0x69, 0x9a, + 0x48, 0x4c, 0x64, 0x12, 0xb1, 0x8c, 0xb5, 0x94, 0x21, 0x13, 0x16, 0xca, 0x4f, 0xef, 0xe9, 0x60, + 0xee, 0xba, 0xe2, 0x10, 0x59, 0xc6, 0xab, 0x29, 0x95, 0xbb, 0x36, 0xbf, 0xa2, 0x87, 0x24, 0xb2, + 0x89, 0x2f, 0xcf, 0x8a, 0x02, 0x4e, 0xba, 0xc8, 0x84, 0x35, 0x8f, 0x58, 0x34, 0x8e, 0x88, 0x63, + 0x1e, 0xbb, 0x64, 0xe2, 0xc8, 0x2b, 0x4b, 0x33, 0x77, 0x52, 0x9b, 0xa8, 0xa5, 0xf3, 0x48, 0xcc, + 0xc6, 0xcd, 0x04, 0x4e, 0xf6, 0x79, 0x7e, 0x20, 0x5b, 0x68, 0x0d, 0xea, 0x83, 0x67, 0x83, 0xa1, + 0xb1, 0x67, 0xee, 0xed, 0x6f, 0x19, 0xea, 0x8d, 0x7a, 0x60, 0x60, 0xd9, 0x2d, 0x70, 0xfe, 0x70, + 0x7f, 0xd8, 0xdd, 0x35, 0x87, 0x3b, 0xbd, 0x27, 0x03, 0xad, 0x88, 0x6e, 0xc3, 0x8d, 0xe1, 0x36, + 0xde, 0x1f, 0x0e, 0x77, 0x8d, 0x2d, 0xf3, 0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, 0x0d, 0x23, 0x17, 0x0a, 0x46, 0xed, 0x7b, 0x73, 0xcf, 0xcb, 0x2e, 0x9f, 0x14, + 0x5a, 0x72, 0x2f, 0x7f, 0xa1, 0x24, 0xd4, 0xbe, 0x37, 0xf7, 0xbc, 0x74, 0x79, 0xee, 0x09, 0x99, + 0x7a, 0x4c, 0x6e, 0x4f, 0xb8, 0x5c, 0x08, 0xca, 0xed, 0x09, 0x57, 0x95, 0x7f, 0xa4, 0x20, 0x99, + 0x8a, 0x4e, 0x6e, 0x41, 0x2e, 0x57, 0x8d, 0x72, 0x0b, 0x72, 0x45, 0x01, 0x49, 0xb9, 0xe4, 0x34, + 0x41, 0xbf, 0x37, 0x77, 0x11, 0x64, 0x4e, 0x97, 0xbc, 0x54, 0x86, 0xd1, 0x97, 0xd0, 0x8f, 0xd4, + 0x93, 0x81, 0xac, 0xa0, 0xa0, 0x79, 0xa0, 0x66, 0x8a, 0x2e, 0xed, 0xf7, 0x16, 0x0b, 0x35, 0xe2, + 0x8c, 0xf8, 0x71, 0x01, 0x60, 0x5a, 0x6b, 0xc9, 0x2d, 0xc4, 0xa5, 0x22, 0x4f, 0xfb, 0xc1, 0x02, + 0x33, 0xb3, 0xdb, 0x23, 0x29, 0xaf, 0xe4, 0xde, 0x1e, 0x17, 0x6a, 0x41, 0xb9, 0xb7, 0xc7, 0xc5, + 0x3a, 0x8e, 0xbe, 0xf4, 0xf1, 0xca, 0xb7, 0xca, 0x32, 0xf6, 0x57, 0xc4, 0xe7, 0xdd, 0xff, 0x04, + 0x00, 0x00, 0xff, 0xff, 0x96, 0x01, 0xe4, 0xc4, 0xf0, 0x23, 0x00, 0x00, } diff --git a/plugins/drivers/base/proto/driver.proto b/plugins/drivers/proto/driver.proto similarity index 95% rename from plugins/drivers/base/proto/driver.proto rename to plugins/drivers/proto/driver.proto index 36c878144..9c870d27e 100644 --- a/plugins/drivers/base/proto/driver.proto +++ b/plugins/drivers/proto/driver.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package hashicorp.nomad.plugins.drivers.base.proto; +package hashicorp.nomad.plugins.drivers.proto; option go_package = "proto"; import "google/protobuf/duration.proto"; @@ -48,13 +48,9 @@ service Driver { // DestroyTask removes the task from the driver's internal state and cleans // up any additional resources created by the driver. It cannot be called - // on a running task. + // on a running task, unless force is set to true. rpc DestroyTask(DestroyTaskRequest) returns (DestroyTaskResponse) {} - // ListTasks returns a list of summary information of all the tasks the - // driver is tracking. - rpc ListTasks(ListTasksRequest) returns (ListTasksResponse) {} - // InspectTask returns detailed information for the given task rpc InspectTask(InspectTaskRequest) returns (InspectTaskResponse) {} @@ -205,18 +201,13 @@ message DestroyTaskRequest { // TaskId is the ID of the target task string task_id = 1; + + // Force destroys the task even if it is still in a running state + bool force = 2; } message DestroyTaskResponse {} -message ListTasksRequest {} - -message ListTasksResponse { - - // Tasks includes a list of summary information for each task - repeated TaskStatus tasks = 1; -} - message InspectTaskRequest { // TaskId is the ID of the target task @@ -471,19 +462,15 @@ message TaskStatus { // State is the state of the task's execution TaskState state = 3; - // SizeOnDiskMb is the disk space the driver reports the task is consuming - // in megabytes. - int64 size_on_disk_mb = 4; - // StartedAt is the timestamp when the task was started - google.protobuf.Timestamp started_at = 5; + google.protobuf.Timestamp started_at = 4; // CompletedAt is the timestamp when the task exited. // If the task is still running, CompletedAt will not be set - google.protobuf.Timestamp completed_at = 6; + google.protobuf.Timestamp completed_at = 5; // Result is set when CompletedAt is set. - ExitResult result = 7; + ExitResult result = 6; } message TaskDriverStatus { @@ -548,7 +535,7 @@ message MemoryUsage { enum Fields { RSS = 0; CACHE = 1; - MAX_UASGE = 2; + MAX_USAGE = 2; KERNEL_USAGE = 3; KERNEL_MAX_USAGE = 4; } diff --git a/plugins/drivers/server.go b/plugins/drivers/server.go new file mode 100644 index 000000000..4392626b6 --- /dev/null +++ b/plugins/drivers/server.go @@ -0,0 +1,254 @@ +package drivers + +import ( + "io" + + "golang.org/x/net/context" + + "github.com/golang/protobuf/ptypes" + hclog "github.com/hashicorp/go-hclog" + plugin "github.com/hashicorp/go-plugin" + "github.com/hashicorp/nomad/plugins/drivers/proto" +) + +type driverPluginServer struct { + broker *plugin.GRPCBroker + impl DriverPlugin + logger hclog.Logger +} + +func (b *driverPluginServer) TaskConfigSchema(ctx context.Context, req *proto.TaskConfigSchemaRequest) (*proto.TaskConfigSchemaResponse, error) { + spec, err := b.impl.TaskConfigSchema() + if err != nil { + return nil, err + } + + resp := &proto.TaskConfigSchemaResponse{ + Spec: spec, + } + return resp, nil +} + +func (b *driverPluginServer) Capabilities(ctx context.Context, req *proto.CapabilitiesRequest) (*proto.CapabilitiesResponse, error) { + caps, err := b.impl.Capabilities() + if err != nil { + return nil, err + } + resp := &proto.CapabilitiesResponse{ + Capabilities: &proto.DriverCapabilities{ + SendSignals: caps.SendSignals, + Exec: caps.Exec, + }, + } + + switch caps.FSIsolation { + case FSIsolationNone: + resp.Capabilities.FsIsolation = proto.DriverCapabilities_NONE + case FSIsolationChroot: + resp.Capabilities.FsIsolation = proto.DriverCapabilities_CHROOT + case FSIsolationImage: + resp.Capabilities.FsIsolation = proto.DriverCapabilities_IMAGE + } + return resp, nil +} + +func (b *driverPluginServer) Fingerprint(req *proto.FingerprintRequest, srv proto.Driver_FingerprintServer) error { + ctx := srv.Context() + ch, err := b.impl.Fingerprint(ctx) + if err != nil { + return err + } + + for { + select { + case <-ctx.Done(): + return nil + case f, ok := <-ch: + + if !ok { + return nil + } + resp := &proto.FingerprintResponse{ + Attributes: f.Attributes, + Health: healthStateToProto(f.Health), + HealthDescription: f.HealthDescription, + } + + if err := srv.Send(resp); err != nil { + return err + } + } + } +} + +func (b *driverPluginServer) RecoverTask(ctx context.Context, req *proto.RecoverTaskRequest) (*proto.RecoverTaskResponse, error) { + err := b.impl.RecoverTask(taskHandleFromProto(req.Handle)) + if err != nil { + return nil, err + } + + return &proto.RecoverTaskResponse{}, nil +} + +func (b *driverPluginServer) StartTask(ctx context.Context, req *proto.StartTaskRequest) (*proto.StartTaskResponse, error) { + handle, err := b.impl.StartTask(taskConfigFromProto(req.Task)) + if err != nil { + return nil, err + } + + resp := &proto.StartTaskResponse{ + Handle: taskHandleToProto(handle), + } + + return resp, nil +} + +func (b *driverPluginServer) WaitTask(ctx context.Context, req *proto.WaitTaskRequest) (*proto.WaitTaskResponse, error) { + ch, err := b.impl.WaitTask(ctx, req.TaskId) + if err != nil { + return nil, err + } + + result := <-ch + var errStr string + if result.Err != nil { + errStr = result.Err.Error() + } + + resp := &proto.WaitTaskResponse{ + Err: errStr, + Result: &proto.ExitResult{ + ExitCode: int32(result.ExitCode), + Signal: int32(result.Signal), + OomKilled: result.OOMKilled, + }, + } + + return resp, nil +} + +func (b *driverPluginServer) StopTask(ctx context.Context, req *proto.StopTaskRequest) (*proto.StopTaskResponse, error) { + timeout, err := ptypes.Duration(req.Timeout) + if err != nil { + return nil, err + } + + err = b.impl.StopTask(req.TaskId, timeout, req.Signal) + if err != nil { + return nil, err + } + return &proto.StopTaskResponse{}, nil +} + +func (b *driverPluginServer) DestroyTask(ctx context.Context, req *proto.DestroyTaskRequest) (*proto.DestroyTaskResponse, error) { + err := b.impl.DestroyTask(req.TaskId, req.Force) + if err != nil { + return nil, err + } + return &proto.DestroyTaskResponse{}, nil +} + +func (b *driverPluginServer) InspectTask(ctx context.Context, req *proto.InspectTaskRequest) (*proto.InspectTaskResponse, error) { + status, err := b.impl.InspectTask(req.TaskId) + if err != nil { + return nil, err + } + + protoStatus, err := taskStatusToProto(status) + if err != nil { + return nil, err + } + + resp := &proto.InspectTaskResponse{ + Task: protoStatus, + Driver: &proto.TaskDriverStatus{ + Attributes: status.DriverAttributes, + }, + NetworkOverride: &proto.NetworkOverride{ + PortMap: status.NetworkOverride.PortMap, + Addr: status.NetworkOverride.Addr, + AutoAdvertise: status.NetworkOverride.AutoAdvertise, + }, + } + + return resp, nil +} + +func (b *driverPluginServer) TaskStats(ctx context.Context, req *proto.TaskStatsRequest) (*proto.TaskStatsResponse, error) { + stats, err := b.impl.TaskStats(req.TaskId) + if err != nil { + return nil, err + } + + pb, err := taskStatsToProto(stats) + if err != nil { + return nil, err + } + + resp := &proto.TaskStatsResponse{ + Stats: pb, + } + + return resp, nil +} + +func (b *driverPluginServer) ExecTask(ctx context.Context, req *proto.ExecTaskRequest) (*proto.ExecTaskResponse, error) { + timeout, err := ptypes.Duration(req.Timeout) + if err != nil { + return nil, err + } + + result, err := b.impl.ExecTask(req.TaskId, req.Command, timeout) + if err != nil { + return nil, err + } + resp := &proto.ExecTaskResponse{ + Stdout: result.Stdout, + Stderr: result.Stderr, + Result: exitResultToProto(result.ExitResult), + } + + return resp, nil +} + +func (b *driverPluginServer) SignalTask(ctx context.Context, req *proto.SignalTaskRequest) (*proto.SignalTaskResponse, error) { + err := b.impl.SignalTask(req.TaskId, req.Signal) + if err != nil { + return nil, err + } + + resp := &proto.SignalTaskResponse{} + return resp, nil +} + +func (b *driverPluginServer) TaskEvents(req *proto.TaskEventsRequest, srv proto.Driver_TaskEventsServer) error { + ch, err := b.impl.TaskEvents(srv.Context()) + if err != nil { + return err + } + + for { + event := <-ch + if event == nil { + break + } + pbTimestamp, err := ptypes.TimestampProto(event.Timestamp) + if err != nil { + return err + } + + pbEvent := &proto.DriverTaskEvent{ + TaskId: event.TaskID, + Timestamp: pbTimestamp, + Message: event.Message, + Annotations: event.Annotations, + } + + if err = srv.Send(pbEvent); err == io.EOF { + break + } else if err != nil { + return err + } + } + return nil +} diff --git a/plugins/drivers/task_handle.go b/plugins/drivers/task_handle.go new file mode 100644 index 000000000..9cf030c87 --- /dev/null +++ b/plugins/drivers/task_handle.go @@ -0,0 +1,30 @@ +package drivers + +import ( + "github.com/hashicorp/nomad/nomad/structs" + "github.com/ugorji/go/codec" +) + +// TaskHandle is the state shared between a driver and the client. +// It is returned to the client after starting the task and used +// for recovery of tasks during a driver restart. +type TaskHandle struct { + Driver string + Config *TaskConfig + State TaskState + driverState []byte +} + +func NewTaskHandle(driver string) *TaskHandle { + return &TaskHandle{Driver: driver} +} + +func (h *TaskHandle) SetDriverState(v interface{}) error { + h.driverState = []byte{} + return codec.NewEncoderBytes(&h.driverState, structs.MsgpackHandle).Encode(v) +} + +func (h *TaskHandle) GetDriverState(v interface{}) error { + return codec.NewDecoderBytes(h.driverState, structs.MsgpackHandle).Decode(v) + +} diff --git a/plugins/drivers/testing.go b/plugins/drivers/testing.go new file mode 100644 index 000000000..3cea5d457 --- /dev/null +++ b/plugins/drivers/testing.go @@ -0,0 +1,112 @@ +package drivers + +import ( + "io/ioutil" + "os" + "path/filepath" + "time" + + "github.com/mitchellh/go-testing-interface" + "github.com/stretchr/testify/require" + "golang.org/x/net/context" + + plugin "github.com/hashicorp/go-plugin" + "github.com/hashicorp/nomad/helper/testlog" + "github.com/hashicorp/nomad/plugins/base" + "github.com/hashicorp/nomad/plugins/shared/hclspec" +) + +type DriverHarness struct { + DriverPlugin + client *plugin.GRPCClient + server *plugin.GRPCServer + t testing.T +} + +func NewDriverHarness(t testing.T, d DriverPlugin) *DriverHarness { + client, server := plugin.TestPluginGRPCConn(t, map[string]plugin.Plugin{ + base.PluginTypeDriver: &PluginDriver{ + impl: d, + logger: testlog.HCLogger(t), + }, + }) + + raw, err := client.Dispense(base.PluginTypeDriver) + if err != nil { + t.Fatalf("err dispensing plugin: %v", err) + } + + dClient := raw.(DriverPlugin) + h := &DriverHarness{ + client: client, + server: server, + DriverPlugin: dClient, + } + + return h +} + +func (h *DriverHarness) Kill() { + h.client.Close() + h.server.Stop() +} + +// MkAllocDir creates a tempory directory and allocdir structure. +// A cleanup func is returned and should be defered so as to not leak dirs +// between tests. +func (h *DriverHarness) MkAllocDir(t *TaskConfig) func() { + allocDir, err := ioutil.TempDir("", "nomad_driver_harness-") + require.NoError(h.t, err) + require.NoError(h.t, os.Mkdir(filepath.Join(allocDir, t.Name), os.ModePerm)) + require.NoError(h.t, os.MkdirAll(filepath.Join(allocDir, "alloc/logs"), os.ModePerm)) + t.AllocDir = allocDir + return func() { os.RemoveAll(allocDir) } +} + +// MockDriver is used for testing. +// Each function can be set as a closure to make assertions about how data +// is passed through the base plugin layer. +type MockDriver struct { + base.MockPlugin + TaskConfigSchemaF func() (*hclspec.Spec, error) + FingerprintF func(context.Context) (<-chan *Fingerprint, error) + CapabilitiesF func() (*Capabilities, error) + RecoverTaskF func(*TaskHandle) error + StartTaskF func(*TaskConfig) (*TaskHandle, error) + WaitTaskF func(context.Context, string) (<-chan *ExitResult, error) + StopTaskF func(string, time.Duration, string) error + DestroyTaskF func(string, bool) error + InspectTaskF func(string) (*TaskStatus, error) + TaskStatsF func(string) (*TaskStats, error) + TaskEventsF func(context.Context) (<-chan *TaskEvent, error) + SignalTaskF func(string, string) error + ExecTaskF func(string, []string, time.Duration) (*ExecTaskResult, error) +} + +func (d *MockDriver) TaskConfigSchema() (*hclspec.Spec, error) { return d.TaskConfigSchemaF() } +func (d *MockDriver) Fingerprint(ctx context.Context) (<-chan *Fingerprint, error) { + return d.FingerprintF(ctx) +} +func (d *MockDriver) Capabilities() (*Capabilities, error) { return d.CapabilitiesF() } +func (d *MockDriver) RecoverTask(h *TaskHandle) error { return d.RecoverTaskF(h) } +func (d *MockDriver) StartTask(c *TaskConfig) (*TaskHandle, error) { return d.StartTaskF(c) } +func (d *MockDriver) WaitTask(ctx context.Context, id string) (<-chan *ExitResult, error) { + return d.WaitTaskF(ctx, id) +} +func (d *MockDriver) StopTask(taskID string, timeout time.Duration, signal string) error { + return d.StopTaskF(taskID, timeout, signal) +} +func (d *MockDriver) DestroyTask(taskID string, force bool) error { + return d.DestroyTaskF(taskID, force) +} +func (d *MockDriver) InspectTask(taskID string) (*TaskStatus, error) { return d.InspectTaskF(taskID) } +func (d *MockDriver) TaskStats(taskID string) (*TaskStats, error) { return d.TaskStats(taskID) } +func (d *MockDriver) TaskEvents(ctx context.Context) (<-chan *TaskEvent, error) { + return d.TaskEventsF(ctx) +} +func (d *MockDriver) SignalTask(taskID string, signal string) error { + return d.SignalTask(taskID, signal) +} +func (d *MockDriver) ExecTask(taskID string, cmd []string, timeout time.Duration) (*ExecTaskResult, error) { + return d.ExecTaskF(taskID, cmd, timeout) +} diff --git a/plugins/drivers/testing_test.go b/plugins/drivers/testing_test.go new file mode 100644 index 000000000..ac4141f8d --- /dev/null +++ b/plugins/drivers/testing_test.go @@ -0,0 +1,24 @@ +package drivers + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +var _ DriverPlugin = (*MockDriver)(nil) + +// Very simple test to ensure the test harness works as expected +func TestDriverHarness(t *testing.T) { + handle := &TaskHandle{Config: &TaskConfig{Name: "mock"}} + d := &MockDriver{ + StartTaskF: func(task *TaskConfig) (*TaskHandle, error) { + return handle, nil + }, + } + harness := NewDriverHarness(t, d) + defer harness.Kill() + actual, err := harness.StartTask(&TaskConfig{}) + require.NoError(t, err) + require.Equal(t, handle.Config.Name, actual.Config.Name) +} diff --git a/plugins/drivers/utils.go b/plugins/drivers/utils.go new file mode 100644 index 000000000..7bf248491 --- /dev/null +++ b/plugins/drivers/utils.go @@ -0,0 +1,296 @@ +package drivers + +import ( + "strings" + "time" + + "github.com/golang/protobuf/ptypes" + cstructs "github.com/hashicorp/nomad/client/structs" + "github.com/hashicorp/nomad/plugins/drivers/proto" +) + +var protoTaskStateMap = map[TaskState]proto.TaskState{ + TaskStateUnknown: proto.TaskState_UNKNOWN, + TaskStateRunning: proto.TaskState_RUNNING, + TaskStateExited: proto.TaskState_EXITED, +} + +func healthStateToProto(health HealthState) proto.FingerprintResponse_HealthState { + switch health { + case HealthStateUndetected: + return proto.FingerprintResponse_UNDETECTED + case HealthStateUnhealthy: + return proto.FingerprintResponse_UNHEALTHY + case HealthStateHealthy: + return proto.FingerprintResponse_HEALTHY + } + return proto.FingerprintResponse_UNDETECTED +} + +func healthStateFromProto(pb proto.FingerprintResponse_HealthState) HealthState { + switch pb { + case proto.FingerprintResponse_UNDETECTED: + return HealthStateUndetected + case proto.FingerprintResponse_UNHEALTHY: + return HealthStateUnhealthy + case proto.FingerprintResponse_HEALTHY: + return HealthStateHealthy + } + return HealthStateUndetected +} + +func taskConfigFromProto(pb *proto.TaskConfig) *TaskConfig { + if pb == nil { + return &TaskConfig{} + } + return &TaskConfig{ + ID: pb.Id, + Name: pb.Name, + Env: pb.Env, + rawDriverConfig: pb.MsgpackDriverConfig, + Resources: Resources{}, //TODO + Devices: []DeviceConfig{}, //TODO + Mounts: []MountConfig{}, //TODO + User: pb.User, + AllocDir: pb.AllocDir, + } +} + +func taskConfigToProto(cfg *TaskConfig) *proto.TaskConfig { + if cfg == nil { + return &proto.TaskConfig{} + } + pb := &proto.TaskConfig{ + Id: cfg.ID, + Name: cfg.Name, + Env: cfg.Env, + Resources: &proto.Resources{}, + Mounts: []*proto.Mount{}, + Devices: []*proto.Device{}, + User: cfg.User, + AllocDir: cfg.AllocDir, + MsgpackDriverConfig: cfg.rawDriverConfig, + } + return pb +} + +func taskHandleFromProto(pb *proto.TaskHandle) *TaskHandle { + if pb == nil { + return &TaskHandle{} + } + return &TaskHandle{ + Config: taskConfigFromProto(pb.Config), + State: TaskState(strings.ToLower(pb.State.String())), + driverState: pb.DriverState, + } +} + +func taskHandleToProto(handle *TaskHandle) *proto.TaskHandle { + return &proto.TaskHandle{ + Config: taskConfigToProto(handle.Config), + State: protoTaskStateMap[handle.State], + DriverState: handle.driverState, + } +} + +func exitResultToProto(result *ExitResult) *proto.ExitResult { + return &proto.ExitResult{ + ExitCode: int32(result.ExitCode), + Signal: int32(result.Signal), + OomKilled: result.OOMKilled, + } +} + +func exitResultFromProto(pb *proto.ExitResult) *ExitResult { + return &ExitResult{ + ExitCode: int(pb.ExitCode), + Signal: int(pb.Signal), + OOMKilled: pb.OomKilled, + } +} + +func taskStatusToProto(status *TaskStatus) (*proto.TaskStatus, error) { + started, err := ptypes.TimestampProto(status.StartedAt) + if err != nil { + return nil, err + } + completed, err := ptypes.TimestampProto(status.CompletedAt) + if err != nil { + return nil, err + } + return &proto.TaskStatus{ + Id: status.ID, + Name: status.Name, + StartedAt: started, + CompletedAt: completed, + Result: exitResultToProto(status.ExitResult), + }, nil +} + +func taskStatusFromProto(pb *proto.TaskStatus) (*TaskStatus, error) { + started, err := ptypes.Timestamp(pb.StartedAt) + if err != nil { + return nil, err + } + + completed, err := ptypes.Timestamp(pb.CompletedAt) + if err != nil { + return nil, err + } + + return &TaskStatus{ + ID: pb.Id, + Name: pb.Name, + StartedAt: started, + CompletedAt: completed, + ExitResult: exitResultFromProto(pb.Result), + }, nil +} + +func taskStatsToProto(stats *TaskStats) (*proto.TaskStats, error) { + timestamp, err := ptypes.TimestampProto(time.Unix(stats.Timestamp, 0)) + if err != nil { + return nil, err + } + + pids := map[string]*proto.TaskResourceUsage{} + for pid, ru := range stats.ResourceUsageByPid { + pids[pid] = resourceUsageToProto(ru) + } + + return &proto.TaskStats{ + Id: stats.ID, + Timestamp: timestamp, + AggResourceUsage: resourceUsageToProto(stats.AggResourceUsage), + ResourceUsageByPid: pids, + }, nil +} + +func taskStatsFromProto(pb *proto.TaskStats) (*TaskStats, error) { + timestamp, err := ptypes.Timestamp(pb.Timestamp) + if err != nil { + return nil, err + } + + pids := map[string]*cstructs.ResourceUsage{} + for pid, ru := range pb.ResourceUsageByPid { + pids[pid] = resourceUsageFromProto(ru) + } + + stats := &TaskStats{ + ID: pb.Id, + Timestamp: timestamp.Unix(), + AggResourceUsage: resourceUsageFromProto(pb.AggResourceUsage), + ResourceUsageByPid: pids, + } + + return stats, nil +} + +func resourceUsageToProto(ru *cstructs.ResourceUsage) *proto.TaskResourceUsage { + cpu := &proto.CPUUsage{} + for _, field := range ru.CpuStats.Measured { + switch field { + case "System Mode": + cpu.SystemMode = ru.CpuStats.SystemMode + cpu.MeasuredFields = append(cpu.MeasuredFields, proto.CPUUsage_SYSTEM_MODE) + case "User Mode": + cpu.UserMode = ru.CpuStats.UserMode + cpu.MeasuredFields = append(cpu.MeasuredFields, proto.CPUUsage_USER_MODE) + case "Total Ticks": + cpu.TotalTicks = ru.CpuStats.TotalTicks + cpu.MeasuredFields = append(cpu.MeasuredFields, proto.CPUUsage_TOTAL_TICKS) + case "Throttled Periods": + cpu.ThrottledPeriods = ru.CpuStats.ThrottledPeriods + cpu.MeasuredFields = append(cpu.MeasuredFields, proto.CPUUsage_THROTTLED_PERIODS) + case "Throttled Time": + cpu.ThrottledTime = ru.CpuStats.ThrottledTime + cpu.MeasuredFields = append(cpu.MeasuredFields, proto.CPUUsage_THROTTLED_TIME) + case "Percent": + cpu.Percent = ru.CpuStats.Percent + cpu.MeasuredFields = append(cpu.MeasuredFields, proto.CPUUsage_PERCENT) + } + } + + memory := &proto.MemoryUsage{} + for _, field := range ru.MemoryStats.Measured { + switch field { + case "RSS": + memory.Rss = ru.MemoryStats.RSS + memory.MeasuredFields = append(memory.MeasuredFields, proto.MemoryUsage_RSS) + case "Cache": + memory.Cache = ru.MemoryStats.Cache + memory.MeasuredFields = append(memory.MeasuredFields, proto.MemoryUsage_CACHE) + case "Max Usage": + memory.MaxUsage = ru.MemoryStats.MaxUsage + memory.MeasuredFields = append(memory.MeasuredFields, proto.MemoryUsage_MAX_USAGE) + case "Kernel Usage": + memory.KernelUsage = ru.MemoryStats.KernelUsage + memory.MeasuredFields = append(memory.MeasuredFields, proto.MemoryUsage_KERNEL_USAGE) + case "Kernel Max Usage": + memory.KernelMaxUsage = ru.MemoryStats.KernelMaxUsage + memory.MeasuredFields = append(memory.MeasuredFields, proto.MemoryUsage_KERNEL_MAX_USAGE) + } + } + + return &proto.TaskResourceUsage{ + Cpu: cpu, + Memory: memory, + } +} + +func resourceUsageFromProto(pb *proto.TaskResourceUsage) *cstructs.ResourceUsage { + cpu := cstructs.CpuStats{} + if pb.Cpu != nil { + for _, field := range pb.Cpu.MeasuredFields { + switch field { + case proto.CPUUsage_SYSTEM_MODE: + cpu.SystemMode = pb.Cpu.SystemMode + cpu.Measured = append(cpu.Measured, "System Mode") + case proto.CPUUsage_USER_MODE: + cpu.UserMode = pb.Cpu.UserMode + cpu.Measured = append(cpu.Measured, "User Mode") + case proto.CPUUsage_TOTAL_TICKS: + cpu.TotalTicks = pb.Cpu.TotalTicks + cpu.Measured = append(cpu.Measured, "Total Ticks") + case proto.CPUUsage_THROTTLED_PERIODS: + cpu.ThrottledPeriods = pb.Cpu.ThrottledPeriods + cpu.Measured = append(cpu.Measured, "Throttled Periods") + case proto.CPUUsage_THROTTLED_TIME: + cpu.ThrottledTime = pb.Cpu.ThrottledTime + cpu.Measured = append(cpu.Measured, "Throttled Time") + case proto.CPUUsage_PERCENT: + cpu.Percent = pb.Cpu.Percent + cpu.Measured = append(cpu.Measured, "Percent") + } + } + } + + memory := cstructs.MemoryStats{} + if pb.Memory != nil { + for _, field := range pb.Memory.MeasuredFields { + switch field { + case proto.MemoryUsage_RSS: + memory.RSS = pb.Memory.Rss + memory.Measured = append(memory.Measured, "RSS") + case proto.MemoryUsage_CACHE: + memory.Cache = pb.Memory.Cache + memory.Measured = append(memory.Measured, "Cache") + case proto.MemoryUsage_MAX_USAGE: + memory.MaxUsage = pb.Memory.MaxUsage + memory.Measured = append(memory.Measured, "Max Usage") + case proto.MemoryUsage_KERNEL_USAGE: + memory.KernelUsage = pb.Memory.KernelUsage + memory.Measured = append(memory.Measured, "Kernel Usage") + case proto.MemoryUsage_KERNEL_MAX_USAGE: + memory.KernelMaxUsage = pb.Memory.KernelMaxUsage + memory.Measured = append(memory.Measured, "Kernel Max Usage") + } + } + } + + return &cstructs.ResourceUsage{ + CpuStats: &cpu, + MemoryStats: &memory, + } +} diff --git a/plugins/drivers/utils/utils.go b/plugins/drivers/utils/utils.go new file mode 100644 index 000000000..4ace338ff --- /dev/null +++ b/plugins/drivers/utils/utils.go @@ -0,0 +1,99 @@ +package utils + +import ( + "encoding/json" + "fmt" + "io" + "os" + "os/exec" + + hclog "github.com/hashicorp/go-hclog" + plugin "github.com/hashicorp/go-plugin" + "github.com/hashicorp/nomad/client/driver" + "github.com/hashicorp/nomad/client/driver/executor" + dstructs "github.com/hashicorp/nomad/client/driver/structs" + "github.com/hashicorp/nomad/helper/discover" + "github.com/hashicorp/nomad/nomad/structs" +) + +// CgroupsMounted returns true if the cgroups are mounted on a system otherwise +// returns false +func CgroupsMounted(node *structs.Node) bool { + _, ok := node.Attributes["unique.cgroup.mountpoint"] + return ok +} + +// CreateExecutor launches an executor plugin and returns an instance of the +// Executor interface +func CreateExecutor(w io.Writer, level hclog.Level, CMinPort, CMaxPort uint, + executorConfig *dstructs.ExecutorConfig) (executor.Executor, *plugin.Client, error) { + + c, err := json.Marshal(executorConfig) + if err != nil { + return nil, nil, fmt.Errorf("unable to create executor config: %v", err) + } + bin, err := discover.NomadExecutable() + if err != nil { + return nil, nil, fmt.Errorf("unable to find the nomad binary: %v", err) + } + + config := &plugin.ClientConfig{ + Cmd: exec.Command(bin, "executor", string(c)), + } + config.HandshakeConfig = driver.HandshakeConfig + config.Plugins = driver.GetPluginMap(w, level, executorConfig.FSIsolation) + config.MaxPort = CMaxPort + config.MinPort = CMinPort + + // setting the setsid of the plugin process so that it doesn't get signals sent to + // the nomad client. + if config.Cmd != nil { + isolateCommand(config.Cmd) + } + + executorClient := plugin.NewClient(config) + rpcClient, err := executorClient.Client() + if err != nil { + return nil, nil, fmt.Errorf("error creating rpc client for executor plugin: %v", err) + } + + raw, err := rpcClient.Dispense("executor") + if err != nil { + return nil, nil, fmt.Errorf("unable to dispense the executor plugin: %v", err) + } + executorPlugin := raw.(executor.Executor) + return executorPlugin, executorClient, nil +} + +func CreateExecutorWithConfig(config *plugin.ClientConfig, w io.Writer) (executor.Executor, *plugin.Client, error) { + config.HandshakeConfig = driver.HandshakeConfig + + // Setting this to DEBUG since the log level at the executor server process + // is already set, and this effects only the executor client. + config.Plugins = driver.GetPluginMap(w, hclog.Debug, false) + + executorClient := plugin.NewClient(config) + rpcClient, err := executorClient.Client() + if err != nil { + return nil, nil, fmt.Errorf("error creating rpc client for executor plugin: %v", err) + } + + raw, err := rpcClient.Dispense("executor") + if err != nil { + return nil, nil, fmt.Errorf("unable to dispense the executor plugin: %v", err) + } + executorPlugin, ok := raw.(*driver.ExecutorRPC) + if !ok { + return nil, nil, fmt.Errorf("unexpected executor rpc type: %T", raw) + } + return executorPlugin, executorClient, nil +} + +// KillProcess kills a process with the given pid +func KillProcess(pid int) error { + proc, err := os.FindProcess(pid) + if err != nil { + return err + } + return proc.Kill() +} diff --git a/plugins/drivers/utils/utils_unix.go b/plugins/drivers/utils/utils_unix.go new file mode 100644 index 000000000..f720a6e22 --- /dev/null +++ b/plugins/drivers/utils/utils_unix.go @@ -0,0 +1,18 @@ +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +package utils + +import ( + "os/exec" + "syscall" +) + +// isolateCommand sets the setsid flag in exec.Cmd to true so that the process +// becomes the process leader in a new session and doesn't receive signals that +// are sent to the parent process. +func isolateCommand(cmd *exec.Cmd) { + if cmd.SysProcAttr == nil { + cmd.SysProcAttr = &syscall.SysProcAttr{} + } + cmd.SysProcAttr.Setsid = true +} diff --git a/plugins/drivers/utils/utils_windows.go b/plugins/drivers/utils/utils_windows.go new file mode 100644 index 000000000..a12de4d9e --- /dev/null +++ b/plugins/drivers/utils/utils_windows.go @@ -0,0 +1,8 @@ +package utils + +import ( + "os/exec" +) + +// TODO Figure out if this is needed in Windows +func isolateCommand(cmd *exec.Cmd) {}