From 0b56e939a2843b48a0651cf88ba3659c064ea7d4 Mon Sep 17 00:00:00 2001 From: Gabriela Cervantes Date: Mon, 25 May 2020 11:06:15 -0500 Subject: [PATCH] ci: Enable RHEL 8 CI This PR enables rhel 8 CI. In this PR, we skipped the tests that are not running on RHEL 8 as well as a modification in the setup.sh Fixes #2540 Signed-off-by: Gabriela Cervantes --- .ci/setup.sh | 5 ++++- functional/state_test.go | 2 +- integration/docker/package_manager_test.go | 24 ++++++++++++++++++++++ tracing/tracing-test.sh | 9 ++++++++ 4 files changed, 38 insertions(+), 2 deletions(-) diff --git a/.ci/setup.sh b/.ci/setup.sh index 870f4f4b0..4d67ba99d 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -168,7 +168,10 @@ main() { sudo -E PATH=$PATH bash -c "echo 3 > /proc/sys/vm/drop_caches" if [ "$ID" == rhel ]; then - sudo -E PATH=$PATH bash -c "echo 1 > /proc/sys/fs/may_detach_mounts" + major_version=$(echo $VERSION_ID | cut -d '.' -f1) + if [ "${major_version}" == "7" ]; then + sudo -E PATH=$PATH bash -c "echo 1 > /proc/sys/fs/may_detach_mounts" + fi fi } diff --git a/functional/state_test.go b/functional/state_test.go index c78ce84bf..84695c2f3 100644 --- a/functional/state_test.go +++ b/functional/state_test.go @@ -57,7 +57,7 @@ var _ = Describe("state", func() { DescribeTable("container", func(status string, waitTime int) { - if distroID() == "centos" { + if distroID() == "centos" || distroID() == "rhel" { Skip("Issue:https://github.com/kata-containers/tests/issues/2264") } diff --git a/integration/docker/package_manager_test.go b/integration/docker/package_manager_test.go index bff29c8f8..3b99de8f7 100644 --- a/integration/docker/package_manager_test.go +++ b/integration/docker/package_manager_test.go @@ -7,6 +7,7 @@ package docker import ( "fmt" "os" + "os/exec" . "github.com/kata-containers/tests" . "github.com/onsi/ginkgo" @@ -18,6 +19,20 @@ const ( packageManagerMaxTries = 5 ) +func versionID() string { + pathFile := "/etc/os-release" + if _, err := os.Stat(pathFile); os.IsNotExist(err) { + pathFile = "/usr/lib/os-release" + } + cmd := exec.Command("sh", "-c", fmt.Sprintf("source %s; echo -n $VERSION_ID", pathFile)) + id, err := cmd.CombinedOutput() + if err != nil { + LogIfFail("couldn't find version ID %s\n", err) + return "" + } + return string(id) +} + func tryPackageManagerCommand(container string, command []string, expectedExitCode int) int { cmd := []string{container} exitCode := int(-1) @@ -74,6 +89,10 @@ var _ = Describe("[Serial Test] package manager update test", func() { Skip("Skip issue: https://github.com/kata-containers/tests/issues/2008") } + if distroID() == "rhel" && versionID() >= "8" { + Skip("Issue:https://github.com/kata-containers/runtime/issues/2580") + } + // This Fedora version is used mainly because of https://github.com/kata-containers/tests/issues/2358 args = append(args, "-td", "--name", id, Fedora30Image, "sh") _, _, exitCode := dockerRun(args...) @@ -96,6 +115,11 @@ var _ = Describe("[Serial Test] package manager update test", func() { if KataConfig.Hypervisor[KataHypervisor].SharedFS == "virtio-fs" { Skip("Skip issue: https://github.com/kata-containers/tests/issues/2008") } + + if distroID() == "rhel" && versionID() >= "8" { + Skip("Issue:https://github.com/kata-containers/runtime/issues/2580") + } + args = append(args, "--rm", "-td", "--name", id, CentosImage, "sh") _, _, exitCode := dockerRun(args...) Expect(exitCode).To(BeZero()) diff --git a/tracing/tracing-test.sh b/tracing/tracing-test.sh index 3c4bf871a..55d95a0e7 100755 --- a/tracing/tracing-test.sh +++ b/tracing/tracing-test.sh @@ -9,6 +9,8 @@ set -o nounset set -o pipefail set -o errtrace +source /etc/os-release || source /usr/lib/os-release + DEBUG=${DEBUG:-} [ -n "$DEBUG" ] && set -o xtrace @@ -23,6 +25,13 @@ jaeger_server=${jaeger_server:-localhost} jaeger_ui_port=${jaeger_ui_port:-16686} jaeger_docker_container_name="jaeger" +issue="https://github.com/kata-containers/tests/issues/2566" + +if [ "$ID" == rhel ]; then + echo "Skip tracing test on $ID, see: $issue" + exit +fi + # Cleanup will remove Jaeger container and # disable tracing. cleanup(){