Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1164852

Summary: [RFE] Vdsm should stop creating configuration image upon live snapshot operation
Product: [oVirt] vdsm Reporter: Ori Gofen <ogofen>
Component: RFEsAssignee: Nobody <nobody>
Status: CLOSED WONTFIX QA Contact: meital avital <mavital>
Severity: medium Docs Contact:
Priority: medium    
Version: ---CC: acanan, bugs, gwatson, lpeer, lsurette, michal.skrivanek, mtessun, nsoffer, srevivo
Target Milestone: ---Keywords: FutureFeature
Target Release: ---Flags: sbonazzo: ovirt-4.3-
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-14 11:24:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ori Gofen 2014-11-17 17:29:35 UTC
Description of problem:

Right now during live snapshot operation vdsm creates 1 volume + 2-1 new image/s per every operation.

*  If selecting RAM enabled then one new image+one volume is created as RAM
   snapshot

*  one volume is a data volume and is added to disk's image volume chain.

*  and, I saved the best for the last, one image+one configuration volume is
   created.

oVirt 3.5 keeps The VM configuration representation in the DB for every snapshot (regular/live) taken, that configuration includes various properties of the VM (memory/cpus/etc). It is saved in case the user wants to restore the old VM properties, and when he does, the operation of restoring the information is using oVirt postgres sql to do so, hence, obviating any need for a configuration volume at all.

Further more this redundant volume contains about 2k of xml code while on Block storage, it's (LV) size is 1G, that's 999.98 megabytes waste for every live snapshot taken.

Version-Release number of selected component (if applicable):
vt10.1

How reproducible:
100%

Expected results:
The flow of live snapshot change to be non dependable on a configuration image.
This image should not be created.

Comment 2 Omer Frenkel 2014-11-18 13:11:48 UTC
AFAIR, this image contains some information that is needed for vdsm when the vm starts, one of the things i remember is vm uptime to be reported correctly..

Comment 3 Michal Skrivanek 2014-11-21 11:51:50 UTC
AFAIU from the description this is not related to RAM volume, the general snapshot flow creates config volume, regardless if it's live or not or live+RAM

moving to storage

Comment 4 Ori Gofen 2015-02-24 10:52:04 UTC
There's seem to be a misunderstanding regarding this bug and it's totally my fault, the description is very unclear, so I'll re-describe:
During the creation of live snapshot with ram enabled on a VM, 2 new images are created (besides the data snapshot) one of them (configuration image) is totally redundant after this operation is over, one can even delete it and nothing will happen.

During a live snapshot, ram snapshot disabled, one volume is added to each image vol-chain and no new and redundant images are created.

btw on block Domains, a configuration image size is 1G while the actual data written on the volume is lower than 1k.

Comment 5 Allon Mureinik 2015-02-24 13:22:56 UTC
(In reply to Michal Skrivanek from comment #3)
> AFAIU from the description this is not related to RAM volume, the general
> snapshot flow creates config volume, regardless if it's live or not or
> live+RAM
No, this is not true.
The config volume is created only if the memory volume is created. They are coupled by the builder:

    private MemoryImageBuilder createMemoryImageBuilder() {
        if (!isMemorySnapshotSupported()) {
            return new NullableMemoryImageBuilder();
        }

        if (getParameters().getSnapshotType() == SnapshotType.STATELESS) {
            return new StatelessSnapshotMemoryImageBuilder(getVm());
        }

        if (getParameters().isSaveMemory() && isLiveSnapshotApplicable()) {
            return new LiveSnapshotMemoryImageBuilder(getVm(), cachedStorageDomainId, getStoragePool(), this);
        }

        return new NullableMemoryImageBuilder();
    }

The storage layer has no need for the config volume. Michal, I think this should be returned to virt.
Can you confirm?

Comment 6 Michal Skrivanek 2015-03-06 11:36:23 UTC
yeah
any suggestion where to store it? snapshot volume's metadata? ovf?

Comment 7 Allon Mureinik 2015-03-08 08:52:48 UTC
(In reply to Michal Skrivanek from comment #6)
> yeah
> any suggestion where to store it? snapshot volume's metadata? ovf?
It's already stored in the database in the "snapshots" table, "vm_configuration" column.
Isn't that enough?

Comment 8 Michal Skrivanek 2015-03-10 09:34:38 UTC
*** Bug 1185499 has been marked as a duplicate of this bug. ***

Comment 9 Scott Herold 2015-03-26 16:11:23 UTC
Moving to review for 3.6.  re: Comment 7, What happens in the event a user decides to move a volume to a new Datacenter, possibly in a new Manager instance?  If we move the config data off the volume and into the DB, it will not follow the VM in that case.  Can we investigate using a significantly smaller size, and storage mechanism that will follow the VM?

Comment 10 Allon Mureinik 2015-03-26 19:30:27 UTC
(In reply to Scott Herold from comment #9)
> What happens in the event a user
> decides to move a volume to a new Datacenter, 
There is no API to manipulate these volumes. Implementing bug 1150239 should allow regular volume manipulation verbs on these volumes too, but in any event there isn't, and won't be, any API to move volumes between DCs.

> possibly in a new Manager instance?
The only feasable way do this is to detach the domain and import it to another engine. In this case, all the snapshots info should be in the OVF_STORE volume anyway, so it's still redundant.

> If we move the config data off the volume and into the DB, it
> will not follow the VM in that case.  
It will - see above. Moreover, the OVF_STORE will have this info on EVERY domain associated to the VM, as opposed to the current conf volume which only exists on one domain.

> Can we investigate using a
> significantly smaller size, and storage mechanism that will follow the VM?
Just kill this, and rely on the database and its mirror in the OVF_STORE - see details above.

Comment 11 Scott Herold 2015-04-01 14:26:49 UTC
Removing from 3.6 due to capacity

Comment 12 Michal Skrivanek 2015-04-14 09:00:57 UTC
we could reconstruct the VM params from the OVF_STORE indeed

Comment 14 Ryan Barry 2018-11-14 11:24:22 UTC
This will not make it in a reasonable time. Please re-open if you still feel this should be fixed