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 8a2863e commit 8612ac0
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions images/virt-artifact/patches/031-hotplug-container-disk.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1472,39 +1472,6 @@ index 3318c1c466..ce726edf12 100644
func Convert_v1_HostDisk_To_api_Disk(volumeName string, path string, disk *api.Disk) error {
disk.Type = "file"
disk.Driver.Type = "raw"
diff --git a/pkg/virt-launcher/virtwrap/manager.go b/pkg/virt-launcher/virtwrap/manager.go
index 2513ad62a8..664cd05eed 100644
--- a/pkg/virt-launcher/virtwrap/manager.go
+++ b/pkg/virt-launcher/virtwrap/manager.go
@@ -1141,6 +1141,20 @@ func (l *LibvirtDomainManager) syncDiskHotplug(
) error {
logger := log.Log.Object(vmi)

+ lg := logger.With("TEST", "BRBT")
+ lg.Info("SYNC DISC")
+
+ domainBytes, err := xml.Marshal(domain.Spec)
+ if err != nil {
+ return err
+ }
+ specBytes, err := xml.Marshal(spec)
+ if err != nil {
+ return err
+ }
+ lg.Infof("DOMAIN: %s", string(domainBytes))
+ lg.Infof("SPEC: %s", string(specBytes))
+
// Look up all the disks to detach
for _, detachDisk := range getDetachedDisks(spec.Devices.Disks, domain.Spec.Devices.Disks) {
logger.V(1).Infof("Detaching disk %s, target %s", detachDisk.Alias.GetName(), detachDisk.Target.Device)
@@ -1158,6 +1172,7 @@ func (l *LibvirtDomainManager) syncDiskHotplug(
// Look up all the disks to attach
for _, attachDisk := range getAttachedDisks(spec.Devices.Disks, domain.Spec.Devices.Disks) {
allowAttach, err := checkIfDiskReadyToUse(getSourceFile(attachDisk))
+ lg.Infof("ATTACHDISK: %s, allowAttach: %t", attachDisk.Alias.GetName(), allowAttach)
if err != nil {
return err
}
diff --git a/pkg/virt-operator/resource/apply/BUILD.bazel b/pkg/virt-operator/resource/apply/BUILD.bazel
index f6bd9bd4f1..fe6ab54f8c 100644
--- a/pkg/virt-operator/resource/apply/BUILD.bazel
Expand Down

0 comments on commit 8612ac0

Please sign in to comment.