Skip to content

Commit

Permalink
tree-wide: remove aufs storage driver
Browse files Browse the repository at this point in the history
We've announced quite a while back and printed out errors and warning everytime
someone used the aufs driver.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Mar 15, 2018
1 parent 9d257a2 commit 12e6ab5
Show file tree
Hide file tree
Showing 14 changed files with 44 additions and 664 deletions.
29 changes: 15 additions & 14 deletions doc/lxc-copy.sgml.in
Expand Up @@ -113,13 +113,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
root filesystem of the container is simply copied to the new container. Or
they can be snapshots, i.e. small copy-on-write copies of the original
container. In this case the specified backing storage for the copy must
support snapshots. This currently includes aufs, btrfs, lvm (lvm devices
support snapshots. This currently includes btrfs, lvm (lvm devices
do not support snapshots of snapshots.), overlay, and zfs.
</para>

<para>
The copy's backing storage will be of the same type as the original
container. aufs or overlayfs snapshots of directory backed containers are
container. overlay snapshots of directory backed containers are
exempted from this rule.
</para>

Expand All @@ -145,21 +145,22 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Containers created and started with <replaceable>-e</replaceable> can have
custom mounts. These are specified with the <replaceable>-m</replaceable>
flag. Currently three types of mounts are supported:
<replaceable>aufs</replaceable>, <replaceable>bind</replaceable>, and
<replaceable>bind</replaceable>, and
<replaceable>overlay</replaceable>. Mount types are specified as suboptions
to the <replaceable>-m</replaceable> flag and can be specified multiple
times separated by commas. <replaceable>aufs</replaceable> and
<replaceable>overlay</replaceable> mounts are currently specified in the
format <replaceable>-m overlay=/src:/dest</replaceable>. When no
destination <replaceable>dest</replaceable> is specified
times separated by commas. <replaceable>overlay</replaceable> mounts are
currently specified in the format <replaceable>-m
overlay=/src:/dest</replaceable>. When no destination
<replaceable>dest</replaceable> is specified
<replaceable>dest</replaceable> will be identical to
<replaceable>src</replaceable>. Read-only <replaceable>bind</replaceable>
mounts are specified <replaceable>-m bind=/src:/dest:ro</replaceable> and
read-write <replaceable>bind</replaceable> mounts <replaceable>-m
bind=/src:/dest:rw</replaceable>. Read-write <replaceable>bind</replaceable>
mounts are the default and <replaceable>rw</replaceable> can be missing when
a read-write mount is wanted. When <replaceable>dest</replaceable> is
missing <replaceable>dest</replaceable> will be identical to
bind=/src:/dest:rw</replaceable>. Read-write
<replaceable>bind</replaceable> mounts are the default and
<replaceable>rw</replaceable> can be missing when a read-write mount is
wanted. When <replaceable>dest</replaceable> is missing
<replaceable>dest</replaceable> will be identical to
<replaceable>src</replaceable>. An example for multiple mounts would be
<replaceable>-m
bind=/src1:/dest1:ro,bind=/src2:ro,overlay=/src3:/dest3</replaceable>.
Expand Down Expand Up @@ -203,7 +204,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
<listitem>
<para> Create a snapshot of the original container. The backing
storage for the copy must support snapshots. This currently includes
aufs, btrfs, lvm, overlay, and zfs. </para>
btrfs, lvm, overlay, and zfs. </para>
</listitem>
</varlistentry>

Expand Down Expand Up @@ -234,7 +235,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
<listitem>
<para> Specify a mount for a snapshot The
<replaceable>opts</replaceable> argument for the mount type can by
of type {aufs, bind, overlay}. For example <option>-m
of type {bind, overlay}. For example <option>-m
bind=/src:/dest:ro,overlay=/src:/dest</option> (This option can
currently only be specified in conjunction with
<replaceable>-e</replaceable>.).</para>
Expand All @@ -258,7 +259,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
<term> <option>-B, --backingstorage <replaceable>backingstorage</replaceable></option></term>
<listitem>
<para>Specify the backing storage type to be used for the copy
where 'backingstorage' is of type 'aufs', 'btrfs', 'dir', 'lvm', 'loop',
where 'backingstorage' is of type 'btrfs', 'dir', 'lvm', 'loop',
'overlay', or 'zfs'. </para>
</listitem>
</varlistentry>
Expand Down
2 changes: 1 addition & 1 deletion doc/lxc-snapshot.sgml.in
Expand Up @@ -129,7 +129,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
<varlistentry>
<term> <option>-N, --newname</option> </term>
<listitem>
<para> When restoring a snapshot, the last optional argument if not given explicitly via <command>--newname</command> is the name to use for the restored container. If the newname is identical to the original name of the container, then the original container will be destroyed and the restored container will take its place. Note that deleting the original snapshot is not possible in the case of aufs, overlayfs or zfs backed snapshots.</para>
<para> When restoring a snapshot, the last optional argument if not given explicitly via <command>--newname</command> is the name to use for the restored container. If the newname is identical to the original name of the container, then the original container will be destroyed and the restored container will take its place. Note that deleting the original snapshot is not possible in the case of overlayfs or zfs backed snapshots.</para>
</listitem>
</varlistentry>

Expand Down
4 changes: 1 addition & 3 deletions doc/lxc.container.conf.sgml.in
Expand Up @@ -1365,9 +1365,7 @@ dev/null proc/kcore none bind,relative 0 0
itself should be mounted. <filename>overlayfs:/lower:/upper</filename>
specifies that the rootfs should be an overlay with <filename>/upper</filename>
being mounted read-write over a read-only mount of <filename>/lower</filename>.
<filename>aufs:/lower:/upper</filename> does the same using aufs in place
of overlayfs. For both <filename>overlayfs</filename> and
<filename>aufs</filename> multiple <filename>/lower</filename>
For <filename>overlay</filename> multiple <filename>/lower</filename>
directories can be specified. <filename>loop:/file</filename> tells lxc to attach
<filename>/file</filename> to a loop device and mount the loop device.
</para>
Expand Down
2 changes: 0 additions & 2 deletions src/lxc/Makefile.am
Expand Up @@ -6,7 +6,6 @@ pkginclude_HEADERS = \
noinst_HEADERS = \
attach.h \
storage/storage.h \
storage/aufs.h \
storage/btrfs.h \
storage/dir.h \
storage/loop.h \
Expand Down Expand Up @@ -81,7 +80,6 @@ endif
lib_LTLIBRARIES = liblxc.la
liblxc_la_SOURCES = \
storage/storage.c storage/storage.h \
storage/aufs.c storage/aufs.h \
storage/btrfs.c storage/btrfs.h \
storage/dir.c storage/dir.h \
storage/loop.c storage/loop.h \
Expand Down
13 changes: 6 additions & 7 deletions src/lxc/conf.c
Expand Up @@ -100,7 +100,6 @@
#include "parse.h"
#include "ringbuf.h"
#include "storage.h"
#include "storage/aufs.h"
#include "storage/overlay.h"
#include "terminal.h"
#include "utils.h"
Expand Down Expand Up @@ -2001,14 +2000,14 @@ static int mount_entry_create_dir_file(const struct mntent *mntent,
const char *lxc_name,
const char *lxc_path)
{
int ret = 0;
int fd, ret;
char *p1, *p2;

if (!strncmp(mntent->mnt_type, "overlay", 7))
if (strncmp(mntent->mnt_type, "overlay", 7) == 0) {
ret = ovl_mkdir(mntent, rootfs, lxc_name, lxc_path);
else if (!strncmp(mntent->mnt_type, "aufs", 4))
ret = aufs_mkdir(mntent, rootfs, lxc_name, lxc_path);
if (ret < 0)
return -1;
if (ret < 0)
return -1;
}

if (hasmntopt(mntent, "create=dir")) {
ret = mkdir_p(path, 0755);
Expand Down
13 changes: 6 additions & 7 deletions src/lxc/confile.c
Expand Up @@ -2582,17 +2582,16 @@ bool clone_update_unexp_ovl_paths(struct lxc_conf *conf, const char *oldpath,
if (p >= lend)
goto next;

/* Whenever an lxc.mount.entry entry is found in a line we check
* if the substring " overlay" or the substring " aufs" is
* present before doing any further work. We check for "
* overlay" and " aufs" since both substrings need to have at
* least one space before them in a valid overlay
/* Whenever a lxc.mount.entry entry is found in a line we check
* if the substring "overlay" is present before doing any
* further work. We check for "overlay" because substrings need
* to have at least one space before them in a valid overlay
* lxc.mount.entry (/A B overlay). When the space before is
* missing it is very likely that these substrings are part of a
* path or something else. (Checking q >= lend ensures that we
* only count matches in the current line.) */
if ((!(q = strstr(p, " overlay")) || q >= lend) &&
(!(q = strstr(p, " aufs")) || q >= lend))
q = strstr(p, " overlay");
if (!q || q >= lend)
goto next;

if (!(q = strstr(p, olddir)) || (q >= lend))
Expand Down
3 changes: 1 addition & 2 deletions src/lxc/lxccontainer.c
Expand Up @@ -3548,7 +3548,6 @@ sudo lxc-clone -o o1 -n n1 -s -L|-fssize fssize -v|--vgname vgname \
-s [ implies overlay]
-s -B overlay
-s -B aufs
only rootfs gets converted (copied/snapshotted) on clone.
*/
Expand Down Expand Up @@ -3935,7 +3934,7 @@ static int do_lxcapi_snapshot(struct lxc_container *c, const char *commentfile)
if (storage_is_dir(c->lxc_conf)) {
ERROR("Snapshot of directory-backed container requested.");
ERROR("Making a copy-clone. If you do want snapshots, then");
ERROR("please create an aufs or overlay clone first, snapshot that");
ERROR("please create overlay clone first, snapshot that");
ERROR("and keep the original container pristine.");
flags &= ~LXC_CLONE_SNAPSHOT | LXC_CLONE_MAYBE_SNAPSHOT;
}
Expand Down

0 comments on commit 12e6ab5

Please sign in to comment.