Skip to content

Commit 471d0ba

Browse files
committed
clean and remove fuse
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
1 parent 2ce634b commit 471d0ba

File tree

125 files changed

+18
-15975
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+18
-15975
lines changed

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ FROM alpine
2626
MAINTAINER Jessica Frazelle <jess@linux.com>
2727
RUN apk add --no-cache \
2828
bash \
29-
fuse \
3029
git \
3130
shadow \
3231
shadow-uidmap \

Gopkg.lock

Lines changed: 2 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@
3636
name = "github.com/moby/buildkit"
3737
branch = "master"
3838

39-
[[override]]
40-
name = "github.com/hanwen/go-fuse"
41-
revision = "master"
42-
4339
[[override]]
4440
name = "github.com/grpc-ecosystem/grpc-opentracing"
4541
revision = "420e5c3331a082e0c873adeeab1819fe1749dd0b"

README.md

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ compiled from the following branch: [AkihiroSuda/runc/tree/demo-rootless](https:
6262
You need to have `runc` (see the top section for rootless mode) and `newuidmap` installed.
6363
On Ubuntu, `newuidmap` is provided by the `uidmap` package.
6464

65-
For the FUSE backend, you will also need `fusermount` installed.
66-
6765
NOTE: These steps work only for Linux. Compile and run in a container (explained below) if you're on Windows or MacOS.
6866

6967
#### Binaries
@@ -131,7 +129,7 @@ Build an image from a Dockerfile.
131129

132130
Flags:
133131

134-
-backend backend for snapshots ([auto fuse native overlayfs]) (default: auto)
132+
-backend backend for snapshots ([auto native overlayfs]) (default: auto)
135133
-build-arg Set build-time variables (default: [])
136134
-d enable debug logging (default: false)
137135
-f Name of the Dockerfile (Default is 'PATH/Dockerfile') (default: <none>)
@@ -184,7 +182,7 @@ List images and digests.
184182

185183
Flags:
186184

187-
-backend backend for snapshots ([auto fuse native overlayfs]) (default: auto)
185+
-backend backend for snapshots ([auto native overlayfs]) (default: auto)
188186
-d enable debug logging (default: false)
189187
-f Filter output based on conditions provided (default: [])
190188
-state directory to hold the global state (default: /tmp/img)
@@ -207,7 +205,7 @@ Pull an image or a repository from a registry.
207205

208206
Flags:
209207

210-
-backend backend for snapshots ([auto fuse native overlayfs]) (default: auto)
208+
-backend backend for snapshots ([auto native overlayfs]) (default: auto)
211209
-d enable debug logging (default: false)
212210
-state directory to hold the global state (default: /tmp/img)
213211
```
@@ -229,7 +227,7 @@ Push an image or a repository to a registry.
229227

230228
Flags:
231229

232-
-backend backend for snapshots ([auto fuse native overlayfs]) (default: auto)
230+
-backend backend for snapshots ([auto native overlayfs]) (default: auto)
233231
-d enable debug logging (default: false)
234232
-state directory to hold the global state (default: /tmp/img)
235233
```
@@ -250,7 +248,7 @@ Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE.
250248

251249
Flags:
252250

253-
-backend backend for snapshots ([auto fuse native overlayfs]) (default: auto)
251+
-backend backend for snapshots ([auto native overlayfs]) (default: auto)
254252
-d enable debug logging (default: false)
255253
-state directory to hold the global state (default: /tmp/img)
256254
```
@@ -270,7 +268,7 @@ Save an image to a tar archive (streamed to STDOUT by default).
270268

271269
Flags:
272270

273-
-backend backend for snapshots ([auto fuse native overlayfs]) (default: auto)
271+
-backend backend for snapshots ([auto native overlayfs]) (default: auto)
274272
-d enable debug logging (default: false)
275273
-o Write to a file, instead of STDOUT (default: <none>)
276274
-state directory to hold the global state (default: /tmp/img)
@@ -294,7 +292,7 @@ Remove one or more images.
294292

295293
Flags:
296294

297-
-backend backend for snapshots ([auto fuse native overlayfs]) (default: auto)
295+
-backend backend for snapshots ([auto native overlayfs]) (default: auto)
298296
-d enable debug logging (default: false)
299297
-state directory to hold the global state (default: /tmp/img)
300298
```
@@ -309,7 +307,7 @@ Show image disk usage.
309307

310308
Flags:
311309

312-
-backend backend for snapshots ([auto fuse native overlayfs]) (default: auto)
310+
-backend backend for snapshots ([auto native overlayfs]) (default: auto)
313311
-d enable debug logging (default: false)
314312
-f Filter output based on conditions provided (snapshot ID supported) (default: <none>)
315313
-state directory to hold the global state (default: /tmp/img)
@@ -342,7 +340,7 @@ If no server is specified, the default (https://index.docker.io/v1/) is used.
342340

343341
Flags:
344342

345-
-backend backend for snapshots ([auto fuse native overlayfs]) (default: auto)
343+
-backend backend for snapshots ([auto native overlayfs]) (default: auto)
346344
-d enable debug logging (default: false)
347345
-p Password (default: <none>)
348346
-password-stdin Take the password from stdin (default: false)
@@ -377,11 +375,6 @@ You can also use `overlayfs`
377375
backend, but that requires a kernel patch from Ubuntu to be unprivileged,
378376
see [#22](https://github.com/genuinetools/img/issues/22).
379377

380-
#### fuse
381-
382-
The `fuse` backend runs completely in userspace. It is a bit buggy and a work
383-
in progress so hang tight.
384-
385378
### Unprivileged Mounting
386379

387380
To mount a filesystem without root accses, `img` automatically invokes [`newuidmap(1)`](http://man7.org/linux/man-pages/man1/newuidmap.1.html)/[`newgidmap(1)`](http://man7.org/linux/man-pages/man1/newgidmap.1.html) SUID binaries to prepare SUBUIDs/SUBGIDs, which is typically required by `apt`.

client/client.go

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66

77
"github.com/containerd/containerd/snapshots/overlay"
88
"github.com/genuinetools/img/types"
9-
"github.com/hanwen/go-fuse/fuse"
109
"github.com/moby/buildkit/control"
1110
"github.com/moby/buildkit/session"
1211
"github.com/sirupsen/logrus"
@@ -19,8 +18,6 @@ type Client struct {
1918
localDirs map[string]string
2019
root string
2120

22-
fuseserver *fuse.Server
23-
2421
sessionManager *session.Manager
2522
controller *control.Controller
2623
}
@@ -54,13 +51,7 @@ func New(root, backend string, localDirs map[string]string) (*Client, error) {
5451
}, nil
5552
}
5653

57-
// Close terminates the client and unmount the fuseserver if it is mounted.
58-
func (c *Client) Close() {
59-
if c.fuseserver == nil {
60-
return
61-
}
62-
63-
if err := c.fuseserver.Unmount(); err != nil {
64-
logrus.Errorf("Unmounting FUSE server failed: %v", err)
65-
}
66-
}
54+
// Close safely closes the client.
55+
// This used to shut down the FUSE server but since that was removed
56+
// it is basically a no-op now.
57+
func (c *Client) Close() {}

client/session.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ func (c *Client) getSessionManager() (*session.Manager, error) {
2121
return c.sessionManager, nil
2222
}
2323

24+
// Session creates the session manager and returns the session and it's
25+
// dialer.
2426
func (c *Client) Session(ctx context.Context) (*session.Session, session.Dialer, error) {
2527
m, err := c.getSessionManager()
2628
if err != nil {

client/workeropt.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import (
1515
"github.com/containerd/containerd/snapshots/native"
1616
"github.com/containerd/containerd/snapshots/overlay"
1717
"github.com/genuinetools/img/executor/runc"
18-
"github.com/genuinetools/img/snapshots/fuse"
1918
"github.com/genuinetools/img/types"
2019
"github.com/moby/buildkit/cache/metadata"
2120
containerdsnapshot "github.com/moby/buildkit/snapshot/containerd"
@@ -46,8 +45,6 @@ func (c *Client) createWorkerOpt() (opt base.WorkerOpt, err error) {
4645
s ctdsnapshot.Snapshotter
4746
)
4847
switch c.backend {
49-
case types.FUSEBackend:
50-
s, c.fuseserver, err = fuse.NewSnapshotter(snapshotRoot)
5148
case types.NativeBackend:
5249
s, err = native.NewSnapshotter(snapshotRoot)
5350
case types.OverlayFSBackend:

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var (
3030

3131
defaultStateDirectory = "/tmp/img"
3232

33-
validBackends = []string{types.AutoBackend, types.FUSEBackend, types.NativeBackend, types.OverlayFSBackend}
33+
validBackends = []string{types.AutoBackend, types.NativeBackend, types.OverlayFSBackend}
3434
)
3535

3636
type command interface {

0 commit comments

Comments
 (0)