@@ -152,9 +152,8 @@ type service struct {
152
152
vsockPortMu sync.Mutex
153
153
154
154
// httpControlClient is to send pause/resume/snapshot commands to the microVM
155
- httpControlClient * http.Client
156
- firecrackerPid int
157
- taskDrivePathOnHost string
155
+ httpControlClient * http.Client
156
+ firecrackerPid int
158
157
}
159
158
160
159
func shimOpts (shimCtx context.Context ) (* shim.Opts , error ) {
@@ -838,7 +837,7 @@ func (s *service) CreateSnapshot(ctx context.Context, req *proto.CreateSnapshotR
838
837
// Offload Shuts down a VM and deletes the corresponding firecracker socket
839
838
// and vsock. All of the other resources will persist
840
839
func (s * service ) Offload (ctx context.Context , req * proto.OffloadRequest ) (* empty.Empty , error ) {
841
- if err := syscall .Kill (s .firecrackerPid , 9 ); err != nil {
840
+ if err := syscall .Kill (s .firecrackerPid , syscall . SIGKILL ); err != nil {
842
841
s .logger .WithError (err ).Error ("Failed to kill firecracker process" )
843
842
return nil , err
844
843
}
@@ -1061,8 +1060,6 @@ func (s *service) Create(requestCtx context.Context, request *taskAPI.CreateTask
1061
1060
}
1062
1061
rootfsMnt := request .Rootfs [0 ]
1063
1062
1064
- s .taskDrivePathOnHost = rootfsMnt .Source
1065
-
1066
1063
err = s .containerStubHandler .Reserve (requestCtx , request .ID ,
1067
1064
rootfsMnt .Source , vmBundleDir .RootfsPath (), "ext4" , nil , s .driveMountClient , s .machine )
1068
1065
if err != nil {
0 commit comments