Bug 1442037 - No validation on the disk's type when taking a partial snapshot
Summary: No validation on the disk's type when taking a partial snapshot
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.1.0
Hardware: All
OS: All
low
medium
Target Milestone: ovirt-4.2.0
: ---
Assignee: shani
QA Contact: Kevin Alon Goldblatt
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-13 11:45 UTC by shani
Modified: 2017-06-28 14:56 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-06-28 14:56:30 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)
Python SDK reproduction (1.05 KB, text/plain)
2017-04-13 11:45 UTC, shani
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 76997 0 master MERGED core: CreateAllSnapshotsFromVmCommand#validate 2017-06-01 15:53:58 UTC

Description shani 2017-04-13 11:45:41 UTC
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:
-

Comment 1 Raz Tamir 2017-04-13 11:52:38 UTC
This is by design according to our Polarion TP of direct LUN - https://polarion.engineering.redhat.com/polarion/#/project/RHEVM3/workitem?id=RHEVM3-5933

Comment 2 Allon Mureinik 2017-04-13 12:10:46 UTC
(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.

Comment 3 Raz Tamir 2017-04-13 14:20:50 UTC
Right,
If you specifically select a direct lun to be part of partial snapshot, ignoring it is not the proper way

Comment 4 Allon Mureinik 2017-06-01 15:55:41 UTC
Shani, can you please add some doctext explaining the fix?

Comment 5 Kevin Alon Goldblatt 2017-06-28 14:56:30 UTC
Moving to Closed upstream


Note You need to log in before you can comment on or make changes to this bug.