canonical / ubuntu-pro-client

Ubuntu Pro Client for offerings from Canonical
https://canonical-ubuntu-pro-client.readthedocs-hosted.com/en/latest/
GNU General Public License v3.0
56 stars 75 forks source link

Feature: tests: for lxd behave tests restore running container from snapshot #2878

Open orndorffgrant opened 12 months ago

orndorffgrant commented 12 months ago

Please describe the scenario where the new feature would be useful

This should hopefully make lxd tests faster.

Describe the solution you'd like

lxd containers (and vms?) can be restored from a snapshot without shutting them down first

Current behavior

Our snapshot_strategy variable turns on the use of snapshots, but they are always restored as a new instance after shutting down the original, which takes time.

Additional context

If this works well, we could default snapshot_strategy to "true" for lxd tests.

orndorffgrant commented 11 months ago

Open Question: Does the lxd storage backend make a difference? What is CI currently using? What backend would make this best? (We think we're using the zfs backend everywhere now - will that one work?)

panlinux commented 11 months ago

zfs and btrfs would be faster for snapshots, even if backed by a loopback file.