Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: yaroslavborbat <[email protected]>
  • Loading branch information
yaroslavborbat committed Jan 16, 2025
1 parent a274970 commit 015e490
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions images/virt-artifact/patches/032-hotplug-container-disk.patch
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,21 @@ index 490cc445ef..4b7dbc12fe 100644
}
}
diff --git a/pkg/virt-api/rest/subresource.go b/pkg/virt-api/rest/subresource.go
index b5d62f5af5..1df640888f 100644
index b5d62f5af5..6a3e2b4143 100644
--- a/pkg/virt-api/rest/subresource.go
+++ b/pkg/virt-api/rest/subresource.go
@@ -1018,12 +1018,16 @@ func volumeSourceName(volumeSource *v1.HotplugVolumeSource) string {
@@ -1004,7 +1004,9 @@ func addVolumeRequestExists(request v1.VirtualMachineVolumeRequest, name string)
}

func volumeHotpluggable(volume v1.Volume) bool {
- return (volume.DataVolume != nil && volume.DataVolume.Hotpluggable) || (volume.PersistentVolumeClaim != nil && volume.PersistentVolumeClaim.Hotpluggable)
+ return (volume.DataVolume != nil && volume.DataVolume.Hotpluggable) ||
+ (volume.PersistentVolumeClaim != nil && volume.PersistentVolumeClaim.Hotpluggable) ||
+ (volume.ContainerDisk != nil && volume.ContainerDisk.Hotpluggable)
}

func volumeNameExists(volume v1.Volume, volumeName string) bool {
@@ -1018,12 +1020,16 @@ func volumeSourceName(volumeSource *v1.HotplugVolumeSource) string {
if volumeSource.PersistentVolumeClaim != nil {
return volumeSource.PersistentVolumeClaim.ClaimName
}
Expand All @@ -322,7 +333,7 @@ index b5d62f5af5..1df640888f 100644
}

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

0 comments on commit 015e490

Please sign in to comment.