For writing and debugging tests, I would offer "ovirt-orb" [1]
"ovirt-orb" can provide pre-made images of oVirt.
After creating the environment you can run your test with:

lago ovirt runtest TEST_NAME


[1] - https://ovirt.org/documentation/ovirt-orb/

On Wed, May 30, 2018 at 4:29 PM, Milan Zamazal <mzamazal@redhat.com> wrote:
Yedidyah Bar David <didi@redhat.com> writes:

> On Tue, May 22, 2018 at 1:27 PM, Milan Zamazal <mzamazal@redhat.com> wrote:
>> Yaniv Kaul <ykaul@redhat.com> writes:
>>
>
>>> On Fri, May 18, 2018 at 11:48 PM, Milan Zamazal <mzamazal@redhat.com> wrote:
>>>
>>>> Hi, I have been playing with using Lago snapshots to restart oVirt
>>>> system tests from a certain point without all the preceding
>>>> initialization and tests.  The primary purpose is to save time when
>>>> running a suite over different data center compatibility versions but it
>>>> could be also useful e.g. when writing and debugging tests.

What is the flow that you aim for? 
 
>>>>
>>>> However since `lagocli snapshot' makes disk-only snapshots the VMs get
>>>> restarted when they are reverted.  This may cause various problems.  For
>>>> instance, when I snapshot/revert before running add_dc test then
>>>> verify_notifier test fails -- I assume due to the event being initiated
>>>> before the snapshot and completed after the snapshot, so it's missing in
>>>> after-revert runs.  Snapshots with memory should resolve similar issues.
>>>> Is it possible to make such snapshots in Lago?

We can try.
The peace that create the snapshot is in lago.providers.libvirt.vm._create_live_snapshot
We can make the snapshot flags customizable via CLI.

>>>>
>>>
>>> It's not entirely clear to me that this will work well for all flows.
>>> For example, I don't anticipate network connections (storage, storage,
>>> storage...) to persist well.
>>> This will make the whole exercise pointless, regretfully. (or in other
>>> words: this is when I gave up on the same idea).

We implemented to commands that should take down/bring up oVirt environement gracefully

lago ovirt stop
lago ovirt start
 
>
> I think for some time now about doing this too, but start earlier - mainly
> to test different setup-related flows. Can you see some obvious problem
> with this, that should make me give up already?
>
> Any of you has example patches for OST to try playing with this?

I use disk-only snapshots, as provided by Lago, in
https://gerrit.ovirt.org/91169 .  It doesn't work reliably yet, but it's
usable as a proof of concept.

> Sadly I didn't manage so far to make OST run on my machines [1], I only use
> it in CI.
>
> [1] https://lists.ovirt.org/archives/list/infra@ovirt.org/message/QGYRKBBLD4MUNY7HEDD7E6CPSF4B4ECI/
>
>>
>> I see, right, it's most likely not going to work reliably.  I'll rather
>> try to handle regular snapshots and related tweaks.
>>
>> Thanks,
>> Milan
>>
>>>> I'd also like to clarify how is `lagocli revert' supposed to be used.
>>>> It seems to basically work as such but I could experience network
>>>> accessibility problems of the reverted Lago VMs.  lagocli stop + revert
>>>> + start seems to be a safer way of reverting to a snapshot.  How should
>>>> `lagocli revert' be used properly?

 Actually, "lago revert" takes the VMs down, revert and bring them back up.
Are you sure that the VM booted properly? did you try to connect to them using console (lago console VM_NAME)?

>>>>
>>>> Thanks,
>>>> Milan
>>>> _______________________________________________
>>>> lago-devel mailing list -- lago-devel@ovirt.org
>>>> To unsubscribe send an email to lago-devel-leave@ovirt.org
>>>>
>> _______________________________________________
>> lago-devel mailing list -- lago-devel@ovirt.org
>> To unsubscribe send an email to lago-devel-leave@ovirt.org
_______________________________________________
lago-devel mailing list -- lago-devel@ovirt.org
To unsubscribe send an email to lago-devel-leave@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/
List Archives: https://lists.ovirt.org/archives/list/lago-devel@ovirt.org/message/OFIJKTZDK3A2HW5IMSOJDLJ2DQRAACNT/



--
GAL bEN HAIM
RHV DEVOPS