Bug 849426 - ovirt-engine-backend: Desktop pool creation with a name that contains 13 characters failed after creating 9 VM's "VM,ACTION_TYPE_FAILED_NAME_LENGTH_IS_TOO_LONG".
Summary: ovirt-engine-backend: Desktop pool creation with a name that contains 13 char...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.1.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Tomas Jelinek
QA Contact: Omri Hochman
URL:
Whiteboard: virt
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-19 12:01 UTC by Omri Hochman
Modified: 2012-12-04 20:03 UTC (History)
8 users (show)

Fixed In Version: si19
Doc Type: Bug Fix
Doc Text:
the length of pool name is limited to 15 and 64 for Windows and non-Windows OS respectively. This includes the automatically added dash and sequential number, so the effective length is e.g. 11 for pools larger than 99VMs. The check is performed against the desired pool size at the time of pool creation. Note when you want to increase the size of the pool later and it would cross the limit you are not allowed to do so nor the pool can be renamed.
Clone Of:
Environment:
Last Closed: 2012-12-04 20:03:33 UTC
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
engine.log (38.27 KB, application/octet-stream)
2012-08-19 12:04 UTC, Omri Hochman
no flags Details

Description Omri Hochman 2012-08-19 12:01:53 UTC
ovirt-engine-backend: Desktop pool creation with a name that contains 13 characters failed after creating 9 VM's.  "VM,ACTION_TYPE_FAILED_NAME_LENGTH_IS_TOO_LONG". 

Scenario:
*********
1) Create Desktop-Pool
   A) 'Name' field should contains exactly '13' characters 
   B)  Pool VM's number should be more than 10.

Results: 
**********
After successful creation of the first 9 VM's - the other desktop pool VM's creation fails with the following error: "VM,ACTION_TYPE_FAILED_NAME_LENGTH_IS_TOO_LONG" 

The rhevm event: "Failed to create VM Pool gal_migration(User: admin@internal)."


Example:
*********
I created desktop-pool named "gal_migration" with 300 vm's - RHEVM created only the first 9 VM's :
gal_migration-1
gal_migration-2 
..
..
gal_migration-9
gal_migration-10 And the other 291 Vm's - failed over (NAME_LENGTH_IS_TOO_LONG).


Engine.log:
************
2012-08-19 13:22:18,937 INFO  [org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand] (pool-4-thread-48) [413c8947] Running command: UpdateVmPoolWithVmsCommand internal: false. Entities affected :  ID: b412313c-e9ef-11e1-9d76-57b9b4344cec Type: VmPool
2012-08-19 13:22:19,058 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.IsValidVDSCommand] (pool-4-thread-48) [33958c3f] START, IsValidVDSCommand(storagePoolId = b080a021-a2b2-4db2-be23-ce7ddc359f49, ignoreFailoverLimit = false, compatabilityVersion = null), log id: 6bf01955
2012-08-19 13:22:19,059 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.IsValidVDSCommand] (pool-4-thread-48) [33958c3f] FINISH, IsValidVDSCommand, return: true, log id: 6bf01955
2012-08-19 13:22:19,069 WARN  [org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand] (pool-4-thread-48) [33958c3f] CanDoAction of action AddVmAndAttachToPool failed. Reasons:VAR__ACTION__ADD,VAR__TYPE__VM,ACTION_TYPE_FAILED_NAME_LENGTH_IS_TOO_LONG
2012-08-19 13:22:19,148 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.IsValidVDSCommand] (pool-4-thread-48) [4265462e] START, IsValidVDSCommand(storagePoolId = b080a021-a2b2-4db2-be23-ce7ddc359f49, ignoreFailoverLimit = false, compatabilityVersion = null), log id: 185249
2012-08-19 13:22:19,151 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.IsValidVDSCommand] (pool-4-thread-48) [4265462e] FINISH, IsValidVDSCommand, return: true, log id: 185249
2012-08-19 13:22:19,160 WARN  [org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand] (pool-4-thread-48) [4265462e] CanDoAction of action AddVmAndAttachToPool failed. Reasons:VAR__ACTION__ADD,VAR__TYPE__VM,ACTION_TYPE_FAILED_NAME_LENGTH_IS_TOO_LONG
2012-08-19 13:22:19,232 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.IsValidVDSCommand] (pool-4-thread-48) [63f17121] START, IsValidVDSCommand(storagePoolId = b080a021-a2b2-4db2-be23-ce7ddc359f49, ignoreFailoverLimit = false, compatabilityVersion = null), log id: 485bba17
2012-08-19 13:22:19,234 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.IsValidVDSCommand] (pool-4-thread-48) [63f17121] FINISH, IsValidVDSCommand, return: true, log id: 485bba17
2012-08-19 13:22:19,244 WARN  [org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand] (pool-4-thread-48) [63f17121] CanDoAction of action AddVmAndAttachToPool failed. Reasons:VAR__ACTION__ADD,VAR__TYPE__VM,ACTION_TYPE_FAILED_NAME_LENGTH_IS_TOO_LONG

Comment 1 Omri Hochman 2012-08-19 12:04:08 UTC
Created attachment 605479 [details]
engine.log

Comment 2 Michal Skrivanek 2012-08-28 14:45:27 UTC
the check in pool dialog is wrong. 15(win)/64(nonwin) check is not correct as it always adds "-<number of vms>" to the name

however there are more issues

- what should happen you create a pool with 13chars name and 9 VMs and later Edit and change to 10 VMs? Currently it fails to create the new VMs.
- if you create the pool with 14 or 15 chars it fails right away, but the pool is created as empty. That should not exist at all.

Comment 3 Michal Skrivanek 2012-08-29 09:17:53 UTC
suggested fix:
check the correct length at the time of pool creation. (13 for 1-9, 12 for 10-99, and so on)
disallow going over the limit on pool edition when increasing would cross the limit

with the above limitation I suggest to include the proposed tech note.

Comment 4 Michal Skrivanek 2012-08-29 09:17:53 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
the length of pool name is limited to 15 and 64 for Windows and non-Windows OS respectively. This includes the automatically added dash and sequential number, so the effective length is e.g. 11 for pools larger than 99VMs. The check is performed against the desired pool size at the time of pool creation. Note when you want to increase the size of the pool later and it would cross the limit you are not allowed to do so nor the pool can be renamed.

Comment 5 Tomas Jelinek 2012-08-31 10:54:40 UTC
in upstream gerrit: http://gerrit.ovirt.org/#/c/7649

Comment 6 Tomas Jelinek 2012-09-06 14:13:41 UTC
merged upstream: d91bea22f21554578e22beed74e2f6f938a58eb4

Comment 9 Omri Hochman 2012-11-04 14:22:53 UTC
Verified RHEVM (Build SI23).


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