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
Created attachment 605479 [details] engine.log
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.
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.
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.
in upstream gerrit: http://gerrit.ovirt.org/#/c/7649
merged upstream: d91bea22f21554578e22beed74e2f6f938a58eb4
Verified RHEVM (Build SI23).