Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1442037

Summary: No validation on the disk's type when taking a partial snapshot
Product: [oVirt] ovirt-engine Reporter: shani <sleviim>
Component: BLL.StorageAssignee: shani <sleviim>
Status: CLOSED UPSTREAM QA Contact: Kevin Alon Goldblatt <kgoldbla>
Severity: medium Docs Contact:
Priority: low    
Version: 4.1.0CC: amureini, bugs, sleviim
Target Milestone: ovirt-4.2.0Flags: rule-engine: ovirt-4.2+
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
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.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-28 14:56:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Python SDK reproduction none

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