OpenNebula / one

The open source Cloud & Edge Computing Platform bringing real freedom to your Enterprise Cloud 🚀
http://opennebula.io
Apache License 2.0
1.21k stars 476 forks source link

[PATCH] qcow2ssh - qcow2 local storage #4192

Open mzealey opened 4 years ago

mzealey commented 4 years ago

Description

At 1-grid.com we run a cluster of independent virtualization servers with local storage supporting snapshots and live migrations.

The ssh ts works great for the local storage side, however it cannot do live snapshots (has to freeze and copy the instance for a long time) and does not support migrations.

The qcow2 ts works great for some aspects of live snapshots and qcow2 features, however it is based off the shared storage ts rather than ssh ts, and in-spite of some of the work done around supporting merging of ts there doesn't seem to be an easy way to merge these.

So, we created qcow2ssh which combines all of these features. A PoC can be found at https://github.com/mzealey/one/tree/1g-qcow2ssh with live migrate at https://github.com/mzealey/one/tree/1g-live-migrate

The core of new work is the perl script in the snapshot_delete routine which allows efficient snapshotting with allow_orphans by creating a tree of snapshot dependencies and figuring out which need to be merged to effect a delete. There is some nastyness with symlinks in the snap directory to store some key information - suggestions for improving this would be welcome.

This is more of a PoC at the moment but we would be interested in your feedback around feasibility of getting something like this merged into OpenNebula.

Progress Status

rsmontero commented 4 years ago

How is this related to the shared modes?

http://docs.opennebula.org/5.10/deployment/open_cloud_storage_setup/fs_ds.html#combining-the-shared-ssh-transfer-modes

Maybe we can simply extend the current ssh drivers to do "special" operations on qcow2 files?

mzealey commented 4 years ago

I tried a number of different ways using this setup but couldn't get it working as we wanted so had to write our own storage driver.

I agree that the current ssh mode could be extended, however some functions, particularly the snapshot functions currently are assuming that backing storage is non-snapshottable and I suspect that doing different cases on this code would be too complex.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. The OpenNebula Dev Team

rsmontero commented 3 years ago

This is now implemented for OpenNebula > 6.0

mzealey commented 3 years ago

@rsmontero can you point me at the code which has been added please, I can't seem to see it in the repo recently?

rsmontero commented 3 years ago

My bad @mzealey , it is only implemented for recovery snapshots in ssh mode, and we have merge ssh+qcow2 mode. This is actually the next step and planned, but still not merged. Sorry :(