FC: change minimum supported version of Firecracker to v0.21.1

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 <penny.zheng@arm.com>
This commit is contained in:
Penny Zheng 2020-03-09 10:53:15 +08:00
parent aadf8c4a01
commit d60902a95e

View File

@ -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
@ -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
}