From 2f66caa07550416049f8a9a52be5ad67e4c7f03f Mon Sep 17 00:00:00 2001 From: wangxu Date: Sun, 27 Feb 2022 13:41:48 +0800 Subject: [PATCH 1/2] remove duplicates in Makefile Signed-off-by: wangxu --- Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Makefile b/Makefile index 6d6e7bd6715..3b7758eb28b 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,6 @@ DOCKER_BUILD += docker-build-jindoruntime-controller DOCKER_BUILD += docker-build-goosefsruntime-controller DOCKER_BUILD += docker-build-csi DOCKER_BUILD += docker-build-webhook -DOCKER_BUILD += docker-build-goosefsruntime-controller DOCKER_BUILD += docker-build-juicefsruntime-controller DOCKER_BUILD += docker-build-init-users @@ -56,7 +55,6 @@ DOCKER_BUILD += docker-build-init-users DOCKER_PUSH := docker-push-dataset-controller DOCKER_PUSH += docker-push-alluxioruntime-controller DOCKER_PUSH += docker-push-jindoruntime-controller -DOCKER_PUSH += docker-push-jindoruntime-controller DOCKER_PUSH += docker-push-csi DOCKER_PUSH += docker-push-webhook DOCKER_PUSH += docker-push-goosefsruntime-controller From 64b6e77593ef1ef95eb0de3587b875d222a52606 Mon Sep 17 00:00:00 2001 From: wangxu Date: Wed, 2 Mar 2022 15:42:42 +0800 Subject: [PATCH 2/2] deal with issue 1476 Signed-off-by: wangxu --- pkg/ddc/alluxio/operations/cached.go | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/pkg/ddc/alluxio/operations/cached.go b/pkg/ddc/alluxio/operations/cached.go index 77fdbe803d3..baa4ecef1a3 100644 --- a/pkg/ddc/alluxio/operations/cached.go +++ b/pkg/ddc/alluxio/operations/cached.go @@ -61,26 +61,13 @@ func (a AlluxioFileUtils) CachedState() (cached int64, err error) { // clean cache with a preset timeout of 60s func (a AlluxioFileUtils) CleanCache(path string) (err error) { var ( - releaseVersion = []string{"cat", "/etc/issue"} command = []string{"60", "alluxio", "fs", "free", "-f", path} stdout string stderr string ) - stdout, stderr, err = a.exec(releaseVersion, false) - if err != nil { - err = fmt.Errorf("execute command %v with expectedErr: %v stdout %s and stderr %s", releaseVersion, err, stdout, stderr) - return - } - - if strings.Contains(stdout, "Ubuntu") { - command = append([]string{"timeout"}, command...) - } else if strings.Contains(stdout, "Alpine") { - command = append([]string{"timeout", "-t"}, command...) - } else { - err = fmt.Errorf("unknow release version for linux") - return - } +//TODO : find solution to use "timeout" or "timeout -t" in different linux release + command = append([]string{"timeout"}, command...) stdout, stderr, err = a.exec(command, false) if err != nil {