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".
ovirt-engine-backend: Desktop pool creation with a name that contains 13 char...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.1.0
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Tomas Jelinek
Omri Hochman
virt
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-19 08:01 EDT by Omri Hochman
Modified: 2012-12-04 15:03 EST (History)
8 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-04 15:03:33 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Omri Hochman 2012-08-19 08:01:53 EDT
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 08:04:08 EDT
Created attachment 605479 [details]
engine.log
Comment 2 Michal Skrivanek 2012-08-28 10:45:27 EDT
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 05:17:53 EDT
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 05:17:53 EDT
    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 06:54:40 EDT
in upstream gerrit: http://gerrit.ovirt.org/#/c/7649
Comment 6 Tomas Jelinek 2012-09-06 10:13:41 EDT
merged upstream: d91bea22f21554578e22beed74e2f6f938a58eb4
Comment 9 Omri Hochman 2012-11-04 09:22:53 EST
Verified RHEVM (Build SI23).

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