Skip to content

Commit

Permalink
Bump Kubevirt to version that supports Vm freeze (#20)
Browse files Browse the repository at this point in the history
* Bump Kubevirt to newer version that supports Vm freeze

A latest Kubevirt v48.1 wich contains "Added virt-freezer
kubevirt/kubevirt#6124" is used.

Signed-off-by: Bartosz Rybacki <[email protected]>

* Bump Kubernetes - 1.21

Signed-off-by: Bartosz Rybacki <[email protected]>

* Cleanup makefile target - go mod

Signed-off-by: Bartosz Rybacki <[email protected]>

* Vendor in CDI 1.40

Vendor in newer CDI To get a NodePull method.

Signed-off-by: Bartosz Rybacki <[email protected]>

* Use a vm with guest agent enabled

To correctly use freeze-unfreeze a guest agent has
to be installed in vm. Tests need to Wait for a
vm condition AgentConnected.

New VM image is bigger, so a NodePull method is used
to utilize node cache.

Signed-off-by: Bartosz Rybacki <[email protected]>

* Do not fail in the AfterEach

Signed-off-by: Bartosz Rybacki <[email protected]>

* Fix one and Exclude one test

One test is failing and needs to be investigated

Signed-off-by: Bartosz Rybacki <[email protected]>
  • Loading branch information
brybacki authored Dec 18, 2021
1 parent d15dfc1 commit 0340c7e
Show file tree
Hide file tree
Showing 530 changed files with 30,970 additions and 5,104 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,11 @@ ${TESTS_OUT_DIR}:
@mkdir -p ${TESTS_OUT_DIR}

modules:
@${DO} "GO111MODULE=on go mod tidy -v"
GO111MODULE=on go mod tidy -v

vendor:
@${DO} "GO111MODULE=on go mod tidy -v"
@${DO} "GO111MODULE=on go mod vendor -v"
GO111MODULE=on go mod tidy -v
GO111MODULE=on go mod vendor -v

goveralls: test
${DO} "TRAVIS_JOB_ID=${TRAVIS_JOB_ID} TRAVIS_PULL_REQUEST=${TRAVIS_PULL_REQUEST} TRAVIS_BRANCH=${TRAVIS_BRANCH} ./hack/build/goveralls.sh"
Expand Down
2 changes: 1 addition & 1 deletion cluster-up/hack/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fi


KUBEVIRTCI_CLUSTER_PATH=${KUBEVIRTCI_CLUSTER_PATH:-${KUBEVIRTCI_PATH}/cluster}
KUBEVIRT_PROVIDER=${KUBEVIRT_PROVIDER:-k8s-1.19}
KUBEVIRT_PROVIDER=${KUBEVIRT_PROVIDER:-k8s-1.21}
KUBEVIRT_NUM_NODES=${KUBEVIRT_NUM_NODES:-1}
KUBEVIRT_MEMORY_SIZE=${KUBEVIRT_MEMORY_SIZE:-5120M}
KUBEVIRT_NUM_SECONDARY_NICS=${KUBEVIRT_NUM_SECONDARY_NICS:-0}
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ go 1.16
require (
github.com/google/gofuzz v1.2.0 // indirect
github.com/hashicorp/go-plugin v1.0.1-0.20190610192547-a1bc61569a26 // indirect
github.com/onsi/ginkgo v1.14.1
github.com/onsi/gomega v1.10.2
github.com/onsi/ginkgo v1.16.4
github.com/onsi/gomega v1.17.0
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.6.0
github.com/spf13/pflag v1.0.5
Expand All @@ -17,7 +17,7 @@ require (
k8s.io/client-go v12.0.0+incompatible
k8s.io/klog/v2 v2.4.0
kubevirt.io/client-go v0.43.0
kubevirt.io/containerized-data-importer v1.35.0
kubevirt.io/containerized-data-importer v1.40.0
kubevirt.io/qe-tools v0.1.6
)

Expand Down
113 changes: 31 additions & 82 deletions go.sum

Large diffs are not rendered by default.

16 changes: 11 additions & 5 deletions hack/cluster-up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,17 @@ source ./cluster-up/up.sh
# Deploy KubeVirt
_kubectl apply -f https://github.com/kubevirt/kubevirt/releases/download/${KUBEVIRT_VERSION}/kubevirt-operator.yaml
_kubectl apply -f https://github.com/kubevirt/kubevirt/releases/download/${KUBEVIRT_VERSION}/kubevirt-cr.yaml
_kubectl wait -n kubevirt deployment/virt-operator --for=condition=Available --timeout=${KUBEVIRT_DEPLOYMENT_TIMEOUT}s

# Deploy CDI
_kubectl apply -f https://github.com/kubevirt/containerized-data-importer/releases/download/${CDI_VERSION}/cdi-operator.yaml
_kubectl apply -f https://github.com/kubevirt/containerized-data-importer/releases/download/${CDI_VERSION}/cdi-cr.yaml


# pre fetch fedora test image
${_ssh} node01 "sudo docker pull quay.io/kubevirt/fedora-with-test-tooling-container-disk"


_kubectl wait -n kubevirt deployment/virt-operator --for=condition=Available --timeout=${KUBEVIRT_DEPLOYMENT_TIMEOUT}s

# Ensure the KubeVirt CR is created
count=0
Expand All @@ -44,7 +53,4 @@ until _kubectl wait -n kubevirt kv kubevirt --for condition=Available --timeout
sleep 1m
done

# Deploy CDI
_kubectl apply -f https://github.com/kubevirt/containerized-data-importer/releases/download/${CDI_VERSION}/cdi-operator.yaml
_kubectl apply -f https://github.com/kubevirt/containerized-data-importer/releases/download/${CDI_VERSION}/cdi-cr.yaml
_kubectl wait -n cdi deployment/cdi-operator --for=condition=Available --timeout=${KUBEVIRT_DEPLOYMENT_TIMEOUT}s
_kubectl wait -n cdi deployment/cdi-operator --for=condition=Available --timeout=${KUBEVIRT_DEPLOYMENT_TIMEOUT}s
10 changes: 1 addition & 9 deletions hack/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@ TESTS_OUT_DIR=${OUT_DIR}/tests
BUILD_DIR=${PLUGIN_DIR}/hack/build
CACHE_DIR=${OUT_DIR}/gocache


# update this whenever builder Dockerfile is updated
BUILDER_TAG=${BUILDER_TAG:-0.1}
BUILDER_CONTAINER_NAME=kubevirt-velero-plugin-builder
UNTAGGED_BUILDER_IMAGE=${BUILDER_IMAGE:-quay.io/kubevirt/${BUILDER_CONTAINER_NAME}}
BUILDER_IMAGE=${UNTAGGED_BUILDER_IMAGE}:${BUILDER_TAG}
BUILDER_SPEC="${BUILD_DIR}/docker/builder"

DOCKER_HOST_SOCK=${DOCKER_HOST_SOCK:-/run/docker.sock}
DOCKER_GUEST_SOCK=${DOCKER_GUEST_SOCK:-/run/docker.sock}
DOCKER_CMD=${DOCKER_CMD:-docker -H unix://${DOCKER_HOST_SOCK}}
Expand All @@ -57,6 +49,6 @@ USE_CSI=${USE_CSI:-1}
USE_RESTIC=${USE_RESTIC:-0}
CSI_PLUGIN=${CSI_PLUGIN:-velero/velero-plugin-for-csi:v0.2.0}

KUBEVIRT_VERSION=${KUBEVIRT_VERSION:-v0.44.3}
KUBEVIRT_VERSION=${KUBEVIRT_VERSION:-v0.48.1}
CDI_VERSION=${CDI_VERSION:-v1.40.0}
KUBEVIRT_DEPLOYMENT_TIMEOUT=${KUBEVIRT_DEPLOYMENT_TIMEOUT:-480}
Loading

0 comments on commit 0340c7e

Please sign in to comment.