-
mod_rdep(): Write path and name of clone to file · 0ea055b3Christian Brauner authored
If we currently create clone-snapshots via lxc-clone only the plain total number of the containers it serves as a base-container is written to the file "lxc-snapshots". This commit modifies mod_rdep() so it will store the paths and names to the containers that are clone-snapshots (similar to the "lxc_rdepends" file for the clones). **Users which still have containers that have a non-empty (with a number > 0 as an entry) "lxc-snapshots" file in the old format are not affected by this change. It will be used until all old clones have been deleted!** For all others, the "lxc_snapshots" file placed under the original container now looks like this: /var/lib/lxc bb /var/lib/lxc cc /opt dd This is an example of a container that provides the base for three clone-snapshots bb, cc, and dd. Where bb and cc both are placed in the usual path for privileged containers and dd is placed in a custom path. - Add additional argument to function that takes in the clone-snapshotted lxc_container. - Have mod_rdep() write the path and name of the clone-snapshotted container the file lxc_snapshots of the original container. - If a clone-snapshot gets deleted the corresponding line in the file lxc_snapshot of the original container will be deleted and the file updated via mmap() + memmove() + munmap(). - Adapt has_fs_snapshots(). - **If an lxc-snapshot file in the old format is found we'll keep using it.** Signed-off-by:Christian Brauner <christianvanbrauner@gmail.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
0ea055b3
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| include | Loading commit data... | |
| lua-lxc | Loading commit data... | |
| lxc | Loading commit data... | |
| python-lxc | Loading commit data... | |
| tests | Loading commit data... | |
| Makefile.am | Loading commit data... |