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 15, 2025
1 parent f854e7d commit 948a6d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions images/virt-artifact/patches/032-hotplug-container-disk.patch
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ index 4fd325ba86..82fcaee0a3 100644
"//vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1:go_default_library",
],
diff --git a/pkg/virt-controller/watch/vmi.go b/pkg/virt-controller/watch/vmi.go
index fa4e86ee17..ebe718f90d 100644
index fa4e86ee17..ae2e207bf8 100644
--- a/pkg/virt-controller/watch/vmi.go
+++ b/pkg/virt-controller/watch/vmi.go
@@ -1836,6 +1836,10 @@ func (c *VMIController) handleHotplugVolumes(hotplugVolumes []*virtv1.Volume, ho
Expand Down Expand Up @@ -558,7 +558,7 @@ index fa4e86ee17..ebe718f90d 100644
- status.Phase = phase
- status.Message = message
- status.Reason = reason
+ if volume.ContainerDisk != nil {
+ if volume.ContainerDisk == nil {
+ if !c.volumeReady(status.Phase) {
+ status.HotplugVolume.AttachPodUID = ""
+ // Volume is not hotplugged in VM and Pod is gone, or hasn't been created yet, check for the PVC associated with the volume to set phase and message
Expand Down

0 comments on commit 948a6d0

Please sign in to comment.