forked from pool/kubevirt
- Fix permission error in storage migration tests
0002-tests-Set-FSGroup-to-ensure-proper-permissions.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/kubevirt?expand=0&rev=163
This commit is contained in:
parent
e8141645f9
commit
9a685821f2
44
0002-tests-Set-FSGroup-to-ensure-proper-permissions.patch
Normal file
44
0002-tests-Set-FSGroup-to-ensure-proper-permissions.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
From 96bd87f47a1f0ba7c0079e8665f94d7cd38f3038 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Vasiliy Ulyanov <vulyanov@suse.de>
|
||||||
|
Date: Mon, 26 Aug 2024 08:18:52 +0200
|
||||||
|
Subject: [PATCH] tests: Set FSGroup to ensure proper permissions
|
||||||
|
|
||||||
|
This fixes 'Permission Denied' error with some storage providers.
|
||||||
|
|
||||||
|
Signed-off-by: Vasiliy Ulyanov <vulyanov@suse.de>
|
||||||
|
---
|
||||||
|
tests/storage/migration.go | 12 ++++++++----
|
||||||
|
1 file changed, 8 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/storage/migration.go b/tests/storage/migration.go
|
||||||
|
index c6911848b..bb17cfdde 100644
|
||||||
|
--- a/tests/storage/migration.go
|
||||||
|
+++ b/tests/storage/migration.go
|
||||||
|
@@ -459,16 +459,20 @@ func createSmallImageForDestinationMigration(vm *virtv1.VirtualMachine, name, si
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
+ podSecurityContext := k8sv1.PodSecurityContext{
|
||||||
|
+ FSGroup: pointer.P(int64(util.NonRootUID)),
|
||||||
|
+ }
|
||||||
|
pod := k8sv1.Pod{
|
||||||
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
|
GenerateName: "create-img-",
|
||||||
|
Namespace: vmi.Namespace,
|
||||||
|
},
|
||||||
|
Spec: k8sv1.PodSpec{
|
||||||
|
- RestartPolicy: k8sv1.RestartPolicyNever,
|
||||||
|
- Volumes: []k8sv1.Volume{volume},
|
||||||
|
- Containers: []k8sv1.Container{cont},
|
||||||
|
- Affinity: &affinity,
|
||||||
|
+ RestartPolicy: k8sv1.RestartPolicyNever,
|
||||||
|
+ Volumes: []k8sv1.Volume{volume},
|
||||||
|
+ Containers: []k8sv1.Container{cont},
|
||||||
|
+ Affinity: &affinity,
|
||||||
|
+ SecurityContext: &podSecurityContext,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
p, err := virtCli.CoreV1().Pods(vmi.Namespace).Create(context.Background(), &pod, metav1.CreateOptions{})
|
||||||
|
--
|
||||||
|
2.46.0
|
||||||
|
|
@ -1,10 +1,12 @@
|
|||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Aug 22 11:39:44 UTC 2024 - Vasily Ulyanov <vasily.ulyanov@suse.com>
|
Mon Aug 26 08:27:16 UTC 2024 - Vasily Ulyanov <vasily.ulyanov@suse.com>
|
||||||
|
|
||||||
- Update to version 1.3.1
|
- Update to version 1.3.1
|
||||||
Release notes https://github.com/kubevirt/kubevirt/releases/tag/v1.3.1
|
Release notes https://github.com/kubevirt/kubevirt/releases/tag/v1.3.1
|
||||||
- Fix DV error report via VM printable status
|
- Fix DV error report via VM printable status
|
||||||
0001-Consider-the-new-DV-reason-ImagePullFailed.patch
|
0001-Consider-the-new-DV-reason-ImagePullFailed.patch
|
||||||
|
- Fix permission error in storage migration tests
|
||||||
|
0002-tests-Set-FSGroup-to-ensure-proper-permissions.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jul 19 07:32:30 UTC 2024 - Vasily Ulyanov <vasily.ulyanov@suse.com>
|
Fri Jul 19 07:32:30 UTC 2024 - Vasily Ulyanov <vasily.ulyanov@suse.com>
|
||||||
|
@ -42,6 +42,7 @@ Source2: kubevirt_containers_meta.service
|
|||||||
Source3: %{url}/releases/download/v%{version}/disks-images-provider.yaml
|
Source3: %{url}/releases/download/v%{version}/disks-images-provider.yaml
|
||||||
Source100: %{name}-rpmlintrc
|
Source100: %{name}-rpmlintrc
|
||||||
Patch1: 0001-Consider-the-new-DV-reason-ImagePullFailed.patch
|
Patch1: 0001-Consider-the-new-DV-reason-ImagePullFailed.patch
|
||||||
|
Patch2: 0002-tests-Set-FSGroup-to-ensure-proper-permissions.patch
|
||||||
BuildRequires: glibc-devel-static
|
BuildRequires: glibc-devel-static
|
||||||
BuildRequires: golang-packaging
|
BuildRequires: golang-packaging
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
|
Loading…
Reference in New Issue
Block a user