ovirt-engine
ovirt-engine copied to clipboard
core:change conflict message to be more informative
when trying to remove VM while its disks are being transferred(uploaded or downloaded) you get this error message: 'Cannot remove VM: VM is locked. Please try again in a few minutes.' Now it will show more informative message: 'Cannot remove VM. Disk vm_Disk is being downloaded or uploaded.' Also when the multipal snapshots disks are downloaded and we are trying to remove the vm the conflict message will show the same conflict message with the same disk name instead of different names
Bug-Url: https://bugzilla.redhat.com/2066078 Signed-off-by: Artiom Divak [email protected]
- You are referencing the bug https://bugzilla.redhat.com/2066078 that is closed already. Do you have some other bug that describes the issue?
- I don't see in the patch any changes in the message itself. Maybe there are some other files that you forgot to include into the commit?
Hi @smelamud,
- The issue was resolved partly that's why I am reopening that bug to resolve it fully
- I will change the comment to be more informative about what I am resolving now
I agree with Shmuel here. Instead of modifying the core class that is used by every command, try to modify just your command. I can see you create the error message like this:
private String getDiskIsBeingTransferredLockMessage() {
return new LockMessage(EngineMessage.ACTION_TYPE_FAILED_DISK_IS_BEING_TRANSFERRED)
.withOptional("DiskName", getDiskImage().getDiskAlias() != null ? getDiskImage().getDiskAlias() : "")
.toString();
}
If I understand you correctly, you want to pass more disk image aliases to the error message. Why not to concat those names in the command and pass the string as DiskName? You might need to change the message to Disk(s) ${DiskName} is/are being transferred.
Closing the PR as there was no activity for a long time and changing the core UI class would be too risky.