From 2072611bdbff924824e85d77c8298d010994df73 Mon Sep 17 00:00:00 2001 From: Nick Ethier Date: Wed, 15 Aug 2018 18:23:46 -0400 Subject: [PATCH] driver/base: fixup comments from code review --- plugins/drivers/base/proto/driver.pb.go | 1731 +++++++++++++++++------ plugins/drivers/base/proto/driver.proto | 231 ++- 2 files changed, 1515 insertions(+), 447 deletions(-) diff --git a/plugins/drivers/base/proto/driver.pb.go b/plugins/drivers/base/proto/driver.pb.go index e7aebfea5..ccc197c1a 100644 --- a/plugins/drivers/base/proto/driver.pb.go +++ b/plugins/drivers/base/proto/driver.pb.go @@ -7,7 +7,6 @@ import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" import duration "github.com/golang/protobuf/ptypes/duration" -import empty "github.com/golang/protobuf/ptypes/empty" import timestamp "github.com/golang/protobuf/ptypes/timestamp" import hclspec "github.com/hashicorp/nomad/plugins/shared/hclspec" @@ -50,7 +49,59 @@ func (x TaskState) String() string { return proto.EnumName(TaskState_name, int32(x)) } func (TaskState) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_driver_b26cb45d2a523f58, []int{0} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{0} +} + +type StartTaskResponse_Result int32 + +const ( + StartTaskResponse_SUCCESS StartTaskResponse_Result = 0 + StartTaskResponse_RETRY StartTaskResponse_Result = 1 + StartTaskResponse_FATAL StartTaskResponse_Result = 2 +) + +var StartTaskResponse_Result_name = map[int32]string{ + 0: "SUCCESS", + 1: "RETRY", + 2: "FATAL", +} +var StartTaskResponse_Result_value = map[string]int32{ + "SUCCESS": 0, + "RETRY": 1, + "FATAL": 2, +} + +func (x StartTaskResponse_Result) String() string { + return proto.EnumName(StartTaskResponse_Result_name, int32(x)) +} +func (StartTaskResponse_Result) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_driver_2ab92ba6a4e60071, []int{9, 0} +} + +type DriverCapabilities_FSIsolation int32 + +const ( + DriverCapabilities_NONE DriverCapabilities_FSIsolation = 0 + DriverCapabilities_CHROOT DriverCapabilities_FSIsolation = 1 + DriverCapabilities_IMAGE DriverCapabilities_FSIsolation = 2 +) + +var DriverCapabilities_FSIsolation_name = map[int32]string{ + 0: "NONE", + 1: "CHROOT", + 2: "IMAGE", +} +var DriverCapabilities_FSIsolation_value = map[string]int32{ + "NONE": 0, + "CHROOT": 1, + "IMAGE": 2, +} + +func (x DriverCapabilities_FSIsolation) String() string { + return proto.EnumName(DriverCapabilities_FSIsolation_name, int32(x)) +} +func (DriverCapabilities_FSIsolation) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_driver_2ab92ba6a4e60071, []int{27, 0} } type CPUUsage_Fields int32 @@ -85,7 +136,7 @@ func (x CPUUsage_Fields) String() string { return proto.EnumName(CPUUsage_Fields_name, int32(x)) } func (CPUUsage_Fields) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_driver_b26cb45d2a523f58, []int{27, 0} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{43, 0} } type MemoryUsage_Fields int32 @@ -117,23 +168,190 @@ func (x MemoryUsage_Fields) String() string { return proto.EnumName(MemoryUsage_Fields_name, int32(x)) } func (MemoryUsage_Fields) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_driver_b26cb45d2a523f58, []int{28, 0} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{44, 0} } -type FingerprintResponse struct { +type DriverTaskConfigSchemaRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DriverTaskConfigSchemaRequest) Reset() { *m = DriverTaskConfigSchemaRequest{} } +func (m *DriverTaskConfigSchemaRequest) String() string { return proto.CompactTextString(m) } +func (*DriverTaskConfigSchemaRequest) ProtoMessage() {} +func (*DriverTaskConfigSchemaRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_2ab92ba6a4e60071, []int{0} +} +func (m *DriverTaskConfigSchemaRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DriverTaskConfigSchemaRequest.Unmarshal(m, b) +} +func (m *DriverTaskConfigSchemaRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DriverTaskConfigSchemaRequest.Marshal(b, m, deterministic) +} +func (dst *DriverTaskConfigSchemaRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DriverTaskConfigSchemaRequest.Merge(dst, src) +} +func (m *DriverTaskConfigSchemaRequest) XXX_Size() int { + return xxx_messageInfo_DriverTaskConfigSchemaRequest.Size(m) +} +func (m *DriverTaskConfigSchemaRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DriverTaskConfigSchemaRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DriverTaskConfigSchemaRequest proto.InternalMessageInfo + +type DriverTaskConfigSchemaResponse struct { // Spec is the configuration schema for the job driver config stanza - Spec *hclspec.Spec `protobuf:"bytes,1,opt,name=spec,proto3" json:"spec,omitempty"` + Spec *hclspec.Spec `protobuf:"bytes,1,opt,name=spec,proto3" json:"spec,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DriverTaskConfigSchemaResponse) Reset() { *m = DriverTaskConfigSchemaResponse{} } +func (m *DriverTaskConfigSchemaResponse) String() string { return proto.CompactTextString(m) } +func (*DriverTaskConfigSchemaResponse) ProtoMessage() {} +func (*DriverTaskConfigSchemaResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_2ab92ba6a4e60071, []int{1} +} +func (m *DriverTaskConfigSchemaResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DriverTaskConfigSchemaResponse.Unmarshal(m, b) +} +func (m *DriverTaskConfigSchemaResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DriverTaskConfigSchemaResponse.Marshal(b, m, deterministic) +} +func (dst *DriverTaskConfigSchemaResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DriverTaskConfigSchemaResponse.Merge(dst, src) +} +func (m *DriverTaskConfigSchemaResponse) XXX_Size() int { + return xxx_messageInfo_DriverTaskConfigSchemaResponse.Size(m) +} +func (m *DriverTaskConfigSchemaResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DriverTaskConfigSchemaResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_DriverTaskConfigSchemaResponse proto.InternalMessageInfo + +func (m *DriverTaskConfigSchemaResponse) GetSpec() *hclspec.Spec { + if m != nil { + return m.Spec + } + return nil +} + +type CapabilitiesRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2ab92ba6a4e60071, []int{2} +} +func (m *CapabilitiesRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CapabilitiesRequest.Unmarshal(m, b) +} +func (m *CapabilitiesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CapabilitiesRequest.Marshal(b, m, deterministic) +} +func (dst *CapabilitiesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CapabilitiesRequest.Merge(dst, src) +} +func (m *CapabilitiesRequest) XXX_Size() int { + return xxx_messageInfo_CapabilitiesRequest.Size(m) +} +func (m *CapabilitiesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CapabilitiesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_CapabilitiesRequest proto.InternalMessageInfo + +type CapabilitiesResponse struct { // Capabilities provides a way for the driver to denote if it implements // non-core RPCs. Some Driver service RPCs expose additional information // or functionality outside of the core task management functions. These // RPCs are only implemented if the driver sets the corresponding capability. - Capabilities *DriverCapabilities `protobuf:"bytes,2,opt,name=capabilities,proto3" json:"capabilities,omitempty"` + Capabilities *DriverCapabilities `protobuf:"bytes,1,opt,name=capabilities,proto3" json:"capabilities,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2ab92ba6a4e60071, []int{3} +} +func (m *CapabilitiesResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CapabilitiesResponse.Unmarshal(m, b) +} +func (m *CapabilitiesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CapabilitiesResponse.Marshal(b, m, deterministic) +} +func (dst *CapabilitiesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CapabilitiesResponse.Merge(dst, src) +} +func (m *CapabilitiesResponse) XXX_Size() int { + return xxx_messageInfo_CapabilitiesResponse.Size(m) +} +func (m *CapabilitiesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_CapabilitiesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_CapabilitiesResponse proto.InternalMessageInfo + +func (m *CapabilitiesResponse) GetCapabilities() *DriverCapabilities { + if m != nil { + return m.Capabilities + } + return nil +} + +type FingerprintRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2ab92ba6a4e60071, []int{4} +} +func (m *FingerprintRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FingerprintRequest.Unmarshal(m, b) +} +func (m *FingerprintRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FingerprintRequest.Marshal(b, m, deterministic) +} +func (dst *FingerprintRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_FingerprintRequest.Merge(dst, src) +} +func (m *FingerprintRequest) XXX_Size() int { + return xxx_messageInfo_FingerprintRequest.Size(m) +} +func (m *FingerprintRequest) XXX_DiscardUnknown() { + xxx_messageInfo_FingerprintRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_FingerprintRequest proto.InternalMessageInfo + +type FingerprintResponse struct { // Attributes are key/value pairs that annotate the nomad client and can be // used in scheduling contraints and affinities. - Attributes map[string]string `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Attributes map[string]string `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Detected signifies if the necessary dependancies of the drive are met for // nominal operation. - Detected bool `protobuf:"varint,4,opt,name=detected,proto3" json:"detected,omitempty"` + Detected bool `protobuf:"varint,2,opt,name=detected,proto3" json:"detected,omitempty"` + // Healthy is true if the driver is able to make changes to a task's state + // ex. Start/Stop + Healthy bool `protobuf:"varint,3,opt,name=healthy,proto3" json:"healthy,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -143,7 +361,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_b26cb45d2a523f58, []int{0} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{5} } func (m *FingerprintResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FingerprintResponse.Unmarshal(m, b) @@ -163,20 +381,6 @@ func (m *FingerprintResponse) XXX_DiscardUnknown() { var xxx_messageInfo_FingerprintResponse proto.InternalMessageInfo -func (m *FingerprintResponse) GetSpec() *hclspec.Spec { - if m != nil { - return m.Spec - } - return nil -} - -func (m *FingerprintResponse) GetCapabilities() *DriverCapabilities { - if m != nil { - return m.Capabilities - } - return nil -} - func (m *FingerprintResponse) GetAttributes() map[string]string { if m != nil { return m.Attributes @@ -191,6 +395,13 @@ func (m *FingerprintResponse) GetDetected() bool { return false } +func (m *FingerprintResponse) GetHealthy() bool { + if m != nil { + return m.Healthy + } + return false +} + type RecoverTaskRequest 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"` @@ -205,7 +416,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_b26cb45d2a523f58, []int{1} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{6} } func (m *RecoverTaskRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RecoverTaskRequest.Unmarshal(m, b) @@ -239,19 +450,52 @@ func (m *RecoverTaskRequest) GetHandle() *TaskHandle { return nil } +type RecoverTaskResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2ab92ba6a4e60071, []int{7} +} +func (m *RecoverTaskResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RecoverTaskResponse.Unmarshal(m, b) +} +func (m *RecoverTaskResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RecoverTaskResponse.Marshal(b, m, deterministic) +} +func (dst *RecoverTaskResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RecoverTaskResponse.Merge(dst, src) +} +func (m *RecoverTaskResponse) XXX_Size() int { + return xxx_messageInfo_RecoverTaskResponse.Size(m) +} +func (m *RecoverTaskResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RecoverTaskResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_RecoverTaskResponse proto.InternalMessageInfo + type StartTaskRequest struct { // Task configuration to launch - Task *TaskConfig `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Task *TaskConfig `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` + // NetworkOverride is set if the driver sets network settings and the service ip/port + // needs to be set differently. + NetworkOverride *NetworkOverride `protobuf:"bytes,2,opt,name=network_override,json=networkOverride,proto3" json:"network_override,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } 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_b26cb45d2a523f58, []int{2} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{8} } func (m *StartTaskRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_StartTaskRequest.Unmarshal(m, b) @@ -278,20 +522,38 @@ func (m *StartTaskRequest) GetTask() *TaskConfig { return nil } +func (m *StartTaskRequest) GetNetworkOverride() *NetworkOverride { + if m != nil { + return m.NetworkOverride + } + return nil +} + type StartTaskResponse struct { + // Result is set depending on the type of error that occured while starting + // a task: + // + // * SUCCESS: No error occured, handle is set + // * RETRY: An error occured, but is recoverable and the RPC should be retried + // * FATAL: A fatal error occured 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"` // Handle is opague to the client, but must be stored in order to potentially // recover the task. - Handle *TaskHandle `protobuf:"bytes,1,opt,name=handle,proto3" json:"handle,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Handle *TaskHandle `protobuf:"bytes,2,opt,name=handle,proto3" json:"handle,omitempty"` + // DriverErrorMsg is set if an error occured + DriverErrorMsg string `protobuf:"bytes,3,opt,name=driver_error_msg,json=driverErrorMsg,proto3" json:"driver_error_msg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } 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_b26cb45d2a523f58, []int{3} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{9} } func (m *StartTaskResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_StartTaskResponse.Unmarshal(m, b) @@ -311,6 +573,13 @@ func (m *StartTaskResponse) XXX_DiscardUnknown() { var xxx_messageInfo_StartTaskResponse proto.InternalMessageInfo +func (m *StartTaskResponse) GetResult() StartTaskResponse_Result { + if m != nil { + return m.Result + } + return StartTaskResponse_SUCCESS +} + func (m *StartTaskResponse) GetHandle() *TaskHandle { if m != nil { return m.Handle @@ -318,6 +587,13 @@ func (m *StartTaskResponse) GetHandle() *TaskHandle { return nil } +func (m *StartTaskResponse) GetDriverErrorMsg() string { + if m != nil { + return m.DriverErrorMsg + } + return "" +} + type WaitTaskRequest 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"` @@ -330,7 +606,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_b26cb45d2a523f58, []int{4} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{10} } func (m *WaitTaskRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_WaitTaskRequest.Unmarshal(m, b) @@ -358,12 +634,10 @@ func (m *WaitTaskRequest) GetTaskId() string { } type WaitTaskResponse struct { - // ExitCode returned from the task on exit - ExitCode int32 `protobuf:"varint,1,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"` - // Signal is set if a signal was sent to the task - Signal int32 `protobuf:"varint,2,opt,name=signal,proto3" json:"signal,omitempty"` + // Result is the exit status of the task + Result *ExitResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` // Err is set if any driver error occured while waiting for the task - Err string `protobuf:"bytes,3,opt,name=err,proto3" json:"err,omitempty"` + Err string `protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -373,7 +647,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_b26cb45d2a523f58, []int{5} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{11} } func (m *WaitTaskResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_WaitTaskResponse.Unmarshal(m, b) @@ -393,18 +667,11 @@ func (m *WaitTaskResponse) XXX_DiscardUnknown() { var xxx_messageInfo_WaitTaskResponse proto.InternalMessageInfo -func (m *WaitTaskResponse) GetExitCode() int32 { +func (m *WaitTaskResponse) GetResult() *ExitResult { if m != nil { - return m.ExitCode + return m.Result } - return 0 -} - -func (m *WaitTaskResponse) GetSignal() int32 { - if m != nil { - return m.Signal - } - return 0 + return nil } func (m *WaitTaskResponse) GetErr() string { @@ -432,7 +699,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_b26cb45d2a523f58, []int{6} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{12} } func (m *StopTaskRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_StopTaskRequest.Unmarshal(m, b) @@ -473,6 +740,36 @@ func (m *StopTaskRequest) GetSignal() string { return "" } +type StopTaskResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2ab92ba6a4e60071, []int{13} +} +func (m *StopTaskResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StopTaskResponse.Unmarshal(m, b) +} +func (m *StopTaskResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StopTaskResponse.Marshal(b, m, deterministic) +} +func (dst *StopTaskResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_StopTaskResponse.Merge(dst, src) +} +func (m *StopTaskResponse) XXX_Size() int { + return xxx_messageInfo_StopTaskResponse.Size(m) +} +func (m *StopTaskResponse) XXX_DiscardUnknown() { + xxx_messageInfo_StopTaskResponse.DiscardUnknown(m) +} + +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"` @@ -485,7 +782,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_b26cb45d2a523f58, []int{7} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{14} } func (m *DestroyTaskRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DestroyTaskRequest.Unmarshal(m, b) @@ -512,6 +809,36 @@ func (m *DestroyTaskRequest) GetTaskId() string { return "" } +type DestroyTaskResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2ab92ba6a4e60071, []int{15} +} +func (m *DestroyTaskResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DestroyTaskResponse.Unmarshal(m, b) +} +func (m *DestroyTaskResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DestroyTaskResponse.Marshal(b, m, deterministic) +} +func (dst *DestroyTaskResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DestroyTaskResponse.Merge(dst, src) +} +func (m *DestroyTaskResponse) XXX_Size() int { + return xxx_messageInfo_DestroyTaskResponse.Size(m) +} +func (m *DestroyTaskResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DestroyTaskResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_DestroyTaskResponse proto.InternalMessageInfo + type ListTasksRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -522,7 +849,7 @@ 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_b26cb45d2a523f58, []int{8} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{16} } func (m *ListTasksRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListTasksRequest.Unmarshal(m, b) @@ -544,17 +871,17 @@ var xxx_messageInfo_ListTasksRequest proto.InternalMessageInfo type ListTasksResponse struct { // Tasks includes a list of summary information for each task - Tasks []*TaskSummary `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + 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_b26cb45d2a523f58, []int{9} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{17} } func (m *ListTasksResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListTasksResponse.Unmarshal(m, b) @@ -574,7 +901,7 @@ func (m *ListTasksResponse) XXX_DiscardUnknown() { var xxx_messageInfo_ListTasksResponse proto.InternalMessageInfo -func (m *ListTasksResponse) GetTasks() []*TaskSummary { +func (m *ListTasksResponse) GetTasks() []*TaskStatus { if m != nil { return m.Tasks } @@ -593,7 +920,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_b26cb45d2a523f58, []int{10} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{18} } func (m *InspectTaskRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InspectTaskRequest.Unmarshal(m, b) @@ -622,17 +949,21 @@ func (m *InspectTaskRequest) GetTaskId() string { type InspectTaskResponse struct { // Task details - Task *TaskStatus `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Task *TaskStatus `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` + // Driver details for task + Driver *TaskDriverStatus `protobuf:"bytes,2,opt,name=driver,proto3" json:"driver,omitempty"` + // NetworkOverride info if set + NetworkOverride *NetworkOverride `protobuf:"bytes,3,opt,name=network_override,json=networkOverride,proto3" json:"network_override,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } 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_b26cb45d2a523f58, []int{11} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{19} } func (m *InspectTaskResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InspectTaskResponse.Unmarshal(m, b) @@ -659,6 +990,20 @@ func (m *InspectTaskResponse) GetTask() *TaskStatus { return nil } +func (m *InspectTaskResponse) GetDriver() *TaskDriverStatus { + if m != nil { + return m.Driver + } + return nil +} + +func (m *InspectTaskResponse) GetNetworkOverride() *NetworkOverride { + if m != nil { + return m.NetworkOverride + } + return nil +} + type TaskStatsRequest 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"` @@ -671,7 +1016,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_b26cb45d2a523f58, []int{12} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{20} } func (m *TaskStatsRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TaskStatsRequest.Unmarshal(m, b) @@ -710,7 +1055,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_b26cb45d2a523f58, []int{13} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{21} } func (m *TaskStatsResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TaskStatsResponse.Unmarshal(m, b) @@ -737,6 +1082,36 @@ func (m *TaskStatsResponse) GetStats() *TaskStats { return nil } +type TaskEventsRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2ab92ba6a4e60071, []int{22} +} +func (m *TaskEventsRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TaskEventsRequest.Unmarshal(m, b) +} +func (m *TaskEventsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TaskEventsRequest.Marshal(b, m, deterministic) +} +func (dst *TaskEventsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_TaskEventsRequest.Merge(dst, src) +} +func (m *TaskEventsRequest) XXX_Size() int { + return xxx_messageInfo_TaskEventsRequest.Size(m) +} +func (m *TaskEventsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_TaskEventsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_TaskEventsRequest proto.InternalMessageInfo + type SignalTaskRequest 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"` @@ -751,7 +1126,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_b26cb45d2a523f58, []int{14} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{23} } func (m *SignalTaskRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignalTaskRequest.Unmarshal(m, b) @@ -785,6 +1160,36 @@ func (m *SignalTaskRequest) GetSignal() string { return "" } +type SignalTaskResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2ab92ba6a4e60071, []int{24} +} +func (m *SignalTaskResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SignalTaskResponse.Unmarshal(m, b) +} +func (m *SignalTaskResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SignalTaskResponse.Marshal(b, m, deterministic) +} +func (dst *SignalTaskResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignalTaskResponse.Merge(dst, src) +} +func (m *SignalTaskResponse) XXX_Size() int { + return xxx_messageInfo_SignalTaskResponse.Size(m) +} +func (m *SignalTaskResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SignalTaskResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SignalTaskResponse proto.InternalMessageInfo + type ExecTaskRequest 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"` @@ -802,7 +1207,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_b26cb45d2a523f58, []int{15} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{25} } func (m *ExecTaskRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ExecTaskRequest.Unmarshal(m, b) @@ -844,16 +1249,22 @@ func (m *ExecTaskRequest) GetTimeout() *duration.Duration { } type ExecTaskResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // Stdout from the exec + Stdout []byte `protobuf:"bytes,1,opt,name=stdout,proto3" json:"stdout,omitempty"` + // Stderr from the exec + Stderr []byte `protobuf:"bytes,2,opt,name=stderr,proto3" json:"stderr,omitempty"` + // Result from the exec + Result *ExitResult `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } 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_b26cb45d2a523f58, []int{16} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{26} } func (m *ExecTaskResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ExecTaskResponse.Unmarshal(m, b) @@ -873,23 +1284,46 @@ func (m *ExecTaskResponse) XXX_DiscardUnknown() { var xxx_messageInfo_ExecTaskResponse proto.InternalMessageInfo +func (m *ExecTaskResponse) GetStdout() []byte { + if m != nil { + return m.Stdout + } + return nil +} + +func (m *ExecTaskResponse) GetStderr() []byte { + if m != nil { + return m.Stderr + } + return nil +} + +func (m *ExecTaskResponse) GetResult() *ExitResult { + if m != nil { + return m.Result + } + return nil +} + type DriverCapabilities struct { // SendSignals indicates that the driver can send process signals (ex. SIGUSR1) // to the task. SendSignals bool `protobuf:"varint,1,opt,name=send_signals,json=sendSignals,proto3" json:"send_signals,omitempty"` // Exec indicates that the driver supports executing arbitrary commands // in the task's execution environment. - Exec bool `protobuf:"varint,2,opt,name=exec,proto3" json:"exec,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + 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"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } 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_b26cb45d2a523f58, []int{17} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{27} } func (m *DriverCapabilities) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DriverCapabilities.Unmarshal(m, b) @@ -923,9 +1357,15 @@ func (m *DriverCapabilities) GetExec() bool { return false } +func (m *DriverCapabilities) GetFsIsolation() DriverCapabilities_FSIsolation { + if m != nil { + return m.FsIsolation + } + return DriverCapabilities_NONE +} + type TaskConfig struct { // Id of the task, recommended to the globally unique, must be unique to the driver. - // If not set, a UUID is to be generated. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Name of the task Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` @@ -954,7 +1394,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_b26cb45d2a523f58, []int{18} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{28} } func (m *TaskConfig) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TaskConfig.Unmarshal(m, b) @@ -1038,30 +1478,20 @@ func (m *TaskConfig) GetAllocDir() string { } type Resources struct { - // CPU CFS (Completely Fair Scheduler) period. Default: 0 (not specified) - CpuPeriod int64 `protobuf:"varint,1,opt,name=cpu_period,json=cpuPeriod,proto3" json:"cpu_period,omitempty"` - // CPU CFS (Completely Fair Scheduler) quota. Default: 0 (not specified) - CpuQuota int64 `protobuf:"varint,2,opt,name=cpu_quota,json=cpuQuota,proto3" json:"cpu_quota,omitempty"` - // CPU shares (relative weight vs. other containers). Default: 0 (not specified) - CpuShares int64 `protobuf:"varint,3,opt,name=cpu_shares,json=cpuShares,proto3" json:"cpu_shares,omitempty"` - // Memory limit in bytes. Default: 0 (not specified) - MemoryLimitInBytes int64 `protobuf:"varint,4,opt,name=memory_limit_in_bytes,json=memoryLimitInBytes,proto3" json:"memory_limit_in_bytes,omitempty"` - // OOMScoreAdj adjusts the oom-killer score. Default: 0 (not specified) - OomScoreAdj int64 `protobuf:"varint,5,opt,name=oom_score_adj,json=oomScoreAdj,proto3" json:"oom_score_adj,omitempty"` - // CpusetCpus constrains the allowed set of logical CPUs. Default: "" (not specified) - CpusetCpus string `protobuf:"bytes,6,opt,name=cpuset_cpus,json=cpusetCpus,proto3" json:"cpuset_cpus,omitempty"` - // CpusetMems constrains the allowed set of memory nodes. Default: "" (not specified) - CpusetMems string `protobuf:"bytes,7,opt,name=cpuset_mems,json=cpusetMems,proto3" json:"cpuset_mems,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // RawResources are the resources set for the task + RawResources *RawResources `protobuf:"bytes,1,opt,name=raw_resources,json=rawResources,proto3" json:"raw_resources,omitempty"` + // LinuxResources are the computed values to set for specific Linux features + LinuxResources *LinuxResources `protobuf:"bytes,2,opt,name=linux_resources,json=linuxResources,proto3" json:"linux_resources,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } 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_b26cb45d2a523f58, []int{19} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{29} } func (m *Resources) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Resources.Unmarshal(m, b) @@ -1081,49 +1511,301 @@ func (m *Resources) XXX_DiscardUnknown() { var xxx_messageInfo_Resources proto.InternalMessageInfo -func (m *Resources) GetCpuPeriod() int64 { +func (m *Resources) GetRawResources() *RawResources { + if m != nil { + return m.RawResources + } + return nil +} + +func (m *Resources) GetLinuxResources() *LinuxResources { + if m != nil { + return m.LinuxResources + } + return nil +} + +type RawResources struct { + Cpu int64 `protobuf:"varint,1,opt,name=cpu,proto3" json:"cpu,omitempty"` + Memory int64 `protobuf:"varint,2,opt,name=memory,proto3" json:"memory,omitempty"` + Disk int64 `protobuf:"varint,3,opt,name=disk,proto3" json:"disk,omitempty"` + Iops int64 `protobuf:"varint,4,opt,name=iops,proto3" json:"iops,omitempty"` + Networks []*NetworkResource `protobuf:"bytes,5,rep,name=networks,proto3" json:"networks,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2ab92ba6a4e60071, []int{30} +} +func (m *RawResources) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RawResources.Unmarshal(m, b) +} +func (m *RawResources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RawResources.Marshal(b, m, deterministic) +} +func (dst *RawResources) XXX_Merge(src proto.Message) { + xxx_messageInfo_RawResources.Merge(dst, src) +} +func (m *RawResources) XXX_Size() int { + return xxx_messageInfo_RawResources.Size(m) +} +func (m *RawResources) XXX_DiscardUnknown() { + xxx_messageInfo_RawResources.DiscardUnknown(m) +} + +var xxx_messageInfo_RawResources proto.InternalMessageInfo + +func (m *RawResources) GetCpu() int64 { + if m != nil { + return m.Cpu + } + return 0 +} + +func (m *RawResources) GetMemory() int64 { + if m != nil { + return m.Memory + } + return 0 +} + +func (m *RawResources) GetDisk() int64 { + if m != nil { + return m.Disk + } + return 0 +} + +func (m *RawResources) GetIops() int64 { + if m != nil { + return m.Iops + } + return 0 +} + +func (m *RawResources) GetNetworks() []*NetworkResource { + if m != nil { + return m.Networks + } + return nil +} + +type NetworkResource struct { + Device string `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"` + Cidr string `protobuf:"bytes,2,opt,name=cidr,proto3" json:"cidr,omitempty"` + Ip string `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"` + Mbits int32 `protobuf:"varint,4,opt,name=mbits,proto3" json:"mbits,omitempty"` + ReservedPorts []*NetworkPort `protobuf:"bytes,5,rep,name=reserved_ports,json=reservedPorts,proto3" json:"reserved_ports,omitempty"` + DynamicPorts []*NetworkPort `protobuf:"bytes,6,rep,name=dynamic_ports,json=dynamicPorts,proto3" json:"dynamic_ports,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2ab92ba6a4e60071, []int{31} +} +func (m *NetworkResource) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NetworkResource.Unmarshal(m, b) +} +func (m *NetworkResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NetworkResource.Marshal(b, m, deterministic) +} +func (dst *NetworkResource) XXX_Merge(src proto.Message) { + xxx_messageInfo_NetworkResource.Merge(dst, src) +} +func (m *NetworkResource) XXX_Size() int { + return xxx_messageInfo_NetworkResource.Size(m) +} +func (m *NetworkResource) XXX_DiscardUnknown() { + xxx_messageInfo_NetworkResource.DiscardUnknown(m) +} + +var xxx_messageInfo_NetworkResource proto.InternalMessageInfo + +func (m *NetworkResource) GetDevice() string { + if m != nil { + return m.Device + } + return "" +} + +func (m *NetworkResource) GetCidr() string { + if m != nil { + return m.Cidr + } + return "" +} + +func (m *NetworkResource) GetIp() string { + if m != nil { + return m.Ip + } + return "" +} + +func (m *NetworkResource) GetMbits() int32 { + if m != nil { + return m.Mbits + } + return 0 +} + +func (m *NetworkResource) GetReservedPorts() []*NetworkPort { + if m != nil { + return m.ReservedPorts + } + return nil +} + +func (m *NetworkResource) GetDynamicPorts() []*NetworkPort { + if m != nil { + return m.DynamicPorts + } + return nil +} + +type NetworkPort struct { + Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"` + Value int32 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2ab92ba6a4e60071, []int{32} +} +func (m *NetworkPort) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NetworkPort.Unmarshal(m, b) +} +func (m *NetworkPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NetworkPort.Marshal(b, m, deterministic) +} +func (dst *NetworkPort) XXX_Merge(src proto.Message) { + xxx_messageInfo_NetworkPort.Merge(dst, src) +} +func (m *NetworkPort) XXX_Size() int { + return xxx_messageInfo_NetworkPort.Size(m) +} +func (m *NetworkPort) XXX_DiscardUnknown() { + xxx_messageInfo_NetworkPort.DiscardUnknown(m) +} + +var xxx_messageInfo_NetworkPort proto.InternalMessageInfo + +func (m *NetworkPort) GetLabel() string { + if m != nil { + return m.Label + } + return "" +} + +func (m *NetworkPort) GetValue() int32 { + if m != nil { + return m.Value + } + return 0 +} + +type LinuxResources struct { + // CPU CFS (Completely Fair Scheduler) period. Default: 0 (not specified) + CpuPeriod int64 `protobuf:"varint,1,opt,name=cpu_period,json=cpuPeriod,proto3" json:"cpu_period,omitempty"` + // CPU CFS (Completely Fair Scheduler) quota. Default: 0 (not specified) + CpuQuota int64 `protobuf:"varint,2,opt,name=cpu_quota,json=cpuQuota,proto3" json:"cpu_quota,omitempty"` + // CPU shares (relative weight vs. other containers). Default: 0 (not specified) + CpuShares int64 `protobuf:"varint,3,opt,name=cpu_shares,json=cpuShares,proto3" json:"cpu_shares,omitempty"` + // Memory limit in bytes. Default: 0 (not specified) + MemoryLimitInBytes int64 `protobuf:"varint,4,opt,name=memory_limit_in_bytes,json=memoryLimitInBytes,proto3" json:"memory_limit_in_bytes,omitempty"` + // OOMScoreAdj adjusts the oom-killer score. Default: 0 (not specified) + OomScoreAdj int64 `protobuf:"varint,5,opt,name=oom_score_adj,json=oomScoreAdj,proto3" json:"oom_score_adj,omitempty"` + // CpusetCpus constrains the allowed set of logical CPUs. Default: "" (not specified) + CpusetCpus string `protobuf:"bytes,6,opt,name=cpuset_cpus,json=cpusetCpus,proto3" json:"cpuset_cpus,omitempty"` + // CpusetMems constrains the allowed set of memory nodes. Default: "" (not specified) + CpusetMems string `protobuf:"bytes,7,opt,name=cpuset_mems,json=cpusetMems,proto3" json:"cpuset_mems,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2ab92ba6a4e60071, []int{33} +} +func (m *LinuxResources) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LinuxResources.Unmarshal(m, b) +} +func (m *LinuxResources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LinuxResources.Marshal(b, m, deterministic) +} +func (dst *LinuxResources) XXX_Merge(src proto.Message) { + xxx_messageInfo_LinuxResources.Merge(dst, src) +} +func (m *LinuxResources) XXX_Size() int { + return xxx_messageInfo_LinuxResources.Size(m) +} +func (m *LinuxResources) XXX_DiscardUnknown() { + xxx_messageInfo_LinuxResources.DiscardUnknown(m) +} + +var xxx_messageInfo_LinuxResources proto.InternalMessageInfo + +func (m *LinuxResources) GetCpuPeriod() int64 { if m != nil { return m.CpuPeriod } return 0 } -func (m *Resources) GetCpuQuota() int64 { +func (m *LinuxResources) GetCpuQuota() int64 { if m != nil { return m.CpuQuota } return 0 } -func (m *Resources) GetCpuShares() int64 { +func (m *LinuxResources) GetCpuShares() int64 { if m != nil { return m.CpuShares } return 0 } -func (m *Resources) GetMemoryLimitInBytes() int64 { +func (m *LinuxResources) GetMemoryLimitInBytes() int64 { if m != nil { return m.MemoryLimitInBytes } return 0 } -func (m *Resources) GetOomScoreAdj() int64 { +func (m *LinuxResources) GetOomScoreAdj() int64 { if m != nil { return m.OomScoreAdj } return 0 } -func (m *Resources) GetCpusetCpus() string { +func (m *LinuxResources) GetCpusetCpus() string { if m != nil { return m.CpusetCpus } return "" } -func (m *Resources) GetCpusetMems() string { +func (m *LinuxResources) GetCpusetMems() string { if m != nil { return m.CpusetMems } @@ -1146,7 +1828,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_b26cb45d2a523f58, []int{20} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{34} } func (m *Mount) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Mount.Unmarshal(m, b) @@ -1192,14 +1874,14 @@ type Device struct { TaskPath string `protobuf:"bytes,1,opt,name=task_path,json=taskPath,proto3" json:"task_path,omitempty"` // HostPath is the path on the host to the source device HostPath string `protobuf:"bytes,2,opt,name=host_path,json=hostPath,proto3" json:"host_path,omitempty"` - // Permissions defines the Cgroup permissions of the device. + // CgroupPermissions defines the Cgroup permissions of the device. // One or more of the following options can be set: // * r - allows the task to read from the specified device. // * w - allows the task to write to the specified device. // * m - allows the task to create device files that do not yet exist. // // Example: "rw" - Permissions string `protobuf:"bytes,3,opt,name=permissions,proto3" json:"permissions,omitempty"` + CgroupPermissions string `protobuf:"bytes,3,opt,name=cgroup_permissions,json=cgroupPermissions,proto3" json:"cgroup_permissions,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1209,7 +1891,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_b26cb45d2a523f58, []int{21} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{35} } func (m *Device) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Device.Unmarshal(m, b) @@ -1243,23 +1925,21 @@ func (m *Device) GetHostPath() string { return "" } -func (m *Device) GetPermissions() string { +func (m *Device) GetCgroupPermissions() string { if m != nil { - return m.Permissions + return m.CgroupPermissions } return "" } // TaskHandle is created when starting a task and is used to recover task type TaskHandle struct { - // Driver is the driver which initially created the handle - Driver string `protobuf:"bytes,1,opt,name=driver,proto3" json:"driver,omitempty"` // Config is the TaskConfig for the task - Config *TaskConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` + 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,3,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.base.proto.TaskState" json:"state,omitempty"` // DriverState is the encoded state for the specific driver - DriverState []byte `protobuf:"bytes,4,opt,name=driver_state,json=driverState,proto3" json:"driver_state,omitempty"` + DriverState []byte `protobuf:"bytes,3,opt,name=driver_state,json=driverState,proto3" json:"driver_state,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1269,7 +1949,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_b26cb45d2a523f58, []int{22} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{36} } func (m *TaskHandle) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TaskHandle.Unmarshal(m, b) @@ -1289,13 +1969,6 @@ func (m *TaskHandle) XXX_DiscardUnknown() { var xxx_messageInfo_TaskHandle proto.InternalMessageInfo -func (m *TaskHandle) GetDriver() string { - if m != nil { - return m.Driver - } - return "" -} - func (m *TaskHandle) GetConfig() *TaskConfig { if m != nil { return m.Config @@ -1317,73 +1990,125 @@ func (m *TaskHandle) GetDriverState() []byte { return nil } -// TaskSummary defines summary information of a task, typically used when listing -// many tasks at once. -type TaskSummary 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"` - // StartedAt is the timestamp when the task was started - StartedAt *timestamp.Timestamp `protobuf:"bytes,4,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +// NetworkOverride contains network settings which the driver may override +// for the task, such as when the driver is setting up the task's network. +type NetworkOverride struct { + // PortMap can be set to replace ports with driver-specific mappings + PortMap map[string]int32 `protobuf:"bytes,1,rep,name=port_map,json=portMap,proto3" json:"port_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + // Addr is the IP address for the task created by the driver + Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"` + // AutoAdvertise indicates whether the driver thinks services that choose + // to auto_advertise_addresses should use this IP instead of the host's. + AutoAdvertise bool `protobuf:"varint,3,opt,name=auto_advertise,json=autoAdvertise,proto3" json:"auto_advertise,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *TaskSummary) Reset() { *m = TaskSummary{} } -func (m *TaskSummary) String() string { return proto.CompactTextString(m) } -func (*TaskSummary) ProtoMessage() {} -func (*TaskSummary) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_b26cb45d2a523f58, []int{23} +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_2ab92ba6a4e60071, []int{37} } -func (m *TaskSummary) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TaskSummary.Unmarshal(m, b) +func (m *NetworkOverride) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NetworkOverride.Unmarshal(m, b) } -func (m *TaskSummary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TaskSummary.Marshal(b, m, deterministic) +func (m *NetworkOverride) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NetworkOverride.Marshal(b, m, deterministic) } -func (dst *TaskSummary) XXX_Merge(src proto.Message) { - xxx_messageInfo_TaskSummary.Merge(dst, src) +func (dst *NetworkOverride) XXX_Merge(src proto.Message) { + xxx_messageInfo_NetworkOverride.Merge(dst, src) } -func (m *TaskSummary) XXX_Size() int { - return xxx_messageInfo_TaskSummary.Size(m) +func (m *NetworkOverride) XXX_Size() int { + return xxx_messageInfo_NetworkOverride.Size(m) } -func (m *TaskSummary) XXX_DiscardUnknown() { - xxx_messageInfo_TaskSummary.DiscardUnknown(m) +func (m *NetworkOverride) XXX_DiscardUnknown() { + xxx_messageInfo_NetworkOverride.DiscardUnknown(m) } -var xxx_messageInfo_TaskSummary proto.InternalMessageInfo +var xxx_messageInfo_NetworkOverride proto.InternalMessageInfo -func (m *TaskSummary) GetId() string { +func (m *NetworkOverride) GetPortMap() map[string]int32 { if m != nil { - return m.Id - } - return "" -} - -func (m *TaskSummary) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *TaskSummary) GetState() TaskState { - if m != nil { - return m.State - } - return TaskState_UNKNOWN -} - -func (m *TaskSummary) GetStartedAt() *timestamp.Timestamp { - if m != nil { - return m.StartedAt + return m.PortMap } return nil } -// TaskStatus includes detailed information of a specific task +func (m *NetworkOverride) GetAddr() string { + if m != nil { + return m.Addr + } + return "" +} + +func (m *NetworkOverride) GetAutoAdvertise() bool { + if m != nil { + return m.AutoAdvertise + } + return false +} + +// ExitResult contains information about the exit status of a task +type ExitResult struct { + // ExitCode returned from the task on exit + ExitCode int32 `protobuf:"varint,1,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"` + // Signal is set if a signal was sent to the task + Signal int32 `protobuf:"varint,2,opt,name=signal,proto3" json:"signal,omitempty"` + // OomKilled is true if the task exited as a result of the OOM Killer + OomKilled bool `protobuf:"varint,3,opt,name=oom_killed,json=oomKilled,proto3" json:"oom_killed,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2ab92ba6a4e60071, []int{38} +} +func (m *ExitResult) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ExitResult.Unmarshal(m, b) +} +func (m *ExitResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ExitResult.Marshal(b, m, deterministic) +} +func (dst *ExitResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExitResult.Merge(dst, src) +} +func (m *ExitResult) XXX_Size() int { + return xxx_messageInfo_ExitResult.Size(m) +} +func (m *ExitResult) XXX_DiscardUnknown() { + xxx_messageInfo_ExitResult.DiscardUnknown(m) +} + +var xxx_messageInfo_ExitResult proto.InternalMessageInfo + +func (m *ExitResult) GetExitCode() int32 { + if m != nil { + return m.ExitCode + } + return 0 +} + +func (m *ExitResult) GetSignal() int32 { + if m != nil { + return m.Signal + } + return 0 +} + +func (m *ExitResult) GetOomKilled() bool { + if m != nil { + return m.OomKilled + } + return false +} + +// TaskStatus includes information of a specific task 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"` @@ -1394,21 +2119,18 @@ type TaskStatus struct { // CompletedAt is the timestamp when the task exited. // If the task is still running, CompletedAt will not be set CompletedAt *timestamp.Timestamp `protobuf:"bytes,5,opt,name=completed_at,json=completedAt,proto3" json:"completed_at,omitempty"` - // ExitCode should only be used when CompletedAt is set. - ExitCode int32 `protobuf:"varint,6,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"` - // DriverStatus is a set of string/string key value pairs specific to the - // implementing driver. - DriverStatus map[string]string `protobuf:"bytes,7,rep,name=driver_status,json=driverStatus,proto3" json:"driver_status,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // Result is set when CompletedAt is set. + Result *ExitResult `protobuf:"bytes,6,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } 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_b26cb45d2a523f58, []int{24} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{39} } func (m *TaskStatus) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TaskStatus.Unmarshal(m, b) @@ -1463,16 +2185,49 @@ func (m *TaskStatus) GetCompletedAt() *timestamp.Timestamp { return nil } -func (m *TaskStatus) GetExitCode() int32 { +func (m *TaskStatus) GetResult() *ExitResult { if m != nil { - return m.ExitCode + return m.Result } - return 0 + return nil } -func (m *TaskStatus) GetDriverStatus() map[string]string { +type TaskDriverStatus struct { + // Attributes is a set of string/string key value pairs specific to the + // implementing driver + Attributes map[string]string `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2ab92ba6a4e60071, []int{40} +} +func (m *TaskDriverStatus) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TaskDriverStatus.Unmarshal(m, b) +} +func (m *TaskDriverStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TaskDriverStatus.Marshal(b, m, deterministic) +} +func (dst *TaskDriverStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_TaskDriverStatus.Merge(dst, src) +} +func (m *TaskDriverStatus) XXX_Size() int { + return xxx_messageInfo_TaskDriverStatus.Size(m) +} +func (m *TaskDriverStatus) XXX_DiscardUnknown() { + xxx_messageInfo_TaskDriverStatus.DiscardUnknown(m) +} + +var xxx_messageInfo_TaskDriverStatus proto.InternalMessageInfo + +func (m *TaskDriverStatus) GetAttributes() map[string]string { if m != nil { - return m.DriverStatus + return m.Attributes } return nil } @@ -1495,7 +2250,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_b26cb45d2a523f58, []int{25} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{41} } func (m *TaskStats) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TaskStats.Unmarshal(m, b) @@ -1557,7 +2312,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_b26cb45d2a523f58, []int{26} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{42} } func (m *TaskResourceUsage) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TaskResourceUsage.Unmarshal(m, b) @@ -1609,7 +2364,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_b26cb45d2a523f58, []int{27} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{43} } func (m *CPUUsage) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CPUUsage.Unmarshal(m, b) @@ -1695,7 +2450,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_b26cb45d2a523f58, []int{28} + return fileDescriptor_driver_2ab92ba6a4e60071, []int{44} } func (m *MemoryUsage) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemoryUsage.Unmarshal(m, b) @@ -1757,57 +2512,66 @@ func (m *MemoryUsage) GetMeasuredFields() []MemoryUsage_Fields { return nil } -type TaskEvent struct { +type DriverTaskEvent struct { // TaskId is the id of the task for the event TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + // Timestamp when the event occured + Timestamp *timestamp.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Message is the body of the event - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` // Annotations allows for additional key/value data to be sent along with the event - Annotations map[string]string `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Annotations map[string]string `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *TaskEvent) Reset() { *m = TaskEvent{} } -func (m *TaskEvent) String() string { return proto.CompactTextString(m) } -func (*TaskEvent) ProtoMessage() {} -func (*TaskEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_driver_b26cb45d2a523f58, []int{29} +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_2ab92ba6a4e60071, []int{45} } -func (m *TaskEvent) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TaskEvent.Unmarshal(m, b) +func (m *DriverTaskEvent) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DriverTaskEvent.Unmarshal(m, b) } -func (m *TaskEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TaskEvent.Marshal(b, m, deterministic) +func (m *DriverTaskEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DriverTaskEvent.Marshal(b, m, deterministic) } -func (dst *TaskEvent) XXX_Merge(src proto.Message) { - xxx_messageInfo_TaskEvent.Merge(dst, src) +func (dst *DriverTaskEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_DriverTaskEvent.Merge(dst, src) } -func (m *TaskEvent) XXX_Size() int { - return xxx_messageInfo_TaskEvent.Size(m) +func (m *DriverTaskEvent) XXX_Size() int { + return xxx_messageInfo_DriverTaskEvent.Size(m) } -func (m *TaskEvent) XXX_DiscardUnknown() { - xxx_messageInfo_TaskEvent.DiscardUnknown(m) +func (m *DriverTaskEvent) XXX_DiscardUnknown() { + xxx_messageInfo_DriverTaskEvent.DiscardUnknown(m) } -var xxx_messageInfo_TaskEvent proto.InternalMessageInfo +var xxx_messageInfo_DriverTaskEvent proto.InternalMessageInfo -func (m *TaskEvent) GetTaskId() string { +func (m *DriverTaskEvent) GetTaskId() string { if m != nil { return m.TaskId } return "" } -func (m *TaskEvent) GetMessage() string { +func (m *DriverTaskEvent) GetTimestamp() *timestamp.Timestamp { + if m != nil { + return m.Timestamp + } + return nil +} + +func (m *DriverTaskEvent) GetMessage() string { if m != nil { return m.Message } return "" } -func (m *TaskEvent) GetAnnotations() map[string]string { +func (m *DriverTaskEvent) GetAnnotations() map[string]string { if m != nil { return m.Annotations } @@ -1815,42 +2579,61 @@ func (m *TaskEvent) GetAnnotations() map[string]string { } func init() { + proto.RegisterType((*DriverTaskConfigSchemaRequest)(nil), "hashicorp.nomad.plugins.drivers.base.proto.DriverTaskConfigSchemaRequest") + proto.RegisterType((*DriverTaskConfigSchemaResponse)(nil), "hashicorp.nomad.plugins.drivers.base.proto.DriverTaskConfigSchemaResponse") + 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((*TaskSummary)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskSummary") + 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.RegisterMapType((map[string]string)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskStatus.DriverStatusEntry") + 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((*TaskEvent)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskEvent") - proto.RegisterMapType((map[string]string)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskEvent.AnnotationsEntry") + 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.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) } @@ -1867,12 +2650,24 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type DriverClient interface { - // Fingerprint collects information about the driver including whether the - // driver is able to function in the existing environment. - Fingerprint(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*FingerprintResponse, error) + // DriverTaskConfigSchema returns the schema for parsing the driver + // configuration of a task. + DriverTaskConfigSchema(ctx context.Context, in *DriverTaskConfigSchemaRequest, opts ...grpc.CallOption) (*DriverTaskConfigSchemaResponse, error) + // Capabilities returns a set of features which the driver implements. Some + // RPCs are not possible to implement on some runtimes, this allows the + // driver to indicate if it doesn't support these RPCs and features. + Capabilities(ctx context.Context, in *CapabilitiesRequest, opts ...grpc.CallOption) (*CapabilitiesResponse, error) + // Fingerprint starts a stream which emits information about the driver + // including whether the driver healthy and able to function in the + // existing environment. + // + // The driver should immediately stream a FingerprintResponse when the RPC + // is initially called, then send any additional responses if there is a + // change in the driver's state. + Fingerprint(ctx context.Context, in *FingerprintRequest, opts ...grpc.CallOption) (Driver_FingerprintClient, error) // RecoverTask is used when a task has been started but the driver may not // know about it. Such is the case if the driver restarts or is upgraded. - RecoverTask(ctx context.Context, in *RecoverTaskRequest, opts ...grpc.CallOption) (*empty.Empty, error) + RecoverTask(ctx context.Context, in *RecoverTaskRequest, opts ...grpc.CallOption) (*RecoverTaskResponse, error) // StartTask starts and tracks the task on the implemented runtime StartTask(ctx context.Context, in *StartTaskRequest, opts ...grpc.CallOption) (*StartTaskResponse, error) // WaitTask blocks until the given task exits, returning the result of the @@ -1882,11 +2677,11 @@ type DriverClient interface { // StopTask stops a given task by sending the desired signal to the process. // If the task does not exit on its own within the given timeout, it will be // forcefully killed. - StopTask(ctx context.Context, in *StopTaskRequest, opts ...grpc.CallOption) (*empty.Empty, error) + 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. - DestroyTask(ctx context.Context, in *DestroyTaskRequest, opts ...grpc.CallOption) (*empty.Empty, error) + 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) @@ -1896,9 +2691,9 @@ type DriverClient interface { TaskStats(ctx context.Context, in *TaskStatsRequest, opts ...grpc.CallOption) (*TaskStatsResponse, error) // TaskEvents starts a streaming RPC where all task events emitted by the // driver are streamed to the caller. - TaskEvents(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (Driver_TaskEventsClient, error) + TaskEvents(ctx context.Context, in *TaskEventsRequest, opts ...grpc.CallOption) (Driver_TaskEventsClient, error) // SignalTask sends a signal to the task - SignalTask(ctx context.Context, in *SignalTaskRequest, opts ...grpc.CallOption) (*empty.Empty, error) + SignalTask(ctx context.Context, in *SignalTaskRequest, opts ...grpc.CallOption) (*SignalTaskResponse, error) // ExecTask executes a command inside the tasks execution context ExecTask(ctx context.Context, in *ExecTaskRequest, opts ...grpc.CallOption) (*ExecTaskResponse, error) } @@ -1911,17 +2706,58 @@ func NewDriverClient(cc *grpc.ClientConn) DriverClient { return &driverClient{cc} } -func (c *driverClient) Fingerprint(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*FingerprintResponse, error) { - out := new(FingerprintResponse) - err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.base.proto.Driver/Fingerprint", in, out, opts...) +func (c *driverClient) DriverTaskConfigSchema(ctx context.Context, in *DriverTaskConfigSchemaRequest, opts ...grpc.CallOption) (*DriverTaskConfigSchemaResponse, error) { + out := new(DriverTaskConfigSchemaResponse) + err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.base.proto.Driver/DriverTaskConfigSchema", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *driverClient) RecoverTask(ctx context.Context, in *RecoverTaskRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) +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...) + if err != nil { + return nil, err + } + return out, nil +} + +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...) + if err != nil { + return nil, err + } + x := &driverFingerprintClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type Driver_FingerprintClient interface { + Recv() (*FingerprintResponse, error) + grpc.ClientStream +} + +type driverFingerprintClient struct { + grpc.ClientStream +} + +func (x *driverFingerprintClient) Recv() (*FingerprintResponse, error) { + m := new(FingerprintResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +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...) if err != nil { return nil, err @@ -1947,8 +2783,8 @@ func (c *driverClient) WaitTask(ctx context.Context, in *WaitTaskRequest, opts . return out, nil } -func (c *driverClient) StopTask(ctx context.Context, in *StopTaskRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) +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...) if err != nil { return nil, err @@ -1956,8 +2792,8 @@ func (c *driverClient) StopTask(ctx context.Context, in *StopTaskRequest, opts . return out, nil } -func (c *driverClient) DestroyTask(ctx context.Context, in *DestroyTaskRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) +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 @@ -1992,8 +2828,8 @@ func (c *driverClient) TaskStats(ctx context.Context, in *TaskStatsRequest, opts return out, nil } -func (c *driverClient) TaskEvents(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (Driver_TaskEventsClient, error) { - stream, err := c.cc.NewStream(ctx, &_Driver_serviceDesc.Streams[0], "/hashicorp.nomad.plugins.drivers.base.proto.Driver/TaskEvents", 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...) if err != nil { return nil, err } @@ -2008,7 +2844,7 @@ func (c *driverClient) TaskEvents(ctx context.Context, in *empty.Empty, opts ... } type Driver_TaskEventsClient interface { - Recv() (*TaskEvent, error) + Recv() (*DriverTaskEvent, error) grpc.ClientStream } @@ -2016,16 +2852,16 @@ type driverTaskEventsClient struct { grpc.ClientStream } -func (x *driverTaskEventsClient) Recv() (*TaskEvent, error) { - m := new(TaskEvent) +func (x *driverTaskEventsClient) Recv() (*DriverTaskEvent, error) { + m := new(DriverTaskEvent) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } -func (c *driverClient) SignalTask(ctx context.Context, in *SignalTaskRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) +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...) if err != nil { return nil, err @@ -2044,12 +2880,24 @@ func (c *driverClient) ExecTask(ctx context.Context, in *ExecTaskRequest, opts . // DriverServer is the server API for Driver service. type DriverServer interface { - // Fingerprint collects information about the driver including whether the - // driver is able to function in the existing environment. - Fingerprint(context.Context, *empty.Empty) (*FingerprintResponse, error) + // DriverTaskConfigSchema returns the schema for parsing the driver + // configuration of a task. + DriverTaskConfigSchema(context.Context, *DriverTaskConfigSchemaRequest) (*DriverTaskConfigSchemaResponse, error) + // Capabilities returns a set of features which the driver implements. Some + // RPCs are not possible to implement on some runtimes, this allows the + // driver to indicate if it doesn't support these RPCs and features. + Capabilities(context.Context, *CapabilitiesRequest) (*CapabilitiesResponse, error) + // Fingerprint starts a stream which emits information about the driver + // including whether the driver healthy and able to function in the + // existing environment. + // + // The driver should immediately stream a FingerprintResponse when the RPC + // is initially called, then send any additional responses if there is a + // change in the driver's state. + Fingerprint(*FingerprintRequest, Driver_FingerprintServer) error // RecoverTask is used when a task has been started but the driver may not // know about it. Such is the case if the driver restarts or is upgraded. - RecoverTask(context.Context, *RecoverTaskRequest) (*empty.Empty, error) + RecoverTask(context.Context, *RecoverTaskRequest) (*RecoverTaskResponse, error) // StartTask starts and tracks the task on the implemented runtime StartTask(context.Context, *StartTaskRequest) (*StartTaskResponse, error) // WaitTask blocks until the given task exits, returning the result of the @@ -2059,11 +2907,11 @@ type DriverServer interface { // StopTask stops a given task by sending the desired signal to the process. // If the task does not exit on its own within the given timeout, it will be // forcefully killed. - StopTask(context.Context, *StopTaskRequest) (*empty.Empty, error) + 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. - DestroyTask(context.Context, *DestroyTaskRequest) (*empty.Empty, error) + 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) @@ -2073,9 +2921,9 @@ type DriverServer interface { TaskStats(context.Context, *TaskStatsRequest) (*TaskStatsResponse, error) // TaskEvents starts a streaming RPC where all task events emitted by the // driver are streamed to the caller. - TaskEvents(*empty.Empty, Driver_TaskEventsServer) error + TaskEvents(*TaskEventsRequest, Driver_TaskEventsServer) error // SignalTask sends a signal to the task - SignalTask(context.Context, *SignalTaskRequest) (*empty.Empty, error) + SignalTask(context.Context, *SignalTaskRequest) (*SignalTaskResponse, error) // ExecTask executes a command inside the tasks execution context ExecTask(context.Context, *ExecTaskRequest) (*ExecTaskResponse, error) } @@ -2084,24 +2932,63 @@ func RegisterDriverServer(s *grpc.Server, srv DriverServer) { s.RegisterService(&_Driver_serviceDesc, srv) } -func _Driver_Fingerprint_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(empty.Empty) +func _Driver_DriverTaskConfigSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DriverTaskConfigSchemaRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(DriverServer).Fingerprint(ctx, in) + return srv.(DriverServer).DriverTaskConfigSchema(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/hashicorp.nomad.plugins.drivers.base.proto.Driver/Fingerprint", + FullMethod: "/hashicorp.nomad.plugins.drivers.base.proto.Driver/DriverTaskConfigSchema", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DriverServer).Fingerprint(ctx, req.(*empty.Empty)) + return srv.(DriverServer).DriverTaskConfigSchema(ctx, req.(*DriverTaskConfigSchemaRequest)) } return interceptor(ctx, in, info, handler) } +func _Driver_Capabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CapabilitiesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DriverServer).Capabilities(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/hashicorp.nomad.plugins.drivers.base.proto.Driver/Capabilities", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DriverServer).Capabilities(ctx, req.(*CapabilitiesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Driver_Fingerprint_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(FingerprintRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(DriverServer).Fingerprint(m, &driverFingerprintServer{stream}) +} + +type Driver_FingerprintServer interface { + Send(*FingerprintResponse) error + grpc.ServerStream +} + +type driverFingerprintServer struct { + grpc.ServerStream +} + +func (x *driverFingerprintServer) Send(m *FingerprintResponse) error { + return x.ServerStream.SendMsg(m) +} + func _Driver_RecoverTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RecoverTaskRequest) if err := dec(in); err != nil { @@ -2247,7 +3134,7 @@ func _Driver_TaskStats_Handler(srv interface{}, ctx context.Context, dec func(in } func _Driver_TaskEvents_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(empty.Empty) + m := new(TaskEventsRequest) if err := stream.RecvMsg(m); err != nil { return err } @@ -2255,7 +3142,7 @@ func _Driver_TaskEvents_Handler(srv interface{}, stream grpc.ServerStream) error } type Driver_TaskEventsServer interface { - Send(*TaskEvent) error + Send(*DriverTaskEvent) error grpc.ServerStream } @@ -2263,7 +3150,7 @@ type driverTaskEventsServer struct { grpc.ServerStream } -func (x *driverTaskEventsServer) Send(m *TaskEvent) error { +func (x *driverTaskEventsServer) Send(m *DriverTaskEvent) error { return x.ServerStream.SendMsg(m) } @@ -2308,8 +3195,12 @@ var _Driver_serviceDesc = grpc.ServiceDesc{ HandlerType: (*DriverServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "Fingerprint", - Handler: _Driver_Fingerprint_Handler, + MethodName: "DriverTaskConfigSchema", + Handler: _Driver_DriverTaskConfigSchema_Handler, + }, + { + MethodName: "Capabilities", + Handler: _Driver_Capabilities_Handler, }, { MethodName: "RecoverTask", @@ -2353,6 +3244,11 @@ var _Driver_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{ + { + StreamName: "Fingerprint", + Handler: _Driver_Fingerprint_Handler, + ServerStreams: true, + }, { StreamName: "TaskEvents", Handler: _Driver_TaskEvents_Handler, @@ -2362,138 +3258,179 @@ var _Driver_serviceDesc = grpc.ServiceDesc{ Metadata: "driver.proto", } -func init() { proto.RegisterFile("driver.proto", fileDescriptor_driver_b26cb45d2a523f58) } +func init() { proto.RegisterFile("driver.proto", fileDescriptor_driver_2ab92ba6a4e60071) } -var fileDescriptor_driver_b26cb45d2a523f58 = []byte{ - // 2071 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0x4b, 0x73, 0x23, 0x49, - 0x11, 0x76, 0xeb, 0x65, 0x29, 0xdb, 0x8f, 0x76, 0xed, 0xce, 0xae, 0xd0, 0x04, 0x8c, 0xb7, 0x23, - 0x88, 0x70, 0xcc, 0x82, 0xcc, 0x78, 0xd9, 0x65, 0x81, 0x79, 0xac, 0xc6, 0xd6, 0xcc, 0x18, 0x5b, - 0xb6, 0xb7, 0x5a, 0x8e, 0xdd, 0x25, 0x02, 0x9a, 0x76, 0x77, 0x8d, 0xd4, 0x6b, 0xf5, 0x63, 0xba, - 0xaa, 0x8d, 0x75, 0x20, 0x82, 0x03, 0x11, 0x1b, 0xc1, 0x81, 0xe0, 0x87, 0x70, 0xe0, 0xca, 0x81, - 0x1b, 0x47, 0xfe, 0x02, 0x37, 0x0e, 0xfc, 0x0b, 0x88, 0x7a, 0xb4, 0xd4, 0x96, 0xc6, 0x33, 0x6e, - 0x79, 0x2f, 0x9c, 0xba, 0x2b, 0x33, 0xeb, 0xab, 0xac, 0xcc, 0xac, 0xac, 0xac, 0x84, 0x15, 0x2f, - 0xf1, 0x2f, 0x48, 0xd2, 0x8e, 0x93, 0x88, 0x45, 0xe8, 0xfe, 0xd0, 0xa1, 0x43, 0xdf, 0x8d, 0x92, - 0xb8, 0x1d, 0x46, 0x81, 0xe3, 0xb5, 0xe3, 0x51, 0x3a, 0xf0, 0x43, 0xda, 0x96, 0x52, 0xb4, 0x7d, - 0xe6, 0x50, 0x22, 0x65, 0x5b, 0x77, 0x07, 0x51, 0x34, 0x18, 0x91, 0x6d, 0x31, 0x3a, 0x4b, 0x5f, - 0x6e, 0x93, 0x20, 0x66, 0x63, 0xc5, 0xfc, 0xde, 0x2c, 0xd3, 0x4b, 0x13, 0x87, 0xf9, 0x51, 0xa8, - 0xf8, 0xf7, 0x66, 0xf9, 0xcc, 0x0f, 0x08, 0x65, 0x4e, 0x10, 0x2b, 0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31, 0x49, 0xfc, 0x48, 0xc6, 0x45, 0x19, 0x37, 0xdc, 0x38, 0x3d, 0x11, 0x04, 0xae, - 0x01, 0x67, 0xbf, 0x4a, 0x23, 0xe6, 0x08, 0xa8, 0x32, 0xae, 0xbb, 0x71, 0xfa, 0x39, 0x1f, 0x67, - 0x73, 0x45, 0x65, 0x43, 0x45, 0x70, 0xc8, 0xb9, 0x96, 0x20, 0xa0, 0x07, 0x70, 0x27, 0x20, 0x41, - 0x94, 0x8c, 0xed, 0x91, 0x1f, 0xf8, 0xcc, 0xf6, 0x43, 0xfb, 0x6c, 0xcc, 0xcb, 0x8f, 0x8a, 0x90, - 0x44, 0x92, 0x79, 0xc8, 0x79, 0xfb, 0xe1, 0x53, 0xce, 0x41, 0x26, 0xac, 0x46, 0x51, 0x60, 0x53, - 0x37, 0x4a, 0x88, 0xed, 0x78, 0x5f, 0x0b, 0xb7, 0x97, 0xb1, 0x1e, 0x45, 0x81, 0xc5, 0x69, 0x1d, - 0xef, 0x6b, 0x74, 0x0f, 0x74, 0x37, 0x4e, 0x29, 0x61, 0x36, 0xff, 0x34, 0x6b, 0x62, 0x7f, 0x20, - 0x49, 0xbb, 0x71, 0x4a, 0x73, 0x02, 0x01, 0x09, 0xb8, 0x6f, 0x72, 0x02, 0x3d, 0x12, 0x50, 0xf3, - 0x57, 0x50, 0x15, 0x9e, 0xe4, 0xbb, 0x13, 0x87, 0x3c, 0x76, 0xd8, 0x50, 0x19, 0xaf, 0xce, 0x09, - 0x27, 0x0e, 0x1b, 0x72, 0xe6, 0x30, 0xa2, 0x4c, 0x32, 0xa5, 0x15, 0xeb, 0x9c, 0x20, 0x98, 0x2d, - 0xa8, 0x27, 0xc4, 0xf1, 0xa2, 0x70, 0x34, 0x16, 0x1b, 0xaf, 0xe3, 0xc9, 0xd8, 0xf4, 0xa0, 0x26, - 0x9d, 0x7b, 0x0b, 0xfc, 0x4d, 0xd0, 0x63, 0x92, 0x04, 0x3e, 0xa5, 0x7e, 0x14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3e, 0x5e, 0x28, 0xb7, 0x9a, 0x4b, 0x3f, 0xd2, - 0x10, 0x01, 0x98, 0x76, 0xf8, 0x50, 0xb1, 0x23, 0x3b, 0xdb, 0x19, 0x7c, 0x43, 0xd0, 0xf1, 0xa3, - 0x9c, 0x35, 0xe2, 0x8a, 0x9d, 0xa0, 0x99, 0xce, 0x61, 0xb1, 0xa3, 0x3c, 0xd7, 0xfb, 0x5b, 0x7a, - 0xba, 0xfc, 0xcb, 0xaa, 0xd4, 0xae, 0x26, 0x3e, 0x1f, 0xfd, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x09, - 0xb8, 0x19, 0x07, 0x54, 0x1b, 0x00, 0x00, +var fileDescriptor_driver_2ab92ba6a4e60071 = []byte{ + // 2731 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0xcd, 0x6f, 0x23, 0xc7, + 0xb1, 0xd7, 0xf0, 0x9b, 0x45, 0x8a, 0x1a, 0xf5, 0xee, 0xda, 0x7c, 0x34, 0xec, 0xb5, 0x07, 0x78, + 0xc0, 0xc2, 0x7e, 0xa6, 0x9e, 0xe5, 0xf7, 0x1c, 0x7f, 0xec, 0xae, 0x4d, 0x4b, 0xdc, 0x5d, 0x79, + 0x45, 0x4a, 0x6e, 0x52, 0xb0, 0x1d, 0xd8, 0x19, 0x8f, 0x66, 0x7a, 0xc9, 0xb1, 0xe6, 0xcb, 0xd3, + 0x4d, 0xad, 0x14, 0x20, 0x40, 0x0e, 0x06, 0x02, 0x04, 0x49, 0x10, 0x38, 0x97, 0xdc, 0x82, 0xdc, + 0x83, 0x20, 0x39, 0xe6, 0x94, 0x5b, 0x72, 0x31, 0x90, 0xbf, 0x20, 0xff, 0x40, 0x80, 0xfc, 0x05, + 0xb9, 0x04, 0xfd, 0x31, 0xc3, 0xa1, 0xa4, 0xb5, 0x35, 0xd4, 0xe6, 0x34, 0xdd, 0xd5, 0x3d, 0xbf, + 0xaa, 0xae, 0xae, 0xae, 0xaa, 0xee, 0x82, 0xa6, 0x13, 0xbb, 0xc7, 0x24, 0xee, 0x46, 0x71, 0xc8, + 0x42, 0xf4, 0xf2, 0xd4, 0xa2, 0x53, 0xd7, 0x0e, 0xe3, 0xa8, 0x1b, 0x84, 0xbe, 0xe5, 0x74, 0x23, + 0x6f, 0x36, 0x71, 0x03, 0xda, 0x95, 0xb3, 0x68, 0xf7, 0xd0, 0xa2, 0x44, 0xce, 0xed, 0xbc, 0x30, + 0x09, 0xc3, 0x89, 0x47, 0x36, 0x44, 0xef, 0x70, 0xf6, 0x68, 0xc3, 0x99, 0xc5, 0x16, 0x73, 0xc3, + 0x40, 0x8d, 0xdf, 0x3c, 0x3b, 0xce, 0x5c, 0x9f, 0x50, 0x66, 0xf9, 0x91, 0x9a, 0xf0, 0xde, 0xc4, + 0x65, 0xd3, 0xd9, 0x61, 0xd7, 0x0e, 0xfd, 0x8d, 0x94, 0xef, 0x86, 0xe0, 0xbb, 0xa1, 0xf8, 0x6e, + 0xd0, 0xa9, 0x15, 0x13, 0x67, 0x63, 0x6a, 0x7b, 0x34, 0x22, 0x36, 0xff, 0x9a, 0xbc, 0x21, 0x11, + 0x8c, 0x9b, 0xf0, 0xfc, 0xb6, 0x10, 0x6c, 0x6c, 0xd1, 0xa3, 0xad, 0x30, 0x78, 0xe4, 0x4e, 0x46, + 0xf6, 0x94, 0xf8, 0x16, 0x26, 0x5f, 0xce, 0x08, 0x65, 0xc6, 0x21, 0xbc, 0xf0, 0xa4, 0x09, 0x34, + 0x0a, 0x03, 0x4a, 0xd0, 0x7b, 0x50, 0xe2, 0x80, 0x6d, 0xed, 0x45, 0xed, 0x56, 0x63, 0xf3, 0x7f, + 0xba, 0x4f, 0x52, 0x80, 0x14, 0xa4, 0xab, 0x04, 0xe9, 0x8e, 0x22, 0x62, 0x63, 0xf1, 0xa7, 0x71, + 0x03, 0xae, 0x6d, 0x59, 0x91, 0x75, 0xe8, 0x7a, 0x2e, 0x73, 0x09, 0x4d, 0x58, 0xff, 0x10, 0xae, + 0x2f, 0x92, 0x15, 0xc3, 0x43, 0x68, 0xda, 0x19, 0xba, 0x62, 0x7c, 0xb7, 0x7b, 0x79, 0xcd, 0x77, + 0xe5, 0x92, 0x16, 0xd0, 0x17, 0x30, 0x8d, 0xeb, 0x80, 0xee, 0xb9, 0xc1, 0x84, 0xc4, 0x51, 0xec, + 0x06, 0x2c, 0x91, 0xe8, 0x5f, 0x1a, 0x5c, 0x5b, 0x20, 0x2b, 0x89, 0x42, 0x00, 0x8b, 0xb1, 0xd8, + 0x3d, 0x9c, 0x31, 0x21, 0x4f, 0xf1, 0x56, 0x63, 0x73, 0x2f, 0x8f, 0x3c, 0x17, 0x80, 0x76, 0x7b, + 0x29, 0x62, 0x3f, 0x60, 0xf1, 0x29, 0xce, 0xb0, 0x40, 0x1d, 0xa8, 0x39, 0x84, 0x11, 0x9b, 0x11, + 0xa7, 0x5d, 0x78, 0x51, 0xbb, 0x55, 0xc3, 0x69, 0x1f, 0xb5, 0xa1, 0x3a, 0x25, 0x96, 0xc7, 0xa6, + 0xa7, 0xed, 0xa2, 0x18, 0x4a, 0xba, 0x9d, 0x3b, 0xb0, 0x76, 0x06, 0x14, 0xe9, 0x50, 0x3c, 0x22, + 0xa7, 0x42, 0x85, 0x75, 0xcc, 0x9b, 0xe8, 0x3a, 0x94, 0x8f, 0x2d, 0x6f, 0x46, 0x04, 0x6e, 0x1d, + 0xcb, 0xce, 0xdb, 0x85, 0x37, 0x35, 0xe3, 0x47, 0x80, 0x30, 0xb1, 0x43, 0x65, 0x0b, 0x4a, 0x27, + 0xe8, 0x59, 0xa8, 0x32, 0x8b, 0x1e, 0x99, 0xae, 0xa3, 0x50, 0x2a, 0xbc, 0xbb, 0xe3, 0xa0, 0x21, + 0x54, 0xa6, 0x56, 0xe0, 0x78, 0x12, 0xa9, 0xb1, 0xf9, 0x46, 0x1e, 0x85, 0x70, 0x0e, 0x0f, 0xc4, + 0xdf, 0x58, 0xa1, 0x70, 0x2b, 0x59, 0x60, 0x2f, 0xd5, 0x64, 0xfc, 0x45, 0x03, 0x7d, 0xc4, 0xac, + 0x98, 0x65, 0x85, 0xfa, 0x00, 0x4a, 0x5c, 0x0a, 0x65, 0x1a, 0xb9, 0x39, 0x4b, 0x3b, 0xc7, 0x02, + 0x03, 0x3d, 0x02, 0x3d, 0x20, 0xec, 0x71, 0x18, 0x1f, 0x99, 0x9c, 0x79, 0xec, 0x3a, 0xc9, 0x8a, + 0xde, 0xc9, 0x83, 0x3b, 0x94, 0x18, 0x7b, 0x0a, 0x02, 0xaf, 0x05, 0x8b, 0x04, 0xe3, 0xd7, 0x05, + 0x58, 0xcf, 0x2c, 0x44, 0x99, 0xd6, 0xa7, 0x50, 0x89, 0x09, 0x9d, 0x79, 0x4c, 0xac, 0xa5, 0xb5, + 0xb9, 0x9d, 0x87, 0xe7, 0x39, 0xb8, 0x2e, 0x16, 0x58, 0x58, 0x61, 0x3e, 0xed, 0x3d, 0x42, 0xb7, + 0x40, 0x97, 0x13, 0x4d, 0x12, 0xc7, 0x61, 0x6c, 0xfa, 0x74, 0x22, 0x8c, 0xb0, 0x8e, 0x5b, 0x92, + 0xde, 0xe7, 0xe4, 0x01, 0x9d, 0x18, 0xaf, 0x40, 0x45, 0xca, 0x82, 0x1a, 0x50, 0x1d, 0x1d, 0x6c, + 0x6d, 0xf5, 0x47, 0x23, 0x7d, 0x05, 0xd5, 0xa1, 0x8c, 0xfb, 0x63, 0xfc, 0x89, 0xae, 0xf1, 0xe6, + 0xbd, 0xde, 0xb8, 0xb7, 0xab, 0x17, 0x8c, 0x97, 0x61, 0xed, 0x23, 0xcb, 0x65, 0x97, 0x31, 0x3b, + 0x83, 0x81, 0x3e, 0x9f, 0xab, 0x94, 0x38, 0x5c, 0x50, 0x62, 0xce, 0x65, 0xf6, 0x4f, 0x5c, 0x76, + 0x46, 0x6d, 0x3a, 0x14, 0x49, 0x1c, 0xab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d, 0x26, 0x96, 0x13, 0x06, 0x5e, 0x72, 0xab, 0x4e, 0xfb, + 0xc6, 0x97, 0x50, 0x91, 0xee, 0xec, 0x0a, 0xf8, 0xaf, 0x02, 0xb2, 0x27, 0x71, 0x38, 0x8b, 0xf8, + 0xce, 0xf8, 0x2e, 0xa5, 0x6e, 0x18, 0x50, 0x65, 0xd8, 0xeb, 0x72, 0x64, 0x7f, 0x3e, 0x60, 0x7c, + 0xa3, 0xc9, 0xb0, 0x26, 0xaf, 0x5f, 0x3c, 0x45, 0x50, 0x31, 0xea, 0x6a, 0x17, 0x5e, 0x85, 0x92, + 0x24, 0x7c, 0xd2, 0x9a, 0x5a, 0xcb, 0x25, 0x7c, 0x44, 0x26, 0x7c, 0x84, 0x27, 0x16, 0x2a, 0x8e, + 0x4a, 0x4c, 0x19, 0x46, 0x1b, 0x4e, 0x9a, 0x13, 0x13, 0xe3, 0x9f, 0x5a, 0xea, 0x06, 0x92, 0xb4, + 0x15, 0xd9, 0x50, 0xe3, 0x87, 0xc9, 0xf4, 0xad, 0x48, 0x5d, 0x2c, 0x1e, 0x5c, 0x21, 0x2d, 0xee, + 0xf2, 0xb3, 0x33, 0xb0, 0x22, 0x19, 0x60, 0xab, 0x91, 0xec, 0x71, 0x9f, 0x62, 0x39, 0x73, 0x9f, + 0xc2, 0xdb, 0xe8, 0xbf, 0xa1, 0x65, 0xcd, 0x58, 0x68, 0x5a, 0xce, 0x31, 0x89, 0x99, 0x4b, 0x89, + 0xda, 0xf0, 0x55, 0x4e, 0xed, 0x25, 0xc4, 0xce, 0xdb, 0xd0, 0xcc, 0x62, 0x7e, 0x57, 0x10, 0x2a, + 0x67, 0x83, 0xd0, 0xe7, 0x00, 0xf3, 0xc4, 0x8c, 0x1b, 0x06, 0x39, 0x71, 0x99, 0x69, 0x87, 0x8e, + 0xf4, 0x79, 0x65, 0x5c, 0xe3, 0x84, 0xad, 0xd0, 0x21, 0x67, 0x72, 0xdd, 0x72, 0x92, 0xeb, 0x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 0x05, + 0xfe, 0x5c, 0x03, 0x98, 0x57, 0xbe, 0xf2, 0x89, 0x73, 0xae, 0xee, 0xd6, 0xb9, 0xbb, 0xec, 0xef, + 0x0b, 0x07, 0x3d, 0xa9, 0x7b, 0xe5, 0x3b, 0xe8, 0x67, 0x2a, 0x75, 0xf9, 0x0e, 0xfa, 0xd9, 0x52, + 0x9b, 0xb1, 0xf2, 0x7e, 0xf5, 0xfb, 0x65, 0x99, 0x24, 0x55, 0xc4, 0xe7, 0xf5, 0x7f, 0x07, 0x00, + 0x00, 0xff, 0xff, 0xb9, 0x14, 0x48, 0xb3, 0xae, 0x25, 0x00, 0x00, } diff --git a/plugins/drivers/base/proto/driver.proto b/plugins/drivers/base/proto/driver.proto index 90ccf3090..4cb27c829 100644 --- a/plugins/drivers/base/proto/driver.proto +++ b/plugins/drivers/base/proto/driver.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package hashicorp.nomad.plugins.drivers.base.proto; option go_package = "proto"; -import "google/protobuf/empty.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; @@ -12,13 +11,27 @@ import "github.com/hashicorp/nomad/plugins/shared/hclspec/hcl_spec.proto"; // Some rpcs may not be implemented by the driver based on it's capabilities. service Driver { - // Fingerprint collects information about the driver including whether the - // driver is able to function in the existing environment. - rpc Fingerprint(google.protobuf.Empty) returns (FingerprintResponse) {} + // DriverTaskConfigSchema returns the schema for parsing the driver + // configuration of a task. + rpc DriverTaskConfigSchema(DriverTaskConfigSchemaRequest) returns (DriverTaskConfigSchemaResponse) {} + + // Capabilities returns a set of features which the driver implements. Some + // RPCs are not possible to implement on some runtimes, this allows the + // driver to indicate if it doesn't support these RPCs and features. + rpc Capabilities(CapabilitiesRequest) returns (CapabilitiesResponse) {} + + // Fingerprint starts a stream which emits information about the driver + // including whether the driver healthy and able to function in the + // existing environment. + // + // The driver should immediately stream a FingerprintResponse when the RPC + // is initially called, then send any additional responses if there is a + // change in the driver's state. + rpc Fingerprint(FingerprintRequest) returns (stream FingerprintResponse) {} // RecoverTask is used when a task has been started but the driver may not // know about it. Such is the case if the driver restarts or is upgraded. - rpc RecoverTask(RecoverTaskRequest) returns (google.protobuf.Empty) {} + rpc RecoverTask(RecoverTaskRequest) returns (RecoverTaskResponse) {} // StartTask starts and tracks the task on the implemented runtime rpc StartTask(StartTaskRequest) returns (StartTaskResponse) {} @@ -31,12 +44,12 @@ service Driver { // StopTask stops a given task by sending the desired signal to the process. // If the task does not exit on its own within the given timeout, it will be // forcefully killed. - rpc StopTask(StopTaskRequest) returns (google.protobuf.Empty) {} + rpc StopTask(StopTaskRequest) returns (StopTaskResponse) {} // 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. - rpc DestroyTask(DestroyTaskRequest) returns (google.protobuf.Empty) {} + rpc DestroyTask(DestroyTaskRequest) returns (DestroyTaskResponse) {} // ListTasks returns a list of summary information of all the tasks the // driver is tracking. @@ -50,37 +63,53 @@ service Driver { // TaskEvents starts a streaming RPC where all task events emitted by the // driver are streamed to the caller. - rpc TaskEvents(google.protobuf.Empty) returns (stream TaskEvent) {} + rpc TaskEvents(TaskEventsRequest) returns (stream DriverTaskEvent) {} // The following RPCs are only implemented if the driver sets the // corresponding capability. // SignalTask sends a signal to the task - rpc SignalTask(SignalTaskRequest) returns (google.protobuf.Empty) {} + rpc SignalTask(SignalTaskRequest) returns (SignalTaskResponse) {} // ExecTask executes a command inside the tasks execution context rpc ExecTask(ExecTaskRequest) returns (ExecTaskResponse) {} } +message DriverTaskConfigSchemaRequest {} -message FingerprintResponse { +message DriverTaskConfigSchemaResponse { // Spec is the configuration schema for the job driver config stanza hashicorp.nomad.plugins.shared.hclspec.Spec spec = 1; +} + +message CapabilitiesRequest {} + +message CapabilitiesResponse { // Capabilities provides a way for the driver to denote if it implements // non-core RPCs. Some Driver service RPCs expose additional information // or functionality outside of the core task management functions. These // RPCs are only implemented if the driver sets the corresponding capability. - DriverCapabilities capabilities = 2; + DriverCapabilities capabilities = 1; +} + +message FingerprintRequest {} + +message FingerprintResponse { + // Attributes are key/value pairs that annotate the nomad client and can be // used in scheduling contraints and affinities. - map attributes = 3; + map attributes = 1; // Detected signifies if the necessary dependancies of the drive are met for // nominal operation. - bool detected = 4; + bool detected = 2; + + // Healthy is true if the driver is able to make changes to a task's state + // ex. Start/Stop + bool healthy = 3; } message RecoverTaskRequest { @@ -92,17 +121,42 @@ message RecoverTaskRequest { TaskHandle handle = 2; } +message RecoverTaskResponse {} + message StartTaskRequest { // Task configuration to launch TaskConfig task = 1; + + //NetworkOverride is set if the driver sets network settings and the service ip/port + //needs to be set differently. + NetworkOverride network_override = 2; } message StartTaskResponse { + enum Result { + SUCCESS = 0; + RETRY = 1; + FATAL = 2; + } + + // Result is set depending on the type of error that occured while starting + // a task: + // + // * SUCCESS: No error occured, handle is set + // * RETRY: An error occured, but is recoverable and the RPC should be retried + // * FATAL: A fatal error occured and is not likely to succeed if retried + // + // If Result is not successful, the DriverErrorMsg will be set. + Result result = 1; + // Handle is opague to the client, but must be stored in order to potentially // recover the task. - TaskHandle handle = 1; + TaskHandle handle = 2; + + // DriverErrorMsg is set if an error occured + string driver_error_msg = 3; } message WaitTaskRequest { @@ -113,14 +167,10 @@ message WaitTaskRequest { message WaitTaskResponse { - // ExitCode returned from the task on exit - int32 exit_code = 1; - - // Signal is set if a signal was sent to the task - int32 signal = 2; - + // Result is the exit status of the task + ExitResult result = 1; // Err is set if any driver error occured while waiting for the task - string err = 3; + string err = 2; } message StopTaskRequest { @@ -137,18 +187,22 @@ message StopTaskRequest { string signal = 3; } +message StopTaskResponse {} + message DestroyTaskRequest { // TaskId is the ID of the target task string task_id = 1; } +message DestroyTaskResponse {} + message ListTasksRequest {} message ListTasksResponse { // Tasks includes a list of summary information for each task - repeated TaskSummary tasks = 1; + repeated TaskStatus tasks = 1; } message InspectTaskRequest { @@ -161,6 +215,12 @@ message InspectTaskResponse { // Task details TaskStatus task = 1; + + // Driver details for task + TaskDriverStatus driver = 2; + + // NetworkOverride info if set + NetworkOverride network_override = 3; } message TaskStatsRequest { @@ -175,6 +235,8 @@ message TaskStatsResponse { TaskStats stats = 1; } +message TaskEventsRequest {} + message SignalTaskRequest { // TaskId is the ID of the target task @@ -184,6 +246,8 @@ message SignalTaskRequest { string signal = 2; } +message SignalTaskResponse {} + message ExecTaskRequest { // TaskId is the ID of the target task @@ -197,7 +261,17 @@ message ExecTaskRequest { google.protobuf.Duration timeout = 3; } -message ExecTaskResponse {} +message ExecTaskResponse { + + // Stdout from the exec + bytes stdout = 1; + + // Stderr from the exec + bytes stderr = 2; + + // Result from the exec + ExitResult result = 3; +} message DriverCapabilities { @@ -208,12 +282,19 @@ message DriverCapabilities { // Exec indicates that the driver supports executing arbitrary commands // in the task's execution environment. bool exec = 2; + + enum FSIsolation { + NONE = 0; + CHROOT = 1; + IMAGE = 2; + } + // FsIsolation indicates what kind of filesystem isolation a driver supports. + FSIsolation fs_isolation = 3; } message TaskConfig { // Id of the task, recommended to the globally unique, must be unique to the driver. - // If not set, a UUID is to be generated. string id = 1; // Name of the task @@ -244,6 +325,38 @@ message TaskConfig { } message Resources { + + // RawResources are the resources set for the task + RawResources raw_resources = 1; + + // LinuxResources are the computed values to set for specific Linux features + LinuxResources linux_resources = 2; +} + +message RawResources { + int64 cpu = 1; + int64 memory = 2; + int64 disk = 3; + int64 iops = 4; + repeated NetworkResource networks = 5; +} + +message NetworkResource { + string device = 1; + string cidr = 2; + string ip = 3; + int32 mbits = 4; + repeated NetworkPort reserved_ports = 5; + repeated NetworkPort dynamic_ports = 6; +} + +message NetworkPort { + string label = 1; + int32 value = 2; +} + +message LinuxResources { + // CPU CFS (Completely Fair Scheduler) period. Default: 0 (not specified) int64 cpu_period = 1; // CPU CFS (Completely Fair Scheduler) quota. Default: 0 (not specified) @@ -280,14 +393,14 @@ message Device { // HostPath is the path on the host to the source device string host_path = 2; - // Permissions defines the Cgroup permissions of the device. + // CgroupPermissions defines the Cgroup permissions of the device. // One or more of the following options can be set: // * r - allows the task to read from the specified device. // * w - allows the task to write to the specified device. // * m - allows the task to create device files that do not yet exist. // // Example: "rw" - string permissions = 3; + string cgroup_permissions = 3; } enum TaskState { @@ -299,34 +412,46 @@ enum TaskState { // TaskHandle is created when starting a task and is used to recover task message TaskHandle { - // Driver is the driver which initially created the handle - string driver = 1; - // Config is the TaskConfig for the task - TaskConfig config = 2; + TaskConfig config = 1; // State is the state of the task's execution - TaskState state = 3; + TaskState state = 2; // DriverState is the encoded state for the specific driver - bytes driver_state = 4; + bytes driver_state = 3; } +// NetworkOverride contains network settings which the driver may override +// for the task, such as when the driver is setting up the task's network. +message NetworkOverride { -// TaskSummary defines summary information of a task, typically used when listing -// many tasks at once. -message TaskSummary { - string id = 1; - string name = 2; + // PortMap can be set to replace ports with driver-specific mappings + map port_map = 1; - // State is the state of the task's execution - TaskState state = 3; + // Addr is the IP address for the task created by the driver + string addr = 2; - // StartedAt is the timestamp when the task was started - google.protobuf.Timestamp started_at = 4; + // AutoAdvertise indicates whether the driver thinks services that choose + // to auto_advertise_addresses should use this IP instead of the host's. + bool auto_advertise = 3; } -// TaskStatus includes detailed information of a specific task +// ExitResult contains information about the exit status of a task +message ExitResult { + + // ExitCode returned from the task on exit + int32 exit_code = 1; + + // Signal is set if a signal was sent to the task + int32 signal = 2; + + // OomKilled is true if the task exited as a result of the OOM Killer + bool oom_killed = 3; + +} + +// TaskStatus includes information of a specific task message TaskStatus { string id = 1; string name = 2; @@ -341,12 +466,15 @@ message TaskStatus { // If the task is still running, CompletedAt will not be set google.protobuf.Timestamp completed_at = 5; - // ExitCode should only be used when CompletedAt is set. - int32 exit_code = 6; + // Result is set when CompletedAt is set. + ExitResult result = 6; +} - // DriverStatus is a set of string/string key value pairs specific to the - // implementing driver. - map driver_status = 7; +message TaskDriverStatus { + + // Attributes is a set of string/string key value pairs specific to the + // implementing driver + map attributes = 1; } message TaskStats { @@ -412,14 +540,17 @@ message MemoryUsage { repeated Fields measured_fields = 6; } -message TaskEvent { +message DriverTaskEvent { // TaskId is the id of the task for the event string task_id = 1; + // Timestamp when the event occured + google.protobuf.Timestamp timestamp = 2; + // Message is the body of the event - string message = 2; + string message = 3; // Annotations allows for additional key/value data to be sent along with the event - map annotations = 3; + map annotations = 4; }