Skip to content

Commit 86fc1cc

Browse files
committed
Remove aufs snapshotter (deprecated since v1.5)
Signed-off-by: Akihiro Suda <[email protected]>
1 parent 689cd12 commit 86fc1cc

File tree

20 files changed

+7
-891
lines changed

20 files changed

+7
-891
lines changed

BUILDING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ make generate
110110
> * `no_cri`: A build tag disables building Kubernetes [CRI](http://blog.kubernetes.io/2016/12/container-runtime-interface-cri-in-kubernetes.html) support into containerd.
111111
> See [here](https://github.com/containerd/cri-containerd#build-tags) for build tags of CRI plugin.
112112
> * snapshotters (alphabetical order)
113-
> * `no_aufs`: A build tag disables building the aufs snapshot driver.
113+
> * `no_aufs`: A build tag disables building the aufs snapshot driver. (Ignored since containerd v2.0, as the aufs snapshot driver is no longer supported)
114114
> * `no_btrfs`: A build tag disables building the Btrfs snapshot driver.
115115
> * `no_devmapper`: A build tag disables building the device mapper snapshot driver.
116116
> * `no_zfs`: A build tag disables building the ZFS snapshot driver.

RELEASES.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ The deprecated features are shown in the following table:
374374
| Runtime V1 API and implementation (`io.containerd.runtime.v1.linux`) | containerd v1.4 | containerd v2.0 | Use `io.containerd.runc.v2` |
375375
| Runc V1 implementation of Runtime V2 (`io.containerd.runc.v1`) | containerd v1.4 | containerd v2.0 | Use `io.containerd.runc.v2` |
376376
| config.toml `version = 1` | containerd v1.5 | containerd v2.0 | Use config.toml `version = 2` |
377-
| Built-in `aufs` snapshotter | containerd v1.5 | containerd v2.0 | Use `overlayfs` snapshotter |
377+
| Built-in `aufs` snapshotter | containerd v1.5 | containerd v2.0 | Use `overlayfs` snapshotter |
378378
| Container label `containerd.io/restart.logpath` | containerd v1.5 | containerd v2.0 | Use `containerd.io/restart.loguri` label |
379379
| `cri-containerd-*.tar.gz` release bundles | containerd v1.6 | containerd v2.0 | Use `containerd-*.tar.gz` bundles |
380380
| Pulling Schema 1 images (`application/vnd.docker.distribution.manifest.v1+json`) | containerd v1.7 | containerd v2.0 | Use Schema 2 or OCI images |

SCOPE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ The table specifies whether the feature/component is in or out of scope.
3636
| Name | Description | In/Out | Reason |
3737
|------------------------------|--------------------------------------------------------------------------------------------------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
3838
| execution | Provide an extensible execution layer for executing a container | in | Create,start, stop pause, resume exec, signal, delete |
39-
| cow filesystem | Built in functionality for overlay, aufs, and other copy on write filesystems for containers | in | |
39+
| cow filesystem | Built in functionality for overlay and other copy on write filesystems for containers | in | |
4040
| distribution | Having the ability to push and pull images as well as operations on images as a first class API object | in | containerd will fully support the management and retrieval of images |
4141
| metrics | container-level metrics, cgroup stats, and OOM events | in |
4242
| networking | creation and management of network interfaces | out | Networking will be handled and provided to containerd via higher level systems. |

Vagrantfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ EOF
187187
source /etc/profile.d/sh.local
188188
set -eux -o pipefail
189189
cd ${GOPATH}/src/github.com/containerd/containerd
190-
make BUILDTAGS="seccomp selinux no_aufs no_btrfs no_devmapper no_zfs" binaries install
190+
make BUILDTAGS="seccomp selinux no_btrfs no_devmapper no_zfs" binaries install
191191
type containerd
192192
containerd --version
193193
chcon -v -t container_runtime_exec_t /usr/local/bin/{containerd,containerd-shim*}
@@ -282,7 +282,7 @@ EOF
282282
cleanup
283283
cd ${GOPATH}/src/github.com/containerd/containerd
284284
# cri-integration.sh executes containerd from ./bin, not from $PATH .
285-
make BUILDTAGS="seccomp selinux no_aufs no_btrfs no_devmapper no_zfs" binaries bin/cri-integration.test
285+
make BUILDTAGS="seccomp selinux no_btrfs no_devmapper no_zfs" binaries bin/cri-integration.test
286286
chcon -v -t container_runtime_exec_t ./bin/{containerd,containerd-shim*}
287287
CONTAINERD_RUNTIME=io.containerd.runc.v2 ./script/test/cri-integration.sh
288288
cleanup

archive/tar_opts_linux.go

-5
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ import (
2525
"golang.org/x/sys/unix"
2626
)
2727

28-
// AufsConvertWhiteout converts whiteout files for aufs.
29-
func AufsConvertWhiteout(_ *tar.Header, _ string) (bool, error) {
30-
return true, nil
31-
}
32-
3328
// OverlayConvertWhiteout converts whiteout files for overlay.
3429
func OverlayConvertWhiteout(hdr *tar.Header, path string) (bool, error) {
3530
base := filepath.Base(path)

cmd/containerd/builtins/aufs_linux.go

-21
This file was deleted.

diff/apply/apply_linux.go

-55
Original file line numberDiff line numberDiff line change
@@ -51,22 +51,6 @@ func apply(ctx context.Context, mounts []mount.Mount, r io.Reader) error {
5151
}
5252
_, err = archive.Apply(ctx, path, r, opts...)
5353
return err
54-
case len(mounts) == 1 && mounts[0].Type == "aufs":
55-
path, parents, err := getAufsPath(mounts[0].Options)
56-
if err != nil {
57-
if errdefs.IsInvalidArgument(err) {
58-
break
59-
}
60-
return err
61-
}
62-
opts := []archive.ApplyOpt{
63-
archive.WithConvertWhiteout(archive.AufsConvertWhiteout),
64-
}
65-
if len(parents) > 0 {
66-
opts = append(opts, archive.WithParents(parents))
67-
}
68-
_, err = archive.Apply(ctx, path, r, opts...)
69-
return err
7054
}
7155
return mount.WithTempMount(ctx, mounts, func(root string) error {
7256
_, err := archive.Apply(ctx, root, r)
@@ -91,42 +75,3 @@ func getOverlayPath(options []string) (upper string, lower []string, err error)
9175

9276
return
9377
}
94-
95-
// getAufsPath handles options as given by the containerd aufs package only,
96-
// formatted as "br:<upper>=rw[:<lower>=ro+wh]*"
97-
func getAufsPath(options []string) (upper string, lower []string, err error) {
98-
const (
99-
sep = ":"
100-
brPrefix = "br:"
101-
rwSuffix = "=rw"
102-
roSuffix = "=ro+wh"
103-
)
104-
for _, o := range options {
105-
if strings.HasPrefix(o, brPrefix) {
106-
o = strings.TrimPrefix(o, brPrefix)
107-
} else {
108-
continue
109-
}
110-
111-
for _, b := range strings.Split(o, sep) {
112-
if strings.HasSuffix(b, rwSuffix) {
113-
if upper != "" {
114-
return "", nil, fmt.Errorf("multiple rw branch found: %w", errdefs.ErrInvalidArgument)
115-
}
116-
upper = strings.TrimSuffix(b, rwSuffix)
117-
} else if strings.HasSuffix(b, roSuffix) {
118-
if upper == "" {
119-
return "", nil, fmt.Errorf("rw branch be first: %w", errdefs.ErrInvalidArgument)
120-
}
121-
lower = append(lower, strings.TrimSuffix(b, roSuffix))
122-
} else {
123-
return "", nil, fmt.Errorf("unhandled aufs suffix: %w", errdefs.ErrInvalidArgument)
124-
}
125-
126-
}
127-
}
128-
if upper == "" {
129-
return "", nil, fmt.Errorf("rw branch not found: %w", errdefs.ErrInvalidArgument)
130-
}
131-
return
132-
}

diff/apply/apply_linux_test.go

-38
Original file line numberDiff line numberDiff line change
@@ -39,41 +39,3 @@ func TestGetOverlayPath(t *testing.T) {
3939
t.Fatalf("An error is expected")
4040
}
4141
}
42-
43-
func TestGetAufsPath(t *testing.T) {
44-
for _, test := range []struct {
45-
options []string
46-
expectErr bool
47-
}{
48-
{
49-
options: []string{"random:option", "br:/test/rw=rw:/test/ro=ro+wh"},
50-
expectErr: false,
51-
},
52-
{
53-
options: []string{"random:option"},
54-
expectErr: true,
55-
},
56-
{
57-
options: []string{"br:/test/ro=ro+wh"},
58-
expectErr: true,
59-
},
60-
} {
61-
path, parents, err := getAufsPath(test.options)
62-
if test.expectErr {
63-
if err == nil {
64-
t.Fatalf("An error is expected")
65-
}
66-
continue
67-
}
68-
if err != nil {
69-
t.Fatalf("Get aufs path failed: %v", err)
70-
}
71-
if path != "/test/rw" {
72-
t.Fatalf("Unexpected rw dir: %q", path)
73-
}
74-
if len(parents) != 1 || parents[0] != "/test/ro" {
75-
t.Fatalf("Unexpected parents: %v", parents)
76-
}
77-
78-
}
79-
}

docs/snapshotters/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Filesystem-specific:
1616
- `devmapper`: ext4/xfs device mapper. See [`devmapper.md`](./devmapper.md).
1717

1818
[Deprecated](https://github.com/containerd/containerd/blob/main/RELEASES.md#deprecated-features):
19-
- `aufs`: AUFS. Deprecated since containerd 1.5. Planned to be removed in containerd 2.0. See also https://github.com/containerd/aufs .
19+
- `aufs`: AUFS. Deprecated since containerd 1.5. Removed in containerd 2.0. See also https://github.com/containerd/aufs .
2020

2121
## Non-core snapshotter plugins
2222

go.mod

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ require (
88
github.com/Microsoft/go-winio v0.6.0
99
github.com/Microsoft/hcsshim v0.10.0-rc.7
1010
github.com/container-orchestrated-devices/container-device-interface v0.5.4
11-
github.com/containerd/aufs v1.0.0
1211
github.com/containerd/btrfs/v2 v2.0.0
1312
github.com/containerd/cgroups/v3 v3.0.1
1413
github.com/containerd/console v1.0.3

go.sum

-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ github.com/container-orchestrated-devices/container-device-interface v0.5.4/go.m
181181
github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE=
182182
github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU=
183183
github.com/containerd/aufs v0.0.0-20210316121734-20793ff83c97/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU=
184-
github.com/containerd/aufs v1.0.0 h1:2oeJiwX5HstO7shSrPZjrohJZLzK36wvpdmzDRkL/LY=
185184
github.com/containerd/aufs v1.0.0/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU=
186185
github.com/containerd/btrfs v0.0.0-20201111183144-404b9149801e/go.mod h1:jg2QkJcsabfHugurUvvPhS3E08Oxiuh5W/g1ybB4e0E=
187186
github.com/containerd/btrfs v0.0.0-20210316141732-918d888fb676/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss=

integration/client/go.sum

-1
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,6 @@ github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h
638638
github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA=
639639
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI=
640640
github.com/container-orchestrated-devices/container-device-interface v0.5.4/go.mod h1:DjE95rfPiiSmG7uVXtg0z6MnPm/Lx4wxKCIts0ZE0vg=
641-
github.com/containerd/aufs v1.0.0/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU=
642641
github.com/containerd/btrfs/v2 v2.0.0/go.mod h1:swkD/7j9HApWpzl8OHfrHNxppPd9l44DFZdF94BUj9k=
643642
github.com/containerd/cgroups v0.0.0-20200824123100-0b889c03f102/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo=
644643
github.com/containerd/cgroups v1.0.1/go.mod h1:0SJrPIenamHDcZhEcJMNBB85rHcUsw4f25ZfBiPYRkU=

snapshots/testsuite/testsuite.go

-3
Original file line numberDiff line numberDiff line change
@@ -885,9 +885,6 @@ func checkRootPermission(ctx context.Context, t *testing.T, snapshotter snapshot
885885

886886
func check128LayersMount(name string) func(ctx context.Context, t *testing.T, snapshotter snapshots.Snapshotter, work string) {
887887
return func(ctx context.Context, t *testing.T, snapshotter snapshots.Snapshotter, work string) {
888-
if name == "Aufs" {
889-
t.Skip("aufs tests have issues with whiteouts here on some CI kernels")
890-
}
891888
lowestApply := fstest.Apply(
892889
fstest.CreateFile("/bottom", []byte("way at the bottom\n"), 0777),
893890
fstest.CreateFile("/overwriteme", []byte("FIRST!\n"), 0777),

test/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ cd "${ROOT}"
3232
make clean
3333

3434
# Build CRI+CNI release
35-
make BUILDTAGS="seccomp no_aufs no_btrfs no_devmapper no_zfs" cri-cni-release
35+
make BUILDTAGS="seccomp no_btrfs no_devmapper no_zfs" cri-cni-release
3636

3737
BUILDDIR=$(mktemp -d)
3838
cleanup() {

vendor/github.com/containerd/aufs/.golangci.yml

-22
This file was deleted.

0 commit comments

Comments
 (0)