Bug 1280337

Summary: Alias and Description maximum size should be restricted
Product: [oVirt] ovirt-engine Reporter: Eyal Shenitzky <eshenitz>
Component: Frontend.WebAdminAssignee: bugs <bugs>
Status: CLOSED NOTABUG QA Contact: Pavel Stehlik <pstehlik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.6.0.2CC: bugs
Target Milestone: ---Flags: rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-11 14:37:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eyal Shenitzky 2015-11-11 13:57:16 UTC
Description of problem:

Disk alias maximum size is 255 characters, and description is 500 characters.
These values are stored in disk metadata in the shared storage since ovirt
3.5. However, on block storage we have only about 250 bytes free.

When entering long values into these fields, the disk metadata is truncated
silently. The truncated data may become invalid, failing various operations
with the disk, and the alias and description becomes unreadable.

Version-Release number of selected component (if applicable):
Any

How reproducible:
Always

Steps to Reproduce:
1. Create disk with alias or description of 250-300 ascii characters
   (Vdsm does not support non-ascii alias and description)

Actual results:
Disk is created on storage, but metadata is truncated and invalid.

Expected results:
Disk should not be created, and MetadataOverflowError should be returned to engine.

Additional info:
This porblem exists since first vdsm version, but it became a bigger problem
since ovirt 3.5 since disk alias is stored now in the disk metadata on 
the shared storage.

There is a mismatch between the ovirt-engine database size limits to the size
of disk metadata. In storage domain format 3, we cannot store the full disk
alias and description in the shared storage.

This issue should be fixed both in engine (to support older vdsm versions) and
in vdsm (to support older engines). This bug is only about the vdsm side.
The engine side bug is tracked in a separate bug.



This BZ was created for the engine side of the bug.