mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-29 16:57:18 +00:00
firecracker: Add support for v0.15.x
Add support for v0.15.x. Change the drive naming scheme to match the requirement of v0.15.x Fixes: #1598 Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
This commit is contained in:
parent
437b3cb2f7
commit
f75b7fed7e
@ -390,12 +390,16 @@ func (fc *firecracker) startSandbox(timeout int) error {
|
|||||||
return fc.waitVMM(timeout)
|
return fc.waitVMM(timeout)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func fcDriveIndexToID(i int) string {
|
||||||
|
return "drive_" + strconv.Itoa(i)
|
||||||
|
}
|
||||||
|
|
||||||
func (fc *firecracker) createDiskPool() error {
|
func (fc *firecracker) createDiskPool() error {
|
||||||
span, _ := fc.trace("createDiskPool")
|
span, _ := fc.trace("createDiskPool")
|
||||||
defer span.Finish()
|
defer span.Finish()
|
||||||
|
|
||||||
for i := 0; i < fcDiskPoolSize; i++ {
|
for i := 0; i < fcDiskPoolSize; i++ {
|
||||||
driveID := "drive-" + strconv.Itoa(i)
|
driveID := fcDriveIndexToID(i)
|
||||||
driveParams := ops.NewPutGuestDriveByIDParams()
|
driveParams := ops.NewPutGuestDriveByIDParams()
|
||||||
driveParams.SetDriveID(driveID)
|
driveParams.SetDriveID(driveID)
|
||||||
isReadOnly := false
|
isReadOnly := false
|
||||||
@ -566,7 +570,7 @@ func (fc *firecracker) fcUpdateBlockDrive(drive config.BlockDrive) error {
|
|||||||
|
|
||||||
// Use the global block index as an index into the pool of the devices
|
// Use the global block index as an index into the pool of the devices
|
||||||
// created for firecracker.
|
// created for firecracker.
|
||||||
driveID := "drive-" + strconv.Itoa(drive.Index)
|
driveID := fcDriveIndexToID(drive.Index)
|
||||||
driveParams := ops.NewPatchGuestDriveByIDParams()
|
driveParams := ops.NewPatchGuestDriveByIDParams()
|
||||||
driveParams.SetDriveID(driveID)
|
driveParams.SetDriveID(driveID)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user