Remove noop file ownership change
This change is noop because func ReplacePVCByHostDisk is
executed from handler context but the file path is
relevant to launcher context. Therefore the change is
failing 100% time and we are ignoring it.
Also this is side-effect of the function.
@@ -99,11 +99,6 @@ func ReplacePVCByHostDisk(vmi *v1.VirtualMachineInstance, clientset kubecli.Kube
}
// PersistenVolumeClaim is replaced by HostDisk
volumeSource.PersistentVolumeClaim = nil
- // Set ownership of the disk.img to qemu
- if err := ephemeraldiskutils.DefaultOwnershipManager.SetFileOwnership(file); err != nil && !os.IsNotExist(err) {
- log.Log.Reason(err).Errorf("Couldn't set Ownership on %s: %v", file, err)
- return err
- }
}
}
return nil
