From d60902a95e71d6711eadcfbd953062ded2f3b03b Mon Sep 17 00:00:00 2001 From: Penny Zheng Date: Mon, 9 Mar 2020 10:53:15 +0800 Subject: [PATCH] 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 --- virtcontainers/fc.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/virtcontainers/fc.go b/virtcontainers/fc.go index 9293984a95..26a60cb2ce 100644 --- a/virtcontainers/fc.go +++ b/virtcontainers/fc.go @@ -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 }