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

Commit

Permalink
FC: change minimum supported version of Firecracker to v0.21.1
Browse files Browse the repository at this point in the history
Some changes in Firecracker v0.21.1 is incompatible with the old versions.
So we need to update the minimum supported FC version to v0.21.1

Fixes: #2504

Signed-off-by: Penny Zheng <[email protected]>
  • Loading branch information
Pennyzct committed Mar 23, 2020
1 parent aadf8c4 commit d60902a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions virtcontainers/fc.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const (
)

// Specify the minimum version of firecracker supported
var fcMinSupportedVersion = semver.MustParse("0.19.0")
var fcMinSupportedVersion = semver.MustParse("0.21.1")

var fcKernelParams = append(commonVirtioblkKernelRootParams, []Param{
// The boot source is the first partition of the first block device added
Expand Down Expand Up @@ -300,7 +300,9 @@ func (fc *firecracker) getVersionNumber() (string, error) {
var version string
fields := strings.Split(string(data), " ")
if len(fields) > 1 {
version = strings.TrimSpace(fields[1])
// The output format of `Firecracker --verion` is as follows
// Firecracker v0.21.1
version = strings.TrimPrefix(strings.TrimSpace(fields[1]), "v")
return version, nil
}

Expand Down

0 comments on commit d60902a

Please sign in to comment.