Giter Club home page Giter Club logo

fuse-overlayfs-snapshotter's Introduction

containerd banner light mode containerd banner dark mode

PkgGoDev Build Status Nightlies Go Report Card CII Best Practices Check Links

containerd is an industry-standard container runtime with an emphasis on simplicity, robustness, and portability. It is available as a daemon for Linux and Windows, which can manage the complete container lifecycle of its host system: image transfer and storage, container execution and supervision, low-level storage and network attachments, etc.

containerd is a member of CNCF with 'graduated' status.

containerd is designed to be embedded into a larger system, rather than being used directly by developers or end-users.

architecture

Announcements

Now Recruiting

We are a large inclusive OSS project that is welcoming help of any kind shape or form:

  • Documentation help is needed to make the product easier to consume and extend.
  • We need OSS community outreach/organizing help to get the word out; manage and create messaging and educational content; and help with social media, community forums/groups, and google groups.
  • We are actively inviting new security advisors to join the team.
  • New subprojects are being created, core and non-core that could use additional development help.
  • Each of the containerd projects has a list of issues currently being worked on or that need help resolving.
    • If the issue has not already been assigned to someone or has not made recent progress, and you are interested, please inquire.
    • If you are interested in starting with a smaller/beginner-level issue, look for issues with an exp/beginner tag, for example containerd/containerd beginner issues.

Getting Started

See our documentation on containerd.io:

To get started contributing to containerd, see CONTRIBUTING.

If you are interested in trying out containerd see our example at Getting Started.

Nightly builds

There are nightly builds available for download here. Binaries are generated from main branch every night for Linux and Windows.

Please be aware: nightly builds might have critical bugs, it's not recommended for use in production and no support provided.

Kubernetes (k8s) CI Dashboard Group

The k8s CI dashboard group for containerd contains test results regarding the health of kubernetes when run against main and a number of containerd release branches.

Runtime Requirements

Runtime requirements for containerd are very minimal. Most interactions with the Linux and Windows container feature sets are handled via runc and/or OS-specific libraries (e.g. hcsshim for Microsoft). The current required version of runc is described in RUNC.md.

There are specific features used by containerd core code and snapshotters that will require a minimum kernel version on Linux. With the understood caveat of distro kernel versioning, a reasonable starting point for Linux is a minimum 4.x kernel version.

The overlay filesystem snapshotter, used by default, uses features that were finalized in the 4.x kernel series. If you choose to use btrfs, there may be more flexibility in kernel version (minimum recommended is 3.18), but will require the btrfs kernel module and btrfs tools to be installed on your Linux distribution.

To use Linux checkpoint and restore features, you will need criu installed on your system. See more details in Checkpoint and Restore.

Build requirements for developers are listed in BUILDING.

Supported Registries

Any registry which is compliant with the OCI Distribution Specification is supported by containerd.

For configuring registries, see registry host configuration documentation

Features

Client

containerd offers a full client package to help you integrate containerd into your platform.

import (
  "context"

  containerd "github.com/containerd/containerd/v2/client"
  "github.com/containerd/containerd/v2/pkg/cio"
  "github.com/containerd/containerd/v2/pkg/namespaces"
)


func main() {
	client, err := containerd.New("/run/containerd/containerd.sock")
	defer client.Close()
}

Namespaces

Namespaces allow multiple consumers to use the same containerd without conflicting with each other. It has the benefit of sharing content while maintaining separation with containers and images.

To set a namespace for requests to the API:

context = context.Background()
// create a context for docker
docker = namespaces.WithNamespace(context, "docker")

containerd, err := client.NewContainer(docker, "id")

To set a default namespace on the client:

client, err := containerd.New(address, containerd.WithDefaultNamespace("docker"))

Distribution

// pull an image
image, err := client.Pull(context, "docker.io/library/redis:latest")

// push an image
err := client.Push(context, "docker.io/library/redis:latest", image.Target())

Containers

In containerd, a container is a metadata object. Resources such as an OCI runtime specification, image, root filesystem, and other metadata can be attached to a container.

redis, err := client.NewContainer(context, "redis-master")
defer redis.Delete(context)

OCI Runtime Specification

containerd fully supports the OCI runtime specification for running containers. We have built-in functions to help you generate runtime specifications based on images as well as custom parameters.

You can specify options when creating a container about how to modify the specification.

redis, err := client.NewContainer(context, "redis-master", containerd.WithNewSpec(oci.WithImageConfig(image)))

Root Filesystems

containerd allows you to use overlay or snapshot filesystems with your containers. It comes with built-in support for overlayfs and btrfs.

// pull an image and unpack it into the configured snapshotter
image, err := client.Pull(context, "docker.io/library/redis:latest", containerd.WithPullUnpack)

// allocate a new RW root filesystem for a container based on the image
redis, err := client.NewContainer(context, "redis-master",
	containerd.WithNewSnapshot("redis-rootfs", image),
	containerd.WithNewSpec(oci.WithImageConfig(image)),
)

// use a readonly filesystem with multiple containers
for i := 0; i < 10; i++ {
	id := fmt.Sprintf("id-%s", i)
	container, err := client.NewContainer(ctx, id,
		containerd.WithNewSnapshotView(id, image),
		containerd.WithNewSpec(oci.WithImageConfig(image)),
	)
}

Tasks

Taking a container object and turning it into a runnable process on a system is done by creating a new Task from the container. A task represents the runnable object within containerd.

// create a new task
task, err := redis.NewTask(context, cio.NewCreator(cio.WithStdio))
defer task.Delete(context)

// the task is now running and has a pid that can be used to setup networking
// or other runtime settings outside of containerd
pid := task.Pid()

// start the redis-server process inside the container
err := task.Start(context)

// wait for the task to exit and get the exit status
status, err := task.Wait(context)

Checkpoint and Restore

If you have criu installed on your machine you can checkpoint and restore containers and their tasks. This allows you to clone and/or live migrate containers to other machines.

// checkpoint the task then push it to a registry
checkpoint, err := task.Checkpoint(context)

err := client.Push(context, "myregistry/checkpoints/redis:master", checkpoint)

// on a new machine pull the checkpoint and restore the redis container
checkpoint, err := client.Pull(context, "myregistry/checkpoints/redis:master")

redis, err = client.NewContainer(context, "redis-master", containerd.WithNewSnapshot("redis-rootfs", checkpoint))
defer container.Delete(context)

task, err = redis.NewTask(context, cio.NewCreator(cio.WithStdio), containerd.WithTaskCheckpoint(checkpoint))
defer task.Delete(context)

err := task.Start(context)

Snapshot Plugins

In addition to the built-in Snapshot plugins in containerd, additional external plugins can be configured using GRPC. An external plugin is made available using the configured name and appears as a plugin alongside the built-in ones.

To add an external snapshot plugin, add the plugin to containerd's config file (by default at /etc/containerd/config.toml). The string following proxy_plugin. will be used as the name of the snapshotter and the address should refer to a socket with a GRPC listener serving containerd's Snapshot GRPC API. Remember to restart containerd for any configuration changes to take effect.

[proxy_plugins]
  [proxy_plugins.customsnapshot]
    type = "snapshot"
    address =  "/var/run/mysnapshotter.sock"

See PLUGINS.md for how to create plugins

Releases and API Stability

Please see RELEASES.md for details on versioning and stability of containerd components.

Downloadable 64-bit Intel/AMD binaries of all official releases are available on our releases page.

For other architectures and distribution support, you will find that many Linux distributions package their own containerd and provide it across several architectures, such as Canonical's Ubuntu packaging.

Enabling command auto-completion

Starting with containerd 1.4, the urfave client feature for auto-creation of bash and zsh autocompletion data is enabled. To use the autocomplete feature in a bash shell for example, source the autocomplete/ctr file in your .bashrc, or manually like:

$ source ./contrib/autocomplete/ctr

Distribution of ctr autocomplete for bash and zsh

For bash, copy the contrib/autocomplete/ctr script into /etc/bash_completion.d/ and rename it to ctr. The zsh_autocomplete file is also available and can be used similarly for zsh users.

Provide documentation to users to source this file into their shell if you don't place the autocomplete file in a location where it is automatically loaded for the user's shell environment.

CRI

cri is a containerd plugin implementation of the Kubernetes container runtime interface (CRI). With it, you are able to use containerd as the container runtime for a Kubernetes cluster.

cri

CRI Status

cri is a native plugin of containerd. Since containerd 1.1, the cri plugin is built into the release binaries and enabled by default.

The cri plugin has reached GA status, representing that it is:

See results on the containerd k8s test dashboard

Validating Your cri Setup

A Kubernetes incubator project, cri-tools, includes programs for exercising CRI implementations. More importantly, cri-tools includes the program critest which is used for running CRI Validation Testing.

CRI Guides

Communication

For async communication and long-running discussions please use issues and pull requests on the GitHub repo. This will be the best place to discuss design and implementation.

For sync communication catch us in the #containerd and #containerd-dev Slack channels on Cloud Native Computing Foundation's (CNCF) Slack - cloud-native.slack.com. Everyone is welcome to join and chat. Get Invite to CNCF Slack.

Security audit

Security audits for the containerd project are hosted on our website. Please see the security page at containerd.io for more information.

Reporting security issues

Please follow the instructions at containerd/project

Licenses

The containerd codebase is released under the Apache 2.0 license. The README.md file and files in the "docs" folder are licensed under the Creative Commons Attribution 4.0 International License. You may obtain a copy of the license, titled CC-BY-4.0, at http://creativecommons.org/licenses/by/4.0/.

Project details

containerd is the primary open source project within the broader containerd GitHub organization. However, all projects within the repo have common maintainership, governance, and contributing guidelines which are stored in a project repository commonly for all containerd projects.

Please find all these core project documents, including the:

information in our containerd/project repository.

Adoption

Interested to see who is using containerd? Are you using containerd in a project? Please add yourself via pull request to our ADOPTERS.md file.

fuse-overlayfs-snapshotter's People

Contributors

ace-tang avatar akihirosuda avatar alrs avatar austinvazquez avatar cpuguy83 avatar crosbymichael avatar dependabot[bot] avatar dmcgowan avatar dnephin avatar fuweid avatar husterwan avatar jessvalarezo avatar kunalkushwaha avatar liaojh1998 avatar nashasha1 avatar sshedi avatar stevvooe avatar thajeztah avatar tophj-ibm avatar yanxuean avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fuse-overlayfs-snapshotter's Issues

Release request

Hi folks, we are looking forward to a new release for the main branch which contains the commit of fixing cves. So what's the date of the next release, can someone please help me?

[... [... -t fuse-overlayfs]] failed: "": wait: no child processes: unknown

Intermittently happens on Usernetes CI
rootless-containers/usernetes#154

+ kubectl get nodes -o wide
NAME                    STATUS   ROLES    AGE   VERSION             INTERNAL-IP   EXTERNAL-IP   OS-IMAGE                    KERNEL-VERSION          CONTAINER-RUNTIME
localhost.localdomain   Ready    <none>   13s   v1.19.0-usernetes   10.0.2.100    <none>        Fedora 31 (Cloud Edition)   5.3.7-301.fc31.x86_64   containerd://1.3.0-429-g1c1a08e7
+ timeout 60 kubectl run --rm -i --image busybox --restart=Never hello echo hello
pod "hello" deleted
pod default/hello terminated (StartError)
failed to create containerd task: failed to mount rootfs component &{fuse3.fuse-overlayfs overlay [workdir=/home/vagrant/.local/share/usernetes/containerd/io.containerd.snapshotter.v1.fuse-overlayfs/snapshots/4/work upperdir=/home/vagrant/.local/share/usernetes/containerd/io.containerd.snapshotter.v1.fuse-overlayfs/snapshots/4/fs lowerdir=/home/vagrant/.local/share/usernetes/containerd/io.containerd.snapshotter.v1.fuse-overlayfs/snapshots/3/fs writeback=0]}: mount helper [mount.fuse3 [overlay /run/user/1000/usernetes/containerd/io.containerd.runtime.v2.task/k8s.io/dcbe12d6759bd896b9c0a65d6f74224652110671371895a27099a1385f4e74a1/rootfs -o workdir=/home/vagrant/.local/share/usernetes/containerd/io.containerd.snapshotter.v1.fuse-overlayfs/snapshots/4/work -o upperdir=/home/vagrant/.local/share/usernetes/containerd/io.containerd.snapshotter.v1.fuse-overlayfs/snapshots/4/fs -o lowerdir=/home/vagrant/.local/share/usernetes/containerd/io.containerd.snapshotter.v1.fuse-overlayfs/snapshots/3/fs -o writeback=0 -t fuse-overlayfs]] failed: "": wait: no child processes: unknown
+ ERROR 'Pod is not ready.'

https://travis-ci.org/github/rootless-containers/usernetes/builds/668025122

test fails. says I have do not have the device

$ go test -exec rootlesskit -test.v -test.root === RUN TestFUSEOverlayFS --- SKIP: TestFUSEOverlayFS (0.00s) fuseoverlayfs_test.go:49: fuse-overlayfs not supported: fuse-overlayfs not functional, make sure running with kernel >= 4.18: failed to mount fuse-overlayfs ({Type:fuse3.fuse-overlayfs Source:overlay Options:[lowerdir=/tmp/fuseoverlayfs-test022994873/fuseoverlayfs-check475343812/lower2:/tmp/fuseoverlayfs-test022994873/fuseoverlayfs-check475343812/lower1 writeback=0]}) on /tmp/fuseoverlayfs-test022994873/fuseoverlayfs-check475343812/merged: no such device PASS ok github.com/AkihiroSuda/containerd-fuse-overlayfs 0.022s
Maybe its because I have fuse but not fuse3, not sure how to get fuse3
$ ls /dev | grep fuse fuse
System information:
$ uname -a Linux stephen 5.0.0-37-generic #40~18.04.1-Ubuntu SMP Thu Nov 14 12:06:39 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Fuse Version:
$ fuse-overlayfs --version fuse-overlayfs: version 0.7 FUSE library version 3.8.0 using FUSE kernel interface version 7.31

can't find fuse3.fuse-overlayfs in ubuntu

some code in file check.go๏ผš
m := mount.Mount{
Type: "fuse3." + fuseoverlayfsBinary,
Source: "overlay",
Options: opts,
}
the Type value is fuse3.fuse-overlayfs, execute unix.Mount , prompt "no such device"

System information:
Linux iZj6cgx3q19bmgalpqjydtZ 5.4.0-31-generic #35-Ubuntu SMP Thu May 7 20:20:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

fuse-overlayfs --version:
fuse-overlayfs: version 1.1.0
FUSE library version 3.4.1
using FUSE kernel interface version 7.27
fusermount3 version: 3.9.0

TestFUSEOverlayFS/LayerFileupdate fails depending on the number of CPUs

$ make test
...
    --- PASS: TestFUSEOverlayFS/StatActive (0.00s)                                                                                                                                                                                                                                                                                            
        helpers_unix.go:32: unmount /tmp/snapshot-suite-fuse-overlayfs-355131582/work/preparing                                                                                                                                                                                                                                               
    --- FAIL: TestFUSEOverlayFS/LayerFileupdate (0.57s)                                                                                                                                                                                                                                                                                       
        issues.go:62: Check snapshots failed: directory diff between /tmp/snapshot-suite-fuse-overlayfs-538511347/work/flat975402205 and /tmp/snapshot-suite-fuse-overlayfs-538511347/work/check160206373                                                                                                                                     
            ~ /root/.bashrc(mode: 644, uid: 0, gid: 0) -> /root/.bashrc(mode: 644, uid: 0, gid: 0)                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                              
            github.com/AkihiroSuda/containerd-fuse-overlayfs/vendor/github.com/containerd/continuity/fs/fstest.CheckDirectoryEqual                                                                                                                                                                                                            
                /go/src/github.com/AkihiroSuda/containerd-fuse-overlayfs/vendor/github.com/containerd/continuity/fs/fstest/compare.go:52                                                                                                                                                                                                      
            github.com/AkihiroSuda/containerd-fuse-overlayfs/vendor/github.com/containerd/containerd/snapshots/testsuite.checkSnapshot                                                                                                                                                                                                        
                /go/src/github.com/AkihiroSuda/containerd-fuse-overlayfs/vendor/github.com/containerd/containerd/snapshots/testsuite/helpers.go:104                                                                                                                                                                                           
            github.com/AkihiroSuda/containerd-fuse-overlayfs/vendor/github.com/containerd/containerd/snapshots/testsuite.checkSnapshots                                                                                                                                                                                                       
                /go/src/github.com/AkihiroSuda/containerd-fuse-overlayfs/vendor/github.com/containerd/containerd/snapshots/testsuite/helpers.go:132                                                                                                                                                                                           
            github.com/AkihiroSuda/containerd-fuse-overlayfs/vendor/github.com/containerd/containerd/snapshots/testsuite.checkLayerFileUpdate                                                                                                                                                                                                 
                /go/src/github.com/AkihiroSuda/containerd-fuse-overlayfs/vendor/github.com/containerd/containerd/snapshots/testsuite/issues.go:61                                                                                                                                                                                             
            github.com/AkihiroSuda/containerd-fuse-overlayfs/vendor/github.com/containerd/containerd/snapshots/testsuite.makeTest.func1                                                                                                                                                                                                       
                /go/src/github.com/AkihiroSuda/containerd-fuse-overlayfs/vendor/github.com/containerd/containerd/snapshots/testsuite/testsuite.go:112                                                                                                                                                                                         
            testing.tRunner                                                                                                                                                                                                                                                                                                                   
                /usr/local/go/src/testing/testing.go:909                                                                                                                                                                                                                                                                                      
            runtime.goexit                                                                                                                                                                                                                                                                                                                    
                /usr/local/go/src/runtime/asm_amd64.s:1357                                                                                                                                                                                                                                                                                    
            check directory failed                                                                                                                                                                                                                                                                                                            
            github.com/AkihiroSuda/containerd-fuse-overlayfs/vendor/github.com/containerd/containerd/snapshots/testsuite.checkSnapshot                                                                                                                                                                                                        
                /go/src/github.com/AkihiroSuda/containerd-fuse-overlayfs/vendor/github.com/containerd/containerd/snapshots/testsuite/helpers.go:105                                                                                                                                                                                           
            github.com/AkihiroSuda/containerd-fuse-overlayfs/vendor/github.com/containerd/containerd/snapshots/testsuite.checkSnapshots                                                                                                                                                                                                       
                /go/src/github.com/AkihiroSuda/containerd-fuse-overlayfs/vendor/github.com/containerd/containerd/snapshots/testsuite/helpers.go:132                                                                                                                                                                                           
            github.com/AkihiroSuda/containerd-fuse-overlayfs/vendor/github.com/containerd/containerd/snapshots/testsuite.checkLayerFileUpdate                                                                                                                                                                                                 
                /go/src/github.com/AkihiroSuda/containerd-fuse-overlayfs/vendor/github.com/containerd/containerd/snapshots/testsuite/issues.go:61                                                                                                                                                                                             
            github.com/AkihiroSuda/containerd-fuse-overlayfs/vendor/github.com/containerd/containerd/snapshots/testsuite.makeTest.func1                                                                                                                                                                                                       
                /go/src/github.com/AkihiroSuda/containerd-fuse-overlayfs/vendor/github.com/containerd/containerd/snapshots/testsuite/testsuite.go:112                                                                                                                                                                                         
            testing.tRunner                                                                                                                                                                                                                                                                                                                   
                /usr/local/go/src/testing/testing.go:909                                                                                                                                                                                                                                                                                      
            runtime.goexit                                                                                                                                                                                                                                                                                                                    
                /usr/local/go/src/runtime/asm_amd64.s:1357                                                                                                                                                                                                                                                                                    
            snapshot check failed on snapshot 2                                                                                                                                                                                                                                                                                               
            github.com/AkihiroSuda/containerd-fuse-overlayfs/vendor/github.com/containerd/containerd/snapshots/testsuite.checkSnapshots                                                                                                                                                                                                       
                /go/src/github.com/AkihiroSuda/containerd-fuse-overlayfs/vendor/github.com/containerd/containerd/snapshots/testsuite/helpers.go:133                                                                                                                                                                                           
            github.com/AkihiroSuda/containerd-fuse-overlayfs/vendor/github.com/containerd/containerd/snapshots/testsuite.checkLayerFileUpdate                                                                                                                                                                                                 
                /go/src/github.com/AkihiroSuda/containerd-fuse-overlayfs/vendor/github.com/containerd/containerd/snapshots/testsuite/issues.go:61                                                                                                                                                                                             
            github.com/AkihiroSuda/containerd-fuse-overlayfs/vendor/github.com/containerd/containerd/snapshots/testsuite.makeTest.func1                                                                                                                                                                                                       
                /go/src/github.com/AkihiroSuda/containerd-fuse-overlayfs/vendor/github.com/containerd/containerd/snapshots/testsuite/testsuite.go:112                                                                                                                                                                                         
            testing.tRunner                                                                                                                                                                                                                                                                                                                   
                /usr/local/go/src/testing/testing.go:909                                                                                                                                                                                                                                                                                      
            runtime.goexit                                                                                                                                                                                                                                                                                                                    
                /usr/local/go/src/runtime/asm_amd64.s:1357                                                                                                                                                                                                                                                                                    
        helpers.go:67: drwx------       4096 /tmp/snapshot-suite-fuse-overlayfs-538511347                                                                                                                                                                                                                                                     
        helpers.go:67: drwxr-xr-x       4096 /tmp/snapshot-suite-fuse-overlayfs-538511347/root                                                                                                                                                                                                                                                
        helpers.go:65: -rw-------      65536 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/metadata.db [ "\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\xed\xda\f\xed\x02\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\b\x00\x00\x00\x00\x00\x00\x00\x0f\x
00\x00\x00\x00\x00\x00\x00" ...]                                                                                                                                                                                                                                                                                                              
        helpers.go:67: drwx------       4096 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots                                                                                                                                                                                                                                      
        helpers.go:67: drwx------       4096 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/1                                                                                                                                                                                                                                    
        helpers.go:67: drwxr-xr-x       4096 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/1/fs                                                                                                                                                                                                                                 
        helpers.go:67: drwx------       4096 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/1/fs/etc                                                                                                                                                                                                                             
        helpers.go:65: -rw-r--r--         17 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/1/fs/etc/hosts [ "mydomain 10.0.0.1" ...]                                                                                                                                                                                            
        helpers.go:65: -rw-r--r--         13 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/1/fs/etc/profile [ "PATH=/usr/bin" ...]                                                                                                                                                                                              
        helpers.go:67: drwx--x--x       4096 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/1/work                                                                                                                                                                                                                               
        helpers.go:67: drwx------       4096 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/3                                                                                                                                                                                                                                    
        helpers.go:67: drwxr-xr-x       4096 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/3/fs                                                                                                                                                                                                                                 
        helpers.go:67: drwx------       4096 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/3/fs/etc                                                                                                                                                                                                                             
        helpers.go:65: -rw-r--r--         17 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/3/fs/etc/hosts [ "mydomain 10.0.0.2" ...]                                                                                                                                                                                            
        helpers.go:65: -rw-rw-rw-         13 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/3/fs/etc/profile [ "PATH=/usr/bin" ...]                                                                                                                                                                                              
        helpers.go:67: drwx------       4096 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/3/fs/root                                                                                                                                                                                                                            
        helpers.go:65: -rw-r--r--         23 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/3/fs/root/.bashrc [ "PATH=/usr/sbin:/usr/bin" ...]                                                                                                                                                                                   
        helpers.go:67: drwx--x--x       4096 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/3/work                                                                                                                                                                                                                               
        helpers.go:67: drwx------       4096 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/3/work/work                                                                                                                                                                                                                          
        helpers.go:67: drwx------       4096 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/5                                                                                                                                                                                                                                    
        helpers.go:67: drwxr-xr-x       4096 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/5/fs                                                                                                                                                                                                                                 
        helpers.go:67: drwx------       4096 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/5/fs/etc                                                                                                                                                                                                                             
        helpers.go:65: -rw-r--r--         17 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/5/fs/etc/hosts [ "mydomain 10.0.0.1" ...]                                                                                                                                                                                            
        helpers.go:65: -rw-r--r--         13 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/5/fs/etc/profile [ "PATH=/usr/bin" ...]                                                                                                                                                                                              
        helpers.go:67: drwx--x--x       4096 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/5/work                                                                                                                                                                                                                               
        helpers.go:67: drwx------       4096 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/7                                                                                                                                                                                                                                    
        helpers.go:67: drwxr-xr-x       4096 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/7/fs                                                                                                                                                                                                                                 
        helpers.go:67: drwx------       4096 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/7/fs/etc                                                                                                                                                                                                                             
        helpers.go:65: -rw-r--r--         17 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/7/fs/etc/hosts [ "mydomain 10.0.0.2" ...]                                                                                                                                                                                            
        helpers.go:65: -rw-rw-rw-         13 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/7/fs/etc/profile [ "PATH=/usr/bin" ...]                                                                                                                                                                                              
        helpers.go:67: drwx------       4096 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/7/fs/root                                                                                                                                                                                                                            
        helpers.go:65: -rw-r--r--          0 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/7/fs/root/.bashrc [ "" ...]                                                                                                                                                                                                          
        helpers.go:67: drwx--x--x       4096 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/7/work                                                                                                                                                                                                                               
        helpers.go:67: drwx------       4096 /tmp/snapshot-suite-fuse-overlayfs-538511347/root/snapshots/7/work/work                                                                                                                                                                                                                          
        helpers.go:67: drwxr-xr-x       4096 /tmp/snapshot-suite-fuse-overlayfs-538511347/work                                                                                                                                                                                                                                                
    --- PASS: TestFUSEOverlayFS/RootPermission (0.00s)                                                                                                                 
        helpers_unix.go:32: unmount /tmp/snapshot-suite-fuse-overlayfs-981504114/work/preparing    

tree: 5e1e2cf
kernel: 5.0.0-31-generic #33~18.04.1-Ubuntu


make test succeeds on Ubuntu 19.10 kernel 5.3.0-18-generic #19-Ubuntu

two independent copies of golang.org/x/net/trace

Hi, when embedding this plugin in containerd I get the following error message:

containerd config default
panic: /debug/requests is already registered. You may have two independent copies of golang.org/x/net/trace in your binary, trying to maintain separate state. This may involve a vendored copy of golang.org/x/net/trace.
goroutine 1 [running]:
github.com/AkihiroSuda/containerd-fuse-overlayfs/vendor/golang.org/x/net/trace.init.0()
/home/vagrant/workspace/src/github.com/AkihiroSuda/containerd-fuse-overlayfs/vendor/golang.org/x/net/trace/trace.go:123 +0x1a7

I'm using the following sequence to embed and start the runtime:

### build / install containerd

pushd . > /dev/null
cd ${GOPATH}/src/github.com/containerd/containerd
make
sudo make install
popd > /dev/null

### embed fuse-overlayfs plugin into the containerd binary

go get github.com/AkihiroSuda/containerd-fuse-overlayfs 

cp builtins_fuseoverlayfs_linux.go.template ${GOPATH}/src/github.com/containerd/containerd/cmd/containerd/builtins_fuseoverlayfs_linux.go

### rebuild build / re-install containerd

pushd . > /dev/null
cd ${GOPATH}/src/github.com/containerd/containerd
make
sudo make install
popd > /dev/null

### run containerd

pushd . > /dev/null
containerd config default >/tmp/config.toml

I guess both projects (the plugin and containerd) are "vendoring" golang.org/x/net/trace therefore the duplicate. I tried to remove it from the projects but this creates a build break.

Do you have any hint how to circumvent it? Thanks!

EDIT:
I wanted to add that I checked out containerd 1.2.10:

go get github.com/containerd/containerd
cd ${GOPATH}/src/github.com/containerd/containerd
git checkout "v1.2.10"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.