mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-22 13:38:26 +00:00
FC: Removed redundant RescanBlockDevice
action
Firecracker has removed RescanBlockDevice from the /actions API. Related PR: https://github.com/firecracker-microvm/firecracker/pull/1542. We need to remove according settings in kata-containers. Fixes: #2504 Signed-off-by: Penny Zheng <penny.zheng@arm.com>
This commit is contained in:
parent
37b91b3378
commit
d2cae59ec7
@ -934,20 +934,6 @@ func (fc *firecracker) fcUpdateBlockDrive(path, id string) error {
|
|||||||
return err
|
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
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,11 +21,8 @@ type InstanceActionInfo struct {
|
|||||||
|
|
||||||
// Enumeration indicating what type of action is contained in the payload
|
// Enumeration indicating what type of action is contained in the payload
|
||||||
// Required: true
|
// Required: true
|
||||||
// Enum: [BlockDeviceRescan FlushMetrics InstanceStart SendCtrlAltDel]
|
// Enum: [FlushMetrics InstanceStart SendCtrlAltDel]
|
||||||
ActionType *string `json:"action_type"`
|
ActionType *string `json:"action_type"`
|
||||||
|
|
||||||
// payload
|
|
||||||
Payload string `json:"payload,omitempty"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate validates this instance action info
|
// Validate validates this instance action info
|
||||||
@ -46,7 +43,7 @@ var instanceActionInfoTypeActionTypePropEnum []interface{}
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
var res []string
|
var res []string
|
||||||
if err := json.Unmarshal([]byte(`["BlockDeviceRescan","FlushMetrics","InstanceStart","SendCtrlAltDel"]`), &res); err != nil {
|
if err := json.Unmarshal([]byte(`["FlushMetrics","InstanceStart","SendCtrlAltDel"]`), &res); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
for _, v := range res {
|
for _, v := range res {
|
||||||
@ -56,9 +53,6 @@ func init() {
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
||||||
// InstanceActionInfoActionTypeBlockDeviceRescan captures enum value "BlockDeviceRescan"
|
|
||||||
InstanceActionInfoActionTypeBlockDeviceRescan string = "BlockDeviceRescan"
|
|
||||||
|
|
||||||
// InstanceActionInfoActionTypeFlushMetrics captures enum value "FlushMetrics"
|
// InstanceActionInfoActionTypeFlushMetrics captures enum value "FlushMetrics"
|
||||||
InstanceActionInfoActionTypeFlushMetrics string = "FlushMetrics"
|
InstanceActionInfoActionTypeFlushMetrics string = "FlushMetrics"
|
||||||
|
|
||||||
|
@ -449,12 +449,9 @@ definitions:
|
|||||||
description: Enumeration indicating what type of action is contained in the payload
|
description: Enumeration indicating what type of action is contained in the payload
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
- BlockDeviceRescan
|
|
||||||
- FlushMetrics
|
- FlushMetrics
|
||||||
- InstanceStart
|
- InstanceStart
|
||||||
- SendCtrlAltDel
|
- SendCtrlAltDel
|
||||||
payload:
|
|
||||||
type: string
|
|
||||||
|
|
||||||
InstanceInfo:
|
InstanceInfo:
|
||||||
type: object
|
type: object
|
||||||
|
Loading…
Reference in New Issue
Block a user