Bug 1401278 - [RFE] Add option to copy a template's disk between several SDs upon template creation
Summary: [RFE] Add option to copy a template's disk between several SDs upon template ...
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
medium vote
Target Milestone: ---
: ---
Assignee: Michal Skrivanek
QA Contact: meital avital
Depends On:
TreeView+ depends on / blocked
Reported: 2016-12-04 09:28 UTC by sefi litmanovich
Modified: 2020-04-01 14:51 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-04-01 14:47:36 UTC
oVirt Team: Virt
michal.skrivanek: ovirt-future?
rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?

Attachments (Terms of Use)
engine log (118.54 KB, application/x-gzip)
2016-12-04 09:28 UTC, sefi litmanovich
no flags Details

Description sefi litmanovich 2016-12-04 09:28:16 UTC
Created attachment 1227889 [details]
engine log

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):

How reproducible:

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

Actual results:
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.

Expected results:
All the vms in the pool are re created to be based on the new template and are distributed between both SDs

Additional info:
Both SDs have the same free space (2 nfs folders on the same nfs share).

Comment 1 sefi litmanovich 2016-12-04 09:43:04 UTC
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

Comment 2 Tomas Jelinek 2016-12-07 12:19:51 UTC
when you create a new template version, are the disks of the template distributed on all storage domains?

Comment 3 sefi litmanovich 2016-12-08 10:24:12 UTC
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

Comment 5 Michal Skrivanek 2020-03-19 15:41:18 UTC
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.

Comment 6 Michal Skrivanek 2020-04-01 14:47:36 UTC
ok, closing. Please reopen if still relevant/you want to work on it.

Comment 7 Michal Skrivanek 2020-04-01 14:51:06 UTC
ok, closing. Please reopen if still relevant/you want to work on it.

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