diff --git a/proto/events.pb.go b/proto/events.pb.go index 95486da1f..a191bfd61 100644 --- a/proto/events.pb.go +++ b/proto/events.pb.go @@ -21,7 +21,7 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type VMStart struct { - VMID string `protobuf:"bytes,1,opt,name=VMID,json=vMID,proto3" json:"VMID,omitempty"` + VMID string `protobuf:"bytes,1,opt,name=VMID,proto3" json:"VMID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -59,7 +59,7 @@ func (m *VMStart) GetVMID() string { } type VMStop struct { - VMID string `protobuf:"bytes,1,opt,name=VMID,json=vMID,proto3" json:"VMID,omitempty"` + VMID string `protobuf:"bytes,1,opt,name=VMID,proto3" json:"VMID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -104,11 +104,11 @@ func init() { func init() { proto.RegisterFile("events.proto", fileDescriptor_8f22242cb04491f9) } var fileDescriptor_8f22242cb04491f9 = []byte{ - // 84 bytes of a gzipped FileDescriptorProto + // 81 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x49, 0x2d, 0x4b, 0xcd, 0x2b, 0x29, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x57, 0x92, 0xe5, 0x62, 0x0f, 0xf3, 0x0d, 0x2e, 0x49, 0x2c, 0x2a, 0x11, 0x12, 0xe2, 0x62, 0x09, 0xf3, 0xf5, 0x74, 0x91, 0x60, 0x54, 0x60, 0xd4, - 0xe0, 0x0c, 0x62, 0x29, 0xf3, 0xf5, 0x74, 0x51, 0x92, 0xe1, 0x62, 0x03, 0x49, 0xe7, 0x17, 0x60, - 0x93, 0x4d, 0x62, 0x03, 0x9b, 0x61, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xd2, 0x8a, 0x85, 0x02, - 0x53, 0x00, 0x00, 0x00, + 0xe0, 0x0c, 0x02, 0xb3, 0x95, 0x64, 0xb8, 0xd8, 0x40, 0xd2, 0xf9, 0x05, 0xd8, 0x64, 0x93, 0xd8, + 0xc0, 0x66, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x83, 0xd8, 0x3c, 0x53, 0x00, 0x00, + 0x00, } diff --git a/proto/firecracker.pb.go b/proto/firecracker.pb.go index 2df343d8a..f363aaeac 100644 --- a/proto/firecracker.pb.go +++ b/proto/firecracker.pb.go @@ -23,23 +23,23 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // CreateVMRequest specifies creation parameters for a new FC instance type CreateVMRequest struct { // VM identifier to assign - VMID string `protobuf:"bytes,1,opt,name=VMID,json=vMID,proto3" json:"VMID,omitempty"` + VMID string `protobuf:"bytes,1,opt,name=VMID,proto3" json:"VMID,omitempty"` // Specifies the machine configuration for the VM - MachineCfg *FirecrackerMachineConfiguration `protobuf:"bytes,2,opt,name=MachineCfg,json=machineCfg,proto3" json:"MachineCfg,omitempty"` + MachineCfg *FirecrackerMachineConfiguration `protobuf:"bytes,2,opt,name=MachineCfg,proto3" json:"MachineCfg,omitempty"` // Specifies the file path where the kernel image is located - KernelImagePath string `protobuf:"bytes,3,opt,name=KernelImagePath,json=kernelImagePath,proto3" json:"KernelImagePath,omitempty"` + KernelImagePath string `protobuf:"bytes,3,opt,name=KernelImagePath,proto3" json:"KernelImagePath,omitempty"` // Specifies the commandline arguments that should be passed to the kernel - KernelArgs string `protobuf:"bytes,4,opt,name=KernelArgs,json=kernelArgs,proto3" json:"KernelArgs,omitempty"` + KernelArgs string `protobuf:"bytes,4,opt,name=KernelArgs,proto3" json:"KernelArgs,omitempty"` // Specifies the root block device for the VM - RootDrive *FirecrackerDrive `protobuf:"bytes,5,opt,name=RootDrive,json=rootDrive,proto3" json:"RootDrive,omitempty"` + RootDrive *FirecrackerDrive `protobuf:"bytes,5,opt,name=RootDrive,proto3" json:"RootDrive,omitempty"` // Specifies the additional block device config for the VM. - AdditionalDrives []*FirecrackerDrive `protobuf:"bytes,6,rep,name=AdditionalDrives,json=additionalDrives,proto3" json:"AdditionalDrives,omitempty"` + AdditionalDrives []*FirecrackerDrive `protobuf:"bytes,6,rep,name=AdditionalDrives,proto3" json:"AdditionalDrives,omitempty"` // Specifies the networking configuration for a VM - NetworkInterfaces []*FirecrackerNetworkInterface `protobuf:"bytes,7,rep,name=NetworkInterfaces,json=networkInterfaces,proto3" json:"NetworkInterfaces,omitempty"` + NetworkInterfaces []*FirecrackerNetworkInterface `protobuf:"bytes,7,rep,name=NetworkInterfaces,proto3" json:"NetworkInterfaces,omitempty"` // The number of dummy drives to reserve in advance before running FC instance. - ContainerCount int32 `protobuf:"varint,8,opt,name=ContainerCount,json=containerCount,proto3" json:"ContainerCount,omitempty"` + ContainerCount int32 `protobuf:"varint,8,opt,name=ContainerCount,proto3" json:"ContainerCount,omitempty"` // Whether the VM should exit after all tasks running in it have been deleted. - ExitAfterAllTasksDeleted bool `protobuf:"varint,9,opt,name=ExitAfterAllTasksDeleted,json=exitAfterAllTasksDeleted,proto3" json:"ExitAfterAllTasksDeleted,omitempty"` + ExitAfterAllTasksDeleted bool `protobuf:"varint,9,opt,name=ExitAfterAllTasksDeleted,proto3" json:"ExitAfterAllTasksDeleted,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -133,7 +133,8 @@ func (m *CreateVMRequest) GetExitAfterAllTasksDeleted() bool { } type StopVMRequest struct { - VMID string `protobuf:"bytes,1,opt,name=VMID,json=vMID,proto3" json:"VMID,omitempty"` + VMID string `protobuf:"bytes,1,opt,name=VMID,proto3" json:"VMID,omitempty"` + TimeoutSeconds uint32 `protobuf:"varint,2,opt,name=TimeoutSeconds,proto3" json:"TimeoutSeconds,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -170,8 +171,15 @@ func (m *StopVMRequest) GetVMID() string { return "" } +func (m *StopVMRequest) GetTimeoutSeconds() uint32 { + if m != nil { + return m.TimeoutSeconds + } + return 0 +} + type GetVMInfoRequest struct { - VMID string `protobuf:"bytes,1,opt,name=VMID,json=vMID,proto3" json:"VMID,omitempty"` + VMID string `protobuf:"bytes,1,opt,name=VMID,proto3" json:"VMID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -209,11 +217,11 @@ func (m *GetVMInfoRequest) GetVMID() string { } type GetVMInfoResponse struct { - VMID string `protobuf:"bytes,1,opt,name=VMID,json=vMID,proto3" json:"VMID,omitempty"` - ContextID uint32 `protobuf:"varint,2,opt,name=ContextID,json=contextID,proto3" json:"ContextID,omitempty"` - SocketPath string `protobuf:"bytes,3,opt,name=SocketPath,json=socketPath,proto3" json:"SocketPath,omitempty"` - LogFifoPath string `protobuf:"bytes,4,opt,name=LogFifoPath,json=logFifoPath,proto3" json:"LogFifoPath,omitempty"` - MetricsFifoPath string `protobuf:"bytes,5,opt,name=MetricsFifoPath,json=metricsFifoPath,proto3" json:"MetricsFifoPath,omitempty"` + VMID string `protobuf:"bytes,1,opt,name=VMID,proto3" json:"VMID,omitempty"` + ContextID uint32 `protobuf:"varint,2,opt,name=ContextID,proto3" json:"ContextID,omitempty"` + SocketPath string `protobuf:"bytes,3,opt,name=SocketPath,proto3" json:"SocketPath,omitempty"` + LogFifoPath string `protobuf:"bytes,4,opt,name=LogFifoPath,proto3" json:"LogFifoPath,omitempty"` + MetricsFifoPath string `protobuf:"bytes,5,opt,name=MetricsFifoPath,proto3" json:"MetricsFifoPath,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -279,8 +287,8 @@ func (m *GetVMInfoResponse) GetMetricsFifoPath() string { } type SetVMMetadataRequest struct { - VMID string `protobuf:"bytes,1,opt,name=VMID,json=vMID,proto3" json:"VMID,omitempty"` - Metadata string `protobuf:"bytes,2,opt,name=Metadata,json=metadata,proto3" json:"Metadata,omitempty"` + VMID string `protobuf:"bytes,1,opt,name=VMID,proto3" json:"VMID,omitempty"` + Metadata string `protobuf:"bytes,2,opt,name=Metadata,proto3" json:"Metadata,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -335,33 +343,33 @@ func init() { func init() { proto.RegisterFile("firecracker.proto", fileDescriptor_a73317e9fb8da571) } var fileDescriptor_a73317e9fb8da571 = []byte{ - // 448 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x93, 0x51, 0x8f, 0xd2, 0x40, - 0x14, 0x85, 0x53, 0x81, 0x5d, 0x7a, 0xc9, 0x2e, 0x30, 0xf1, 0x61, 0xb2, 0xd9, 0x98, 0x06, 0x93, - 0x0d, 0x4f, 0x6b, 0xa2, 0x6f, 0x26, 0x26, 0x22, 0x15, 0x53, 0xb5, 0xc6, 0x0c, 0x86, 0x07, 0xdf, - 0xc6, 0x72, 0xdb, 0x9d, 0xb4, 0xcc, 0xe0, 0xcc, 0x65, 0x5d, 0x7f, 0x96, 0x3f, 0xc5, 0x7f, 0x64, - 0x3a, 0x08, 0x0b, 0x64, 0x97, 0xa7, 0x66, 0xce, 0xfd, 0x4e, 0x7b, 0x9a, 0x7b, 0x06, 0xfa, 0xb9, - 0xb2, 0x98, 0x59, 0x99, 0x95, 0x68, 0xaf, 0x97, 0xd6, 0x90, 0xb9, 0xe8, 0xd0, 0xef, 0x25, 0xba, - 0xf5, 0x61, 0xf0, 0xb7, 0x01, 0xdd, 0xb1, 0x45, 0x49, 0x38, 0x4b, 0x05, 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 0x39, 0xa1, 0x1d, 0x55, 0xd5, 0x37, 0xe9, 0x4a, 0x17, 0x63, 0x85, 0x84, 0x73, 0x1e, - 0x46, 0xc1, 0xb0, 0x2d, 0x38, 0x3e, 0x32, 0x1f, 0x3c, 0x87, 0xb3, 0x29, 0x99, 0xe5, 0xd1, 0x85, - 0x0e, 0xae, 0xa0, 0xf7, 0x01, 0x69, 0x96, 0x26, 0x3a, 0x37, 0xc7, 0xb8, 0x3f, 0x01, 0xf4, 0x77, - 0x40, 0xb7, 0x34, 0xda, 0xe1, 0x83, 0x15, 0xb9, 0x84, 0xb0, 0xfe, 0x35, 0xbc, 0xa3, 0x24, 0xf6, - 0x0d, 0x39, 0x13, 0x61, 0xb6, 0x11, 0xea, 0xa5, 0x4e, 0x4d, 0x56, 0x22, 0xed, 0x6c, 0x1e, 0xdc, - 0x56, 0x61, 0x11, 0x74, 0x3e, 0x9b, 0x62, 0xa2, 0x72, 0xe3, 0x81, 0xf5, 0xd6, 0x3b, 0xd5, 0xbd, - 0x54, 0x17, 0x28, 0x45, 0xb2, 0x2a, 0x73, 0x5b, 0xaa, 0xb5, 0x2e, 0xd0, 0x62, 0x5f, 0x1e, 0x4c, - 0xe0, 0xe9, 0xb4, 0x8e, 0x9c, 0x22, 0xc9, 0xb9, 0x24, 0x79, 0xac, 0xd8, 0x17, 0xd0, 0xde, 0x60, - 0x3e, 0x74, 0x28, 0xda, 0x8b, 0xff, 0xe7, 0x77, 0xa7, 0xdf, 0x5b, 0xfe, 0x96, 0xfc, 0x38, 0xf1, - 0x8f, 0x57, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xa4, 0x7a, 0x64, 0xe9, 0x4e, 0x03, 0x00, 0x00, + // 446 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x93, 0x4f, 0x6f, 0xd3, 0x4c, + 0x10, 0xc6, 0xe5, 0x37, 0x4d, 0x1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 0x56, 0xe5, 0xee, 0x41, 0xd5, 0xdf, 0x2e, 0x5a, 0x07, 0xc7, 0x73, 0xf8, + 0x7f, 0xd1, 0x44, 0xce, 0x90, 0x64, 0x21, 0x49, 0xee, 0x7b, 0x5f, 0xe7, 0x30, 0xb8, 0x97, 0xf9, + 0xd0, 0xa1, 0x78, 0x38, 0xbf, 0x3d, 0xfa, 0xd2, 0xf7, 0x5f, 0xd3, 0xd7, 0x43, 0xff, 0xf3, 0xf2, + 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xad, 0x3b, 0x3d, 0xc6, 0x76, 0x03, 0x00, 0x00, } diff --git a/proto/firecracker.proto b/proto/firecracker.proto index bc2a5edee..e04caf79d 100644 --- a/proto/firecracker.proto +++ b/proto/firecracker.proto @@ -36,6 +36,7 @@ message CreateVMRequest { message StopVMRequest { string VMID = 1; + uint32 TimeoutSeconds = 2; } message GetVMInfoRequest { diff --git a/proto/types.pb.go b/proto/types.pb.go index 14b7cb2b7..09fdf9d00 100644 --- a/proto/types.pb.go +++ b/proto/types.pb.go @@ -23,12 +23,12 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Message to store bundle/config.json bytes type ExtraData struct { - JsonSpec []byte `protobuf:"bytes,1,opt,name=JsonSpec,json=jsonSpec,proto3" json:"JsonSpec,omitempty"` - RuncOptions *types.Any `protobuf:"bytes,2,opt,name=RuncOptions,json=runcOptions,proto3" json:"RuncOptions,omitempty"` - StdinPort uint32 `protobuf:"varint,3,opt,name=StdinPort,json=stdinPort,proto3" json:"StdinPort,omitempty"` - StdoutPort uint32 `protobuf:"varint,4,opt,name=StdoutPort,json=stdoutPort,proto3" json:"StdoutPort,omitempty"` - StderrPort uint32 `protobuf:"varint,5,opt,name=StderrPort,json=stderrPort,proto3" json:"StderrPort,omitempty"` - DriveID string `protobuf:"bytes,6,opt,name=DriveID,json=driveID,proto3" json:"DriveID,omitempty"` + JsonSpec []byte `protobuf:"bytes,1,opt,name=JsonSpec,proto3" json:"JsonSpec,omitempty"` + RuncOptions *types.Any `protobuf:"bytes,2,opt,name=RuncOptions,proto3" json:"RuncOptions,omitempty"` + StdinPort uint32 `protobuf:"varint,3,opt,name=StdinPort,proto3" json:"StdinPort,omitempty"` + StdoutPort uint32 `protobuf:"varint,4,opt,name=StdoutPort,proto3" json:"StdoutPort,omitempty"` + StderrPort uint32 `protobuf:"varint,5,opt,name=StderrPort,proto3" json:"StderrPort,omitempty"` + DriveID string `protobuf:"bytes,6,opt,name=DriveID,proto3" json:"DriveID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -102,15 +102,15 @@ func (m *ExtraData) GetDriveID() string { // Message to specify network config for a Firecracker VM type FirecrackerNetworkInterface struct { - AllowMMDS bool `protobuf:"varint,1,opt,name=AllowMMDS,json=allowMMDS,proto3" json:"AllowMMDS,omitempty"` - InRateLimiter *FirecrackerRateLimiter `protobuf:"bytes,2,opt,name=InRateLimiter,json=inRateLimiter,proto3" json:"InRateLimiter,omitempty"` - OutRateLimiter *FirecrackerRateLimiter `protobuf:"bytes,3,opt,name=OutRateLimiter,json=outRateLimiter,proto3" json:"OutRateLimiter,omitempty"` + AllowMMDS bool `protobuf:"varint,1,opt,name=AllowMMDS,proto3" json:"AllowMMDS,omitempty"` + InRateLimiter *FirecrackerRateLimiter `protobuf:"bytes,2,opt,name=InRateLimiter,proto3" json:"InRateLimiter,omitempty"` + OutRateLimiter *FirecrackerRateLimiter `protobuf:"bytes,3,opt,name=OutRateLimiter,proto3" json:"OutRateLimiter,omitempty"` // CNIConfiguration specifies CNI configuration that will be used to generate // a network interface for a Firecracker VM. - CNIConfig *CNIConfiguration `protobuf:"bytes,4,opt,name=CNIConfig,json=cNIConfig,proto3" json:"CNIConfig,omitempty"` + CNIConfig *CNIConfiguration `protobuf:"bytes,4,opt,name=CNIConfig,proto3" json:"CNIConfig,omitempty"` // StaticNetworkConfiguration specifies static configuration parameters for a // Firecracker VM's network interface - StaticConfig *StaticNetworkConfiguration `protobuf:"bytes,5,opt,name=StaticConfig,json=staticConfig,proto3" json:"StaticConfig,omitempty"` + StaticConfig *StaticNetworkConfiguration `protobuf:"bytes,5,opt,name=StaticConfig,proto3" json:"StaticConfig,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -181,23 +181,23 @@ type CNIConfiguration struct { // NetworkName is the name of a CNI network (as found in CNI // configuration files) that will be used to generate the // network interface. - NetworkName string `protobuf:"bytes,1,opt,name=NetworkName,json=networkName,proto3" json:"NetworkName,omitempty"` + NetworkName string `protobuf:"bytes,1,opt,name=NetworkName,proto3" json:"NetworkName,omitempty"` // InterfaceName corresponds to the CNI_IFNAME parameter that will be // provided to CNI plugins during invocation. - InterfaceName string `protobuf:"bytes,2,opt,name=InterfaceName,json=interfaceName,proto3" json:"InterfaceName,omitempty"` + InterfaceName string `protobuf:"bytes,2,opt,name=InterfaceName,proto3" json:"InterfaceName,omitempty"` // BinPath is a list of directories that will be searched when // looking for CNI plugin binaries. Defaults to just "/opt/cni/bin" - BinPath []string `protobuf:"bytes,3,rep,name=BinPath,json=binPath,proto3" json:"BinPath,omitempty"` + BinPath []string `protobuf:"bytes,3,rep,name=BinPath,proto3" json:"BinPath,omitempty"` // ConfDir is the directory in which CNI configuration will be sought. // If not specified, will default to "/etc/cni/conf.d". - ConfDir string `protobuf:"bytes,4,opt,name=ConfDir,json=confDir,proto3" json:"ConfDir,omitempty"` + ConfDir string `protobuf:"bytes,4,opt,name=ConfDir,proto3" json:"ConfDir,omitempty"` // CacheDir is the directory in which CNI results will be temporarily // cached by the runtime. If not specified, it will default to // "/var/lib/cni" - CacheDir string `protobuf:"bytes,5,opt,name=CacheDir,json=cacheDir,proto3" json:"CacheDir,omitempty"` + CacheDir string `protobuf:"bytes,5,opt,name=CacheDir,proto3" json:"CacheDir,omitempty"` // Args corresponds to the CNI_ARGS parameter that will be provided to // CNI plugins on invocation. - Args []*CNIConfiguration_CNIArg `protobuf:"bytes,6,rep,name=Args,json=args,proto3" json:"Args,omitempty"` + Args []*CNIConfiguration_CNIArg `protobuf:"bytes,6,rep,name=Args,proto3" json:"Args,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -270,8 +270,8 @@ func (m *CNIConfiguration) GetArgs() []*CNIConfiguration_CNIArg { } type CNIConfiguration_CNIArg struct { - Key string `protobuf:"bytes,1,opt,name=Key,json=key,proto3" json:"Key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=Value,json=value,proto3" json:"Value,omitempty"` + Key string `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=Value,proto3" json:"Value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -318,12 +318,12 @@ func (m *CNIConfiguration_CNIArg) GetValue() string { // Message to specify static configuration parameters for a // Firecracker VM's network interface type StaticNetworkConfiguration struct { - MacAddress string `protobuf:"bytes,1,opt,name=MacAddress,json=macAddress,proto3" json:"MacAddress,omitempty"` - HostDevName string `protobuf:"bytes,2,opt,name=HostDevName,json=hostDevName,proto3" json:"HostDevName,omitempty"` + MacAddress string `protobuf:"bytes,1,opt,name=MacAddress,proto3" json:"MacAddress,omitempty"` + HostDevName string `protobuf:"bytes,2,opt,name=HostDevName,proto3" json:"HostDevName,omitempty"` // IPConfig optionally provides static IP configuration that will be configured // on the VM's internal networking interface. If not specified, no IP // configuration will be applied to the VM's internal nic automatically. - IPConfig *IPConfiguration `protobuf:"bytes,3,opt,name=IPConfig,json=iPConfig,proto3" json:"IPConfig,omitempty"` + IPConfig *IPConfiguration `protobuf:"bytes,3,opt,name=IPConfig,proto3" json:"IPConfig,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -380,15 +380,15 @@ type IPConfiguration struct { // PrimaryAddr specifies, in CIDR notation, the primary address // and subnet that a network interface will be assigned inside // the VM. - PrimaryAddr string `protobuf:"bytes,1,opt,name=PrimaryAddr,json=primaryAddr,proto3" json:"PrimaryAddr,omitempty"` + PrimaryAddr string `protobuf:"bytes,1,opt,name=PrimaryAddr,proto3" json:"PrimaryAddr,omitempty"` // GatewayAddr specifies the default gateway that a network interface // should use inside the VM. - GatewayAddr string `protobuf:"bytes,3,opt,name=GatewayAddr,json=gatewayAddr,proto3" json:"GatewayAddr,omitempty"` + GatewayAddr string `protobuf:"bytes,3,opt,name=GatewayAddr,proto3" json:"GatewayAddr,omitempty"` // Nameservers is a list of nameservers that the VM will be configured // to use internally. Currently only up to 2 nameservers can be specified // (any more in the list will be ignored) and configuration is provided // to the VM via /proc/net/pnp. - Nameservers []string `protobuf:"bytes,4,rep,name=Nameservers,json=nameservers,proto3" json:"Nameservers,omitempty"` + Nameservers []string `protobuf:"bytes,4,rep,name=Nameservers,proto3" json:"Nameservers,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -441,13 +441,13 @@ func (m *IPConfiguration) GetNameservers() []string { // Message to set the machine config for a Firecracker VM type FirecrackerMachineConfiguration struct { - CPUTemplate string `protobuf:"bytes,1,opt,name=CPUTemplate,json=cPUTemplate,proto3" json:"CPUTemplate,omitempty"` - HtEnabled bool `protobuf:"varint,2,opt,name=HtEnabled,json=htEnabled,proto3" json:"HtEnabled,omitempty"` + CPUTemplate string `protobuf:"bytes,1,opt,name=CPUTemplate,proto3" json:"CPUTemplate,omitempty"` + HtEnabled bool `protobuf:"varint,2,opt,name=HtEnabled,proto3" json:"HtEnabled,omitempty"` // Specifies the memory size of VM // This lets us create a Firecracker VM of up to 4096 TiB, which // for a microVM should be large enough - MemSizeMib uint32 `protobuf:"varint,3,opt,name=MemSizeMib,json=memSizeMib,proto3" json:"MemSizeMib,omitempty"` - VcpuCount uint32 `protobuf:"varint,4,opt,name=VcpuCount,json=vcpuCount,proto3" json:"VcpuCount,omitempty"` + MemSizeMib uint32 `protobuf:"varint,3,opt,name=MemSizeMib,proto3" json:"MemSizeMib,omitempty"` + VcpuCount uint32 `protobuf:"varint,4,opt,name=VcpuCount,proto3" json:"VcpuCount,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -507,11 +507,11 @@ func (m *FirecrackerMachineConfiguration) GetVcpuCount() uint32 { // Message to specify the block device config for a Firecracker VM type FirecrackerDrive struct { - IsReadOnly bool `protobuf:"varint,1,opt,name=IsReadOnly,json=isReadOnly,proto3" json:"IsReadOnly,omitempty"` - IsRootDevice bool `protobuf:"varint,2,opt,name=IsRootDevice,json=isRootDevice,proto3" json:"IsRootDevice,omitempty"` - Partuuid string `protobuf:"bytes,3,opt,name=Partuuid,json=partuuid,proto3" json:"Partuuid,omitempty"` - PathOnHost string `protobuf:"bytes,4,opt,name=PathOnHost,json=pathOnHost,proto3" json:"PathOnHost,omitempty"` - RateLimiter *FirecrackerRateLimiter `protobuf:"bytes,5,opt,name=RateLimiter,json=rateLimiter,proto3" json:"RateLimiter,omitempty"` + IsReadOnly bool `protobuf:"varint,1,opt,name=IsReadOnly,proto3" json:"IsReadOnly,omitempty"` + IsRootDevice bool `protobuf:"varint,2,opt,name=IsRootDevice,proto3" json:"IsRootDevice,omitempty"` + Partuuid string `protobuf:"bytes,3,opt,name=Partuuid,proto3" json:"Partuuid,omitempty"` + PathOnHost string `protobuf:"bytes,4,opt,name=PathOnHost,proto3" json:"PathOnHost,omitempty"` + RateLimiter *FirecrackerRateLimiter `protobuf:"bytes,5,opt,name=RateLimiter,proto3" json:"RateLimiter,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -578,8 +578,8 @@ func (m *FirecrackerDrive) GetRateLimiter() *FirecrackerRateLimiter { // Message to specify an IO rate limiter with bytes/s and ops/s limits type FirecrackerRateLimiter struct { - Bandwidth *FirecrackerTokenBucket `protobuf:"bytes,1,opt,name=Bandwidth,json=bandwidth,proto3" json:"Bandwidth,omitempty"` - Ops *FirecrackerTokenBucket `protobuf:"bytes,2,opt,name=Ops,json=ops,proto3" json:"Ops,omitempty"` + Bandwidth *FirecrackerTokenBucket `protobuf:"bytes,1,opt,name=Bandwidth,proto3" json:"Bandwidth,omitempty"` + Ops *FirecrackerTokenBucket `protobuf:"bytes,2,opt,name=Ops,proto3" json:"Ops,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -625,9 +625,9 @@ func (m *FirecrackerRateLimiter) GetOps() *FirecrackerTokenBucket { // Message to specify a token buicket used to rate limit disk and network IO for a Firecracker VM type FirecrackerTokenBucket struct { - OneTimeBurst int64 `protobuf:"varint,1,opt,name=OneTimeBurst,json=oneTimeBurst,proto3" json:"OneTimeBurst,omitempty"` - RefillTime int64 `protobuf:"varint,2,opt,name=RefillTime,json=refillTime,proto3" json:"RefillTime,omitempty"` - Capacity int64 `protobuf:"varint,3,opt,name=Capacity,json=capacity,proto3" json:"Capacity,omitempty"` + OneTimeBurst int64 `protobuf:"varint,1,opt,name=OneTimeBurst,proto3" json:"OneTimeBurst,omitempty"` + RefillTime int64 `protobuf:"varint,2,opt,name=RefillTime,proto3" json:"RefillTime,omitempty"` + Capacity int64 `protobuf:"varint,3,opt,name=Capacity,proto3" json:"Capacity,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -694,58 +694,55 @@ func init() { func init() { proto.RegisterFile("types.proto", fileDescriptor_d938547f84707355) } var fileDescriptor_d938547f84707355 = []byte{ - // 842 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x95, 0xdd, 0x8e, 0xe3, 0x34, - 0x14, 0xc7, 0xd5, 0xc9, 0x74, 0xa6, 0x39, 0xe9, 0x2c, 0x83, 0xb5, 0x82, 0x30, 0x8b, 0xa0, 0x8a, - 0xb8, 0x28, 0xd2, 0xaa, 0x8b, 0x06, 0x81, 0xc4, 0x05, 0x5a, 0xf5, 0x63, 0x61, 0x0b, 0x74, 0x5a, - 0xb9, 0xc3, 0x5e, 0x70, 0xe7, 0x26, 0x9e, 0xd6, 0x34, 0xb1, 0x23, 0xdb, 0x69, 0xb7, 0xfb, 0x08, - 0x88, 0x77, 0xe0, 0x09, 0x78, 0x14, 0xae, 0x79, 0x1d, 0x64, 0xc7, 0x49, 0x33, 0xb3, 0xcb, 0x5e, - 0x55, 0xe7, 0x77, 0xbe, 0xec, 0xff, 0x39, 0x4e, 0x21, 0xd0, 0x87, 0x9c, 0xaa, 0x41, 0x2e, 0x85, - 0x16, 0x57, 0x9f, 0xac, 0x85, 0x58, 0xa7, 0xf4, 0x99, 0xb5, 0x56, 0xc5, 0xdd, 0x33, 0xc2, 0x0f, - 0xa5, 0x2b, 0xfa, 0xb7, 0x05, 0xfe, 0x8b, 0xd7, 0x5a, 0x92, 0x09, 0xd1, 0x04, 0x5d, 0x41, 0xe7, - 0x27, 0x25, 0xf8, 0x32, 0xa7, 0x71, 0xd8, 0xea, 0xb5, 0xfa, 0x5d, 0xdc, 0xf9, 0xdd, 0xd9, 0xe8, - 0x5b, 0x08, 0x70, 0xc1, 0xe3, 0x79, 0xae, 0x99, 0xe0, 0x2a, 0x3c, 0xe9, 0xb5, 0xfa, 0xc1, 0xf5, - 0xe3, 0x41, 0x59, 0x7a, 0x50, 0x95, 0x1e, 0x0c, 0xf9, 0x01, 0x07, 0xf2, 0x18, 0x88, 0x3e, 0x05, - 0x7f, 0xa9, 0x13, 0xc6,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, 0x00, 0xf5, 0x20, 0x70, 0xa9, - 0x37, 0x24, 0xa3, 0x56, 0x26, 0x1f, 0x07, 0xfc, 0x88, 0xd0, 0x17, 0x46, 0x28, 0xa7, 0xa9, 0x8d, - 0x39, 0xb1, 0x31, 0x17, 0xac, 0x09, 0xcd, 0x98, 0x46, 0x8c, 0x2f, 0x88, 0xde, 0x84, 0x5e, 0xcf, - 0x33, 0x63, 0x5a, 0x95, 0xa6, 0xf1, 0x98, 0x96, 0x13, 0x26, 0xed, 0x35, 0x7d, 0x7c, 0x1e, 0x97, - 0xa6, 0x59, 0xc6, 0x31, 0x89, 0x37, 0xd4, 0xb8, 0xda, 0xd6, 0xd5, 0x89, 0x9d, 0x8d, 0x9e, 0xc2, - 0xe9, 0x50, 0xae, 0x55, 0x78, 0xd6, 0xf3, 0xfa, 0xc1, 0x75, 0xf8, 0x96, 0x32, 0x06, 0x0c, 0xe5, - 0x1a, 0x9f, 0x12, 0xb9, 0x56, 0x57, 0x5f, 0xc1, 0x59, 0x69, 0xa3, 0x4b, 0xf0, 0x7e, 0xa6, 0x07, - 0x77, 0x0f, 0x6f, 0x4b, 0x0f, 0xe8, 0x31, 0xb4, 0x5f, 0x91, 0xb4, 0xa8, 0xce, 0xdd, 0xde, 0x19, - 0x23, 0xfa, 0xb3, 0x05, 0x57, 0xff, 0xaf, 0x9c, 0xd9, 0xca, 0x19, 0x89, 0x87, 0x49, 0x22, 0xa9, - 0x52, 0xae, 0x1a, 0x64, 0x35, 0x31, 0xb2, 0xbd, 0x14, 0x4a, 0x4f, 0xe8, 0xae, 0x21, 0x49, 0xb0, - 0x39, 0x22, 0xf4, 0x14, 0x3a, 0xd3, 0x85, 0x1b, 0x55, 0xb9, 0x1a, 0x97, 0x83, 0x0a, 0x54, 0xf3, - 0xe9, 0x30, 0x07, 0xa2, 0x3d, 0x7c, 0xf0, 0xc0, 0x69, 0x5a, 0x2c, 0x24, 0xcb, 0x88, 0x3c, 0x98, - 0xa6, 0xd5, 0x64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0x87, 0xa1, 0x6f, 0xc0, 0x1f, 0x11, 0x9e, 0xec, - 0x59, 0xa2, 0x37, 0xf6, 0x4e, 0x0f, 0x4a, 0xde, 0x8a, 0x2d, 0xe5, 0xa3, 0x22, 0xde, 0x52, 0x8d, - 0xfd, 0x55, 0x15, 0x89, 0xbe, 0x04, 0x6f, 0x9e, 0xab, 0x77, 0x7d, 0xbf, 0x9a, 0x09, 0x9e, 0xc8, - 0x55, 0xf4, 0xfa, 0x5e, 0xef, 0x86, 0xdb, 0x08, 0x36, 0xe7, 0xf4, 0x96, 0x65, 0x74, 0x54, 0x48, - 0xa5, 0x6d, 0x7b, 0x0f, 0x77, 0x45, 0x83, 0x19, 0x51, 0x30, 0xbd, 0x63, 0x69, 0x6a, 0x90, 0xed, - 0xe7, 0x61, 0x90, 0x35, 0x29, 0xdf, 0x73, 0x4e, 0x62, 0xa6, 0x0f, 0x56, 0x50, 0xcf, 0xbc, 0xe7, - 0xd2, 0x1e, 0x9d, 0xff, 0xd6, 0x2e, 0xff, 0x41, 0xce, 0xec, 0xcf, 0xd7, 0xff, 0x05, 0x00, 0x00, - 0xff, 0xff, 0xb5, 0x59, 0xac, 0x4c, 0xc0, 0x06, 0x00, 0x00, + // 789 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x55, 0xdd, 0x8e, 0xe3, 0x34, + 0x14, 0x56, 0x26, 0xd3, 0x6e, 0xeb, 0xce, 0x42, 0xb1, 0x56, 0x10, 0xba, 0x08, 0xaa, 0x88, 0x8b, + 0x22, 0xad, 0x32, 0x68, 0x10, 0x48, 0x5c, 0xa0, 0x55, 0x7f, 0x16, 0xb6, 0x40, 0xa7, 0x95, 0x3b, + 0xec, 0x05, 0x77, 0x9e, 0xe4, 0xb4, 0xb5, 0x9a, 0xda, 0x91, 0xe3, 0x4c, 0xb7, 0xfb, 0x08, 0x88, + 0x77, 0xe0, 0x09, 0x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0x9c, 0xd0, 0xbc, 0x7e, 0x5d, 0x72, 0x9a, 0x13, 0xa0, 0xc9, 0x9c, + 0xa7, 0x07, 0xfb, 0xb8, 0x1d, 0x04, 0x87, 0xe8, 0x6a, 0x9a, 0x13, 0x21, 0xf4, 0x38, 0x58, 0x0c, + 0xf6, 0x4c, 0x27, 0x98, 0x5e, 0xbf, 0x05, 0x95, 0xaa, 0x28, 0x58, 0x62, 0xbd, 0xab, 0x63, 0x5d, + 0x5f, 0x2f, 0xef, 0x9c, 0xeb, 0x91, 0xda, 0xbd, 0x75, 0x10, 0xfc, 0x3d, 0xea, 0xb8, 0x6f, 0xbf, + 0xf1, 0xfe, 0xb7, 0xef, 0x6a, 0xc3, 0x37, 0xe8, 0xe3, 0x77, 0xcb, 0xf0, 0xb7, 0xa8, 0x3d, 0xa2, + 0x3c, 0xd9, 0xb3, 0x44, 0x6d, 0xcc, 0x9d, 0xce, 0x4a, 0xde, 0x89, 0x2d, 0xf0, 0x51, 0x11, 0x6f, + 0x41, 0x91, 0xa3, 0x12, 0x7f, 0x85, 0xfc, 0x79, 0x96, 0xbf, 0xeb, 0xfb, 0xe5, 0x26, 0x68, 0x4d, + 0xf8, 0xfa, 0xa4, 0xb7, 0x43, 0x6b, 0xc3, 0xe6, 0x1c, 0xee, 0xd8, 0x0e, 0x46, 0x85, 0xcc, 0x95, + 0x69, 0xef, 0x93, 0x13, 0x4c, 0x9b, 0x42, 0x60, 0xc5, 0xd2, 0x54, 0x43, 0xa6, 0x9f, 0x4f, 0x1c, + 0xa4, 0x7c, 0xcf, 0x19, 0x8d, 0x99, 0x3a, 0x18, 0x43, 0x7d, 0x52, 0xc7, 0xa3, 0x47, 0xbf, 0x37, + 0xca, 0x5f, 0x90, 0xa6, 0xf9, 0xf3, 0xcd, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x79, 0x8c, 0x09, + 0x9d, 0xc0, 0x06, 0x00, 0x00, } diff --git a/runtime/service.go b/runtime/service.go index 7dca20958..fab812f8b 100644 --- a/runtime/service.go +++ b/runtime/service.go @@ -67,6 +67,7 @@ const ( defaultVsockPort = 10789 minVsockIOPort = uint32(11000) firecrackerStartTimeout = 5 * time.Second + defaultStopVMTimeout = 5 * time.Second // StartEventName is the topic published to when a VM starts StartEventName = "/firecracker-vm/start" @@ -499,6 +500,11 @@ func (s *service) createVM(requestCtx context.Context, request *proto.CreateVMRe // created yet and the timeout is hit waiting for it to exist, an error will be returned but the shim will // continue to shutdown. func (s *service) StopVM(requestCtx context.Context, request *proto.StopVMRequest) (_ *empty.Empty, err error) { + timeout := defaultStopVMTimeout + if request.TimeoutSeconds > 0 { + timeout = time.Duration(request.TimeoutSeconds) * time.Second + } + timer := time.NewTimer(timeout) defer logPanicAndDie(s.logger) // If something goes wrong here, just shut down ungracefully. This eliminates some scenarios that would result // in the user being unable to shut down the VM. @@ -514,14 +520,22 @@ func (s *service) StopVM(requestCtx context.Context, request *proto.StopVMReques return nil, err } - // The graceful shutdown logic, including stopping the VM, is centralized in Shutdown. We set "Now" to true - // to ensure that the service will actually shutdown even if there are still containers being managed. - _, err = s.Shutdown(requestCtx, &taskAPI.ShutdownRequest{Now: true}) - if err != nil { - return nil, err - } + shutdownCh := make(chan error) + go func() { + defer close(shutdownCh) + _, err := s.Shutdown(requestCtx, &taskAPI.ShutdownRequest{Now: true}) + shutdownCh <- err + }() - return &empty.Empty{}, nil + select { + case <-timer.C: + return nil, status.Error(codes.DeadlineExceeded, "timed out waiting for VM shutdown") + case err = <-shutdownCh: + if err != nil { + return nil, err + } + return &empty.Empty{}, nil + } } // GetVMInfo returns metadata for the VM being managed by this shim. If the VM has not been created yet, this diff --git a/runtime/service_integ_test.go b/runtime/service_integ_test.go index ed6b3ee38..21a7149c5 100644 --- a/runtime/service_integ_test.go +++ b/runtime/service_integ_test.go @@ -441,7 +441,7 @@ func TestMultipleVMs_Isolated(t *testing.T) { containerWg.Wait() - _, err = fcClient.StopVM(ctx, &proto.StopVMRequest{VMID: strconv.Itoa(vmID)}) + _, err = fcClient.StopVM(ctx, &proto.StopVMRequest{VMID: strconv.Itoa(vmID), TimeoutSeconds: 5}) require.NoError(t, err, "failed to stop VM %d", vmID) }(vmID) }