Created attachment 1227889 [details]
Description of problem:
https://bugzilla.redhat.com/show_bug.cgi?id=1081536 introduces the ability to create a vm pool that allocates vms disks to different SDs dynamically by looking at SDs free space.
In order to allow this option one should have the template's disk copied between the different SDs.
Another feature - 'template versions' allows the user to create a vm pool pointing to a 'latest' template flag which will update the pool's vms if a new template version will be created under the 'original' template of the pool.
When creating a pool with both features what happens is that upon creation the vms of the pool will be distributed between the SDs BUT when creating a new template version for the pool's template, the vms will be re created only on the first SD.
This happened in 2 scenarios:
1. Creating the new template version from a vm with 1 disk on 1 of the SDs - this case makes sense and seems like the logical behaviour.
2. Creating the new template version from a vm with disk on all the SDs - In this case I'd expect the new vms to be distributed between SDs like in pool creation or vm addition to the pool.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create a template - copy disk to 2 SDs.
2. Create a vm pool from the template - set template version to 'latest' and in resource allocation choose to the 'auto storage target' option.
3. After pool creation is done, create a new template from a vm with disks on both SDs
All the vms in the pool are re created to be based on the new template, but all are created on the first SD only.
All the vms in the pool are re created to be based on the new template and are distributed between both SDs
Both SDs have the same free space (2 nfs folders on the same nfs share).
Small amendment to the outcome of this case - in fact after the new template version is created all the vms are created on both SDs - so at first I see them on the first SD but after a while the disks are copied to the other SD as well, which is also not the wanted outcome
when you create a new template version, are the disks of the template distributed on all storage domains?
To summarize our conversations on this matter:
When creating a new template it's not possible to create it with 1 disk that has copies on multiple SDs, so when creating a template from a vm with 1 disk all the pooled vms will be created on 1 SD, and when creating the template from a vm with multiple disks then the pooled vms will all be created with multiple disks.
In order to get the pooled vms distributed between SDs with a new template version there are one of 2 W/A:
1. Starting all the vms in the pool before the new template is created, copying the new tmeplate's disk after it's created and then stopping the vms which will then invoke a re creation after a new version was detected during vm's run.
2. After creating the new template and copying it's disk to the other SD Detach vms from the pool and then edit the pool and increase the number of vms.
Both aren't ideal and mistake prone.
Opening an RFE for the capability of creating a new template with few disk copies
We didn't get to this bug for more than 2 years, and it's not being considered for the upcoming 4.4. It's unlikely that it will ever be addressed so I'm suggesting to close it.
If you feel this needs to be addressed and want to work on it please remove cond nack and target accordingly.
ok, closing. Please reopen if still relevant/you want to work on it.