From ebff21d13a6b540f04790a8f2fe2806ca85a7cad Mon Sep 17 00:00:00 2001 From: srstack Date: Thu, 12 May 2022 23:07:19 +0800 Subject: [PATCH 1/2] init --- pkg/cluster/operation/check.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkg/cluster/operation/check.go b/pkg/cluster/operation/check.go index 6da90e1493..28d9c58352 100644 --- a/pkg/cluster/operation/check.go +++ b/pkg/cluster/operation/check.go @@ -166,6 +166,17 @@ func checkOSInfo(opt *CheckOptions, osInfo *sysinfo.OS) *CheckResult { // check OS vendor switch osInfo.Vendor { + case "kylin": + /// kylin v10 support is not fully tested, but we suppose it should work + msg := "kylin support is not fully tested, be careful" + result.Err = fmt.Errorf("%s (%s)", result.Msg, msg) + result.Warn = true + if ver, _ := strconv.ParseFloat(osInfo.Version, 64); ver < 10 { + result.Err = fmt.Errorf("%s %s not supported, use version 10 or higher (%s)", + osInfo.Name, osInfo.Release, msg) + result.Warn = false + return result + } case "amzn": // Amazon Linux 2 is based on CentOS 7 and is recommended for // AWS Graviton 2 (ARM64) deployments. From 0d95f4aac0825f8961812f414abc14b29249a3de Mon Sep 17 00:00:00 2001 From: srstack Date: Mon, 16 May 2022 18:26:28 +0800 Subject: [PATCH 2/2] cluster: Add Kylin Linux as supported OS --- pkg/cluster/operation/check.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/cluster/operation/check.go b/pkg/cluster/operation/check.go index 28d9c58352..bc2891d9be 100644 --- a/pkg/cluster/operation/check.go +++ b/pkg/cluster/operation/check.go @@ -167,14 +167,13 @@ func checkOSInfo(opt *CheckOptions, osInfo *sysinfo.OS) *CheckResult { // check OS vendor switch osInfo.Vendor { case "kylin": - /// kylin v10 support is not fully tested, but we suppose it should work msg := "kylin support is not fully tested, be careful" result.Err = fmt.Errorf("%s (%s)", result.Msg, msg) result.Warn = true - if ver, _ := strconv.ParseFloat(osInfo.Version, 64); ver < 10 { - result.Err = fmt.Errorf("%s %s not supported, use version 10 or higher (%s)", + // VERSION_ID="V10" + if ver, _ := strconv.ParseFloat(strings.Trim(osInfo.Version, "V"), 64); ver < 10 { + result.Err = fmt.Errorf("%s %s not supported, use version V10 or higher(%s)", osInfo.Name, osInfo.Release, msg) - result.Warn = false return result } case "amzn":