mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-26 07:22:20 +00:00
clh: update minimal supported version to check.
Kata now uses v0.5.0 and is not compatible with old versions. Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
This commit is contained in:
parent
20332298ab
commit
33459779c4
@ -59,7 +59,7 @@ const (
|
|||||||
virtioFsSocket = "virtiofsd.sock"
|
virtioFsSocket = "virtiofsd.sock"
|
||||||
clhSerial = "serial-tty.log"
|
clhSerial = "serial-tty.log"
|
||||||
supportedMajorVersion = 0
|
supportedMajorVersion = 0
|
||||||
supportedMinorVersion = 3
|
supportedMinorVersion = 5
|
||||||
defaultClhPath = "/usr/local/bin/cloud-hypervisor"
|
defaultClhPath = "/usr/local/bin/cloud-hypervisor"
|
||||||
virtioFsCacheAlways = "always"
|
virtioFsCacheAlways = "always"
|
||||||
maxClhVcpus = uint32(64)
|
maxClhVcpus = uint32(64)
|
||||||
@ -676,7 +676,6 @@ func (clh *cloudHypervisor) getAvailableVersion() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remove 'v' prefix if has one
|
// Remove 'v' prefix if has one
|
||||||
clh.Logger().Error("DEBUG :", versionSplit[0])
|
|
||||||
versionSplit[0] = strings.TrimLeft(versionSplit[0], "v")
|
versionSplit[0] = strings.TrimLeft(versionSplit[0], "v")
|
||||||
major, err := strconv.ParseUint(versionSplit[0], 10, 64)
|
major, err := strconv.ParseUint(versionSplit[0], 10, 64)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -689,11 +688,12 @@ func (clh *cloudHypervisor) getAvailableVersion() error {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
revisionStr := strings.SplitN(versionSplit[2], "-", -1)
|
// revision could have aditional commit information separated by '-'
|
||||||
if len(revisionStr) < 1 {
|
revisionSplit := strings.SplitN(versionSplit[2], "-", -1)
|
||||||
return errors.Errorf("Failed parse clh revision %s", versionSplit[2])
|
if len(revisionSplit) < 1 {
|
||||||
|
return errors.Errorf("Failed parse cloud-hypervisor revision %s", versionSplit[2])
|
||||||
}
|
}
|
||||||
revision, err := strconv.ParseUint(revisionStr[0], 10, 64)
|
revision, err := strconv.ParseUint(revisionSplit[0], 10, 64)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user