Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
FC: Removed redundant RescanBlockDevice action
Browse files Browse the repository at this point in the history
Firecracker has removed RescanBlockDevice from the /actions API.
Related PR: firecracker-microvm/firecracker#1542.
We need to remove according settings in kata-containers.

Fixes: #2504

Signed-off-by: Penny Zheng <[email protected]>
  • Loading branch information
Pennyzct committed Mar 23, 2020
1 parent 37b91b3 commit d2cae59
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 25 deletions.
14 changes: 0 additions & 14 deletions virtcontainers/fc.go
Original file line number Diff line number Diff line change
Expand Up @@ -934,20 +934,6 @@ func (fc *firecracker) fcUpdateBlockDrive(path, id string) error {
return err
}

// Rescan needs to used only if the VM is running
if fc.vmRunning() {
actionParams := ops.NewCreateSyncActionParams()
actionType := "BlockDeviceRescan"
actionInfo := &models.InstanceActionInfo{
ActionType: &actionType,
Payload: id,
}
actionParams.SetInfo(actionInfo)
if _, err := fc.client().Operations.CreateSyncAction(actionParams); err != nil {
return err
}
}

return nil
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions virtcontainers/pkg/firecracker/firecracker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -449,12 +449,9 @@ definitions:
description: Enumeration indicating what type of action is contained in the payload
type: string
enum:
- BlockDeviceRescan
- FlushMetrics
- InstanceStart
- SendCtrlAltDel
payload:
type: string

InstanceInfo:
type: object
Expand Down

0 comments on commit d2cae59

Please sign in to comment.