Cause: No validation on the disk's type when taking a partial snapshot. Therefore, in case the disk doesn't support snapshots (like direct-lun), it would silently be ignored.
Consequence: Snapshot created with no disks.
Fix: Add validation for disks supplied by the user (as a part of SDK / REST API command parameters) that indicates if there are some disks among them which don't support taking snapshots.
Result: Error message which includes disks' aliases for disks which don't support taking snapshot (among the user's parameters) + operation stops.
Created attachment 1271415[details]
Python SDK reproduction
Description of problem:
When taking a partial snapshot for a vm using the REST API, there's no validation on the disk's type.
Therefore, in case the disk in doesn't support snapshots (like direct-lun),
it would silently be ignored.
Version-Release number of selected component (if applicable):
Reproduced for 4.1.0 version, although according to the code, was probably present before that.
How reproducible:
100%
Steps to Reproduce:
1. Create a VM with a direct-lun disk
2. Using the REST API or SDK, take a partial snapshot with the direct-lun's id.
Actual results:
Snapshot created with no disks.
Expected results:
Error (direct-lun can't participate in snapshot).
Additional info:
-
(In reply to Raz Tamir from comment #1)
> This is by design according to our Polarion TP of direct LUN -
> https://polarion.engineering.redhat.com/polarion/#/project/RHEVM3/
> workitem?id=RHEVM3-5933
Not exactly (unless I misunderstand the polarion case, of course).
A direct LUN doesn't support snapshots, and therefore shouldn't be "part" of a snapshot - so far, so good. This is indeed the behavior when you don't specify the disk list.
If you *explicitly* specify a direct LUN I'd expect the operation to error out. Silently ignoring one of the parameters doesn't sound like good UX to me.
Created attachment 1271415 [details] Python SDK reproduction Description of problem: When taking a partial snapshot for a vm using the REST API, there's no validation on the disk's type. Therefore, in case the disk in doesn't support snapshots (like direct-lun), it would silently be ignored. Version-Release number of selected component (if applicable): Reproduced for 4.1.0 version, although according to the code, was probably present before that. How reproducible: 100% Steps to Reproduce: 1. Create a VM with a direct-lun disk 2. Using the REST API or SDK, take a partial snapshot with the direct-lun's id. Actual results: Snapshot created with no disks. Expected results: Error (direct-lun can't participate in snapshot). Additional info: -