Bug 1416306 - Trying to import a Glance template with >40 chars long name should fail as an ERROR, not a WARNING
Summary: Trying to import a Glance template with >40 chars long name should fail as an...
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Backend.Core
Version: 4.1.0
Hardware: x86_64
OS: Linux
Target Milestone: ovirt-4.2.0
: 4.2.0
Assignee: Shahar Havivi
QA Contact: Raz Tamir
Depends On:
TreeView+ depends on / blocked
Reported: 2017-01-25 08:45 UTC by Yaniv Kaul
Modified: 2017-12-20 11:25 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-12-20 11:25:15 UTC
oVirt Team: Virt
rule-engine: ovirt-4.2+
rule-engine: planning_ack+
rule-engine: devel_ack+
mavital: testing_ack+

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
oVirt gerrit 74551 0 master MERGED core: Template name limited for 40 characters 2017-03-26 11:47:51 UTC

Description Yaniv Kaul 2017-01-25 08:45:39 UTC
Description of problem:
Currently, when trying via the SDK to import a Glance image with a name > 40 chars fails - with a warning. This does not return to the API/client.

2017-01-25 03:20:43,921-05 WARN  [org.ovirt.engine.core.bll.AddVmTemplateCommand] (DefaultQuartzScheduler4) [25199929] Validation of action 'AddVmTemplate' failed for user admin@internal-authz. Reasons: VAR__ACT
ION__ADD,VAR__TYPE__VM_TEMPLATE,VALIDATION_VM_TEMPLATE_NAME_MAX,$groups [Ljava.lang.Class;@2c7e982d,$min 1,$message VALIDATION_VM_TEMPLATE_NAME_MAX,$payload [Ljava.lang.Class;@199b587e,$max 40,ACTION_TYPE_FAILED
_ATTRIBUTE_PATH,$path _name

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

How reproducible:


Steps to Reproduce:
1. Import a Glance disk with a long name. via the API.

Actual results:

Expected results:

Additional info:

Comment 1 Shahar Havivi 2017-03-23 09:05:13 UTC
Currently we are limiting the Template name to 40 characters which is wrong, the VM and the DB have 255 limitation.

Note for QE, can be tested with this script:

Comment 2 Raz Tamir 2017-09-26 14:04:47 UTC
Verified on ovirt-engine-4.2.0-0.0.master.20170924221426.git196b802.el7.centos

POST to api/storagedomains/6e86706b-a08e-4301-8148-bcb4f4c05ba2/images/903ba233-dc33-4cdf-9275-02fc21ce6b46/import

  <storage_domain id="2004622b-d3de-46a8-a99d-86efea58b91f"/>
  <cluster id="8f16ac6a-e68b-4619-9ae8-4636d3326c60"/>

Template name length is 60 chars

Template created successfully

Comment 3 Sandro Bonazzola 2017-12-20 11:25:15 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, 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.