Skip to content

Commit d512561

Browse files
fix
Signed-off-by: yaroslavborbat <[email protected]>
1 parent dd3db91 commit d512561

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

images/virt-artifact/patches/032-hotplug-container-disk.patch

+14-3
Original file line numberDiff line numberDiff line change
@@ -301,10 +301,21 @@ index 490cc445ef..4b7dbc12fe 100644
301301
}
302302
}
303303
diff --git a/pkg/virt-api/rest/subresource.go b/pkg/virt-api/rest/subresource.go
304-
index b5d62f5af5..1df640888f 100644
304+
index b5d62f5af5..6a3e2b4143 100644
305305
--- a/pkg/virt-api/rest/subresource.go
306306
+++ b/pkg/virt-api/rest/subresource.go
307-
@@ -1018,12 +1018,16 @@ func volumeSourceName(volumeSource *v1.HotplugVolumeSource) string {
307+
@@ -1004,7 +1004,9 @@ func addVolumeRequestExists(request v1.VirtualMachineVolumeRequest, name string)
308+
}
309+
310+
func volumeHotpluggable(volume v1.Volume) bool {
311+
- return (volume.DataVolume != nil && volume.DataVolume.Hotpluggable) || (volume.PersistentVolumeClaim != nil && volume.PersistentVolumeClaim.Hotpluggable)
312+
+ return (volume.DataVolume != nil && volume.DataVolume.Hotpluggable) ||
313+
+ (volume.PersistentVolumeClaim != nil && volume.PersistentVolumeClaim.Hotpluggable) ||
314+
+ (volume.ContainerDisk != nil && volume.ContainerDisk.Hotpluggable)
315+
}
316+
317+
func volumeNameExists(volume v1.Volume, volumeName string) bool {
318+
@@ -1018,12 +1020,16 @@ func volumeSourceName(volumeSource *v1.HotplugVolumeSource) string {
308319
if volumeSource.PersistentVolumeClaim != nil {
309320
return volumeSource.PersistentVolumeClaim.ClaimName
310321
}
@@ -322,7 +333,7 @@ index b5d62f5af5..1df640888f 100644
322333
}
323334

324335
func volumeExists(volume v1.Volume, volumeName string) bool {
325-
@@ -1125,6 +1129,8 @@ func (app *SubresourceAPIApp) addVolumeRequestHandler(request *restful.Request,
336+
@@ -1125,6 +1131,8 @@ func (app *SubresourceAPIApp) addVolumeRequestHandler(request *restful.Request,
326337
opts.VolumeSource.DataVolume.Hotpluggable = true
327338
} else if opts.VolumeSource.PersistentVolumeClaim != nil {
328339
opts.VolumeSource.PersistentVolumeClaim.Hotpluggable = true

0 commit comments

Comments
 (0)