Bug 1543440 - CreateImageTemplateCommand failure needs to be be indicated with clearer message in GUI
Summary: CreateImageTemplateCommand failure needs to be be indicated with clearer mess...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.2.1
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ovirt-4.3.0
: 4.3.0
Assignee: shani
QA Contact: Evelina Shames
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-08 13:21 UTC by Kevin Alon Goldblatt
Modified: 2019-02-13 07:48 UTC (History)
3 users (show)

Fixed In Version: ovirt-engine-4.3.0_alpha
Clone Of:
Environment:
Last Closed: 2019-02-13 07:48:10 UTC
oVirt Team: Storage
Embargoed:
ylavi: ovirt-4.3+


Attachments (Terms of Use)
engine and vdsm logs (1.45 MB, application/x-gzip)
2018-02-08 13:55 UTC, Kevin Alon Goldblatt
no flags Details
Works on master-7b828a9092d (52.49 KB, application/zip)
2018-07-19 08:00 UTC, shani
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 93160 0 master MERGED webadmin: Limit disk alias on new VM template creation 2018-07-20 12:15:05 UTC
oVirt gerrit 93161 0 master MERGED webadmin: Limit disk alias on 'Copy Disk' popup 2018-07-24 18:46:26 UTC

Description Kevin Alon Goldblatt 2018-02-08 13:21:03 UTC
Description of problem:
Creating a template and entering a long string in the disk alias causes the create template operation to fail. The message is not clear and can only be found in the engine log

Engine log:
----------------------------
2018-02-08 12:52:38,549+02 INFO  [org.ovirt.engine.core.bll.tasks.AsyncTaskManager] (default task-12) [0a1ecba9-3c09-49fd-aac5-0251d6d7958b] Adding task '6bfcadeb-0360-4c62-be7f-28541ae61a0c' (Parent Command 'Cr
eateAllTemplateDisks', Parameters Type 'org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters'), polling hasn't started yet..
2018-02-08 12:52:38,559+02 ERROR [org.ovirt.engine.core.bll.storage.disk.image.CreateImageTemplateCommand] (default task-12) [0a1ecba9-3c09-49fd-aac5-0251d6d7958b] Command 'org.ovirt.engine.core.bll.storage.disk
.image.CreateImageTemplateCommand' failed: CallableStatementCallback; SQL [{call insertbasedisk(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}]; ERROR: value too long for type character varying(255)
  Where: SQL statement "INSERT INTO base_disks (
        disk_id,
        wipe_after_delete,
        propagate_errors,
        disk_alias,
        disk_description,
        shareable,
        sgio,
        alignment,
        last_alignment_scan,
        disk_storage_type,
        cinder_volume_type,
        disk_content_type
        )
    VALUES (
        v_disk_id,
        v_wipe_after_delete,
        v_propagate_errors,
        v_disk_alias,
        v_disk_description,
        v_shareable,
        v_sgio,
        v_alignment,
        v_last_alignment_scan,
        v_disk_storage_type,
        v_cinder_volume_type,
        v_disk_content_type
        )"


Version-Release number of selected component (if applicable):
ovirt-engine-4.2.1.3-0.1.el7.noarch
vdsm-4.20.17-32.git9b853be.el7.centos.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Create VM with disk
2. Right click Vm in VM tab and select create template
3. Change the disk alias to a long character string of a 100 characters and press OK >>>>>> message displayed "Error while executing action New VM Template: Internal Engine Error" 
4. Hover over alias field >>>>> a)Alias field is not highlighted in Red and b)No information is given of field limitations

Actual results:
After failed template creation due to too long string in Alias field, Hover over alias field >>>>> 1. Alias field is not highlighted in Red and 2.No information is given of field limitations

Expected results:
1. Correct message should be displayed
2. Alias field should be highlighted in Red
3. Correct information should be displayed indicating field limitations like "Maximum field length is ......2 "
Additional info:

Comment 1 Kevin Alon Goldblatt 2018-02-08 13:55:08 UTC
Created attachment 1393191 [details]
engine and vdsm logs

adding logs

Comment 2 Tal Nisan 2018-02-08 14:10:05 UTC
This message should never happen, instead we should add a proper validation

Comment 3 shani 2018-07-19 08:00:25 UTC
Created attachment 1459931 [details]
Works on master-7b828a9092d

I've tried to reproduce on ovirt-engine-master-7b828a9092d
The template was successfully created with a disk's alias of 125 chars.
(engine.log and a screenshot are attached).

Comment 5 shani 2018-07-19 09:00:17 UTC
This one happens for aliases > 255 chars.
I'll work on a fix.

Comment 6 Evelina Shames 2018-08-19 07:15:17 UTC
Verified.

Version:
Engine - 4.3.0-0.0

Comment 7 Sandro Bonazzola 2018-11-02 14:34:43 UTC
This bugzilla is included in oVirt 4.2.7 release, published on November 2nd 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.7 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.

Comment 8 Sandro Bonazzola 2018-11-02 14:51:56 UTC
Closed by mistake, moving back to qa -> verified

Comment 9 Sandro Bonazzola 2019-02-13 07:48:10 UTC
This bugzilla is included in oVirt 4.3.0 release, published on February 4th 2019.

Since the problem described in this bug report should be
resolved in oVirt 4.3.0 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


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