Skip to content

Commit

Permalink
[release-1.12] Enable VM live update rollout strategy always (#2986)
Browse files Browse the repository at this point in the history
* [release-1.2] Enable VM live update rollout strategy always

Signed-off-by: Jed Lejosne <jed@redhat.com>

* Skip test test_id:6867

Kubevirt test_id:6867 is currently broken,
it will be fixed with kubevirt/kubevirt#12073
It's not a blocker/critical issue so we can temporarely tolerate it.
The test will be enabled back when we will be able to consume a
newer and fixed Kubevirt release.

Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>

---------

Signed-off-by: Jed Lejosne <jed@redhat.com>
Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>
Co-authored-by: Jed Lejosne <jed@redhat.com>
  • Loading branch information
tiraboschi and jean-edouard committed Jun 8, 2024
1 parent c46a1b5 commit ea70684
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ var _ = Describe("HyperconvergedController", func() {
"VMPersistentState",
"NetworkBindingPlugins",
"CommonInstancetypesDeploymentGate",
"VMLiveUpdateFeatures",
}
// Get the KV
kvList := &kubevirtcorev1.KubeVirtList{}
Expand Down
5 changes: 5 additions & 0 deletions controllers/operands/kubevirt.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ const (

// Deploy common-instancetypes using virt-operator
kvDeployCommonInstancetypes = "CommonInstancetypesDeploymentGate"

// Enable VM live update, to allow live propagation of VM changes to their VMI
kvVMLiveUpdateFeatures = "VMLiveUpdateFeatures"
)

const (
Expand All @@ -142,6 +145,7 @@ var (
kvVMPersistentState,
kvHNetworkBindingPluginsGate,
kvDeployCommonInstancetypes,
kvVMLiveUpdateFeatures,
}

// holds a list of mandatory KubeVirt feature gates. Some of them are the hard coded feature gates and some of
Expand Down Expand Up @@ -451,6 +455,7 @@ func getKVConfig(hc *hcov1beta1.HyperConverged) (*kubevirtcorev1.KubeVirtConfigu
SeccompConfiguration: seccompConfig,
EvictionStrategy: hc.Spec.EvictionStrategy,
KSMConfiguration: hc.Spec.KSMConfiguration,
VMRolloutStrategy: ptr.To(kubevirtcorev1.VMRolloutStrategyLiveUpdate),
}

if smbiosConfig, ok := os.LookupEnv(smbiosEnvName); ok {
Expand Down
9 changes: 9 additions & 0 deletions controllers/operands/kubevirt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3339,6 +3339,15 @@ Version: 1.2.3`)
})
})

Context("Rollout Strategy", func() {
It("should be set to live update", func() {
kv, err := NewKubeVirt(hco)
Expect(err).ToNot(HaveOccurred())

Expect(kv.Spec.Configuration.VMRolloutStrategy).To(HaveValue(Equal(kubevirtcorev1.VMRolloutStrategyLiveUpdate)))
})
})

It("should handle conditions", func() {
expectedResource, err := NewKubeVirt(hco, commontestutils.Namespace)
Expect(err).ToNot(HaveOccurred())
Expand Down
6 changes: 5 additions & 1 deletion hack/kv-smoke-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,10 @@ echo "waiting for testing infrastructure to be ready"
${CMD} wait deployment cdi-http-import-server -n "${INSTALLED_NAMESPACE}" --for condition=Available --timeout=10m
${CMD} wait pods -l "kubevirt.io=disks-images-provider" -n "${INSTALLED_NAMESPACE}" --for condition=Ready --timeout=10m

# TODO: remove once https://github.com/kubevirt/kubevirt/pull/12073 will be merged
# and we will be able to consume a new release with a fix
KVPR12073='(test_id:6867)'

echo "starting tests"
${TESTS_BINARY} \
-cdi-namespace="$INSTALLED_NAMESPACE" \
Expand All @@ -239,7 +243,7 @@ ${TESTS_BINARY} \
-ginkgo.focus='(rfe_id:1177)|(rfe_id:273)|(rfe_id:151)' \
-ginkgo.no-color \
-ginkgo.seed=0 \
-ginkgo.skip='(Slirp Networking)|(with CPU spec)|(with TX offload disabled)|(with cni flannel and ptp plugin interface)|(with ovs-cni plugin)|(test_id:1752)|(SRIOV)|(with EFI)|(Operator)|(GPU)|(DataVolume Integration)|(when virt-handler is not responsive)|(with default cpu model)|(should set the default MachineType when created without explicit value)|(should fail to start when a volume is backed by PVC created by DataVolume instead of the DataVolume itself)|(test_id:3468)|(test_id:3466)|(test_id:1015)|(rfe_id:393)|(test_id:4646)|(test_id:4647)|(test_id:4648)|(test_id:4649)|(test_id:4650)|(test_id:4651)|(test_id:4652)|(test_id:4654)|(test_id:4655)|(test_id:4656)|(test_id:4657)|(test_id:4658)|(test_id:4659)|(should obey the disk verification limits in the KubeVirt CR)' \
-ginkgo.skip="(Slirp Networking)|(with CPU spec)|(with TX offload disabled)|(with cni flannel and ptp plugin interface)|(with ovs-cni plugin)|(test_id:1752)|(SRIOV)|(with EFI)|(Operator)|(GPU)|(DataVolume Integration)|(when virt-handler is not responsive)|(with default cpu model)|(should set the default MachineType when created without explicit value)|(should fail to start when a volume is backed by PVC created by DataVolume instead of the DataVolume itself)|(test_id:3468)|(test_id:3466)|(test_id:1015)|(rfe_id:393)|(test_id:4646)|(test_id:4647)|(test_id:4648)|(test_id:4649)|(test_id:4650)|(test_id:4651)|(test_id:4652)|(test_id:4654)|(test_id:4655)|(test_id:4656)|(test_id:4657)|(test_id:4658)|(test_id:4659)|(should obey the disk verification limits in the KubeVirt CR)|${KVPR12073}" \
-ginkgo.slow-spec-threshold=60s \
-ginkgo.succinct \
-ginkgo.flake-attempts=3 \
Expand Down

0 comments on commit ea70684

Please sign in to comment.