containerd / nerdctl

contaiNERD CTL - Docker-compatible CLI for containerd, with support for Compose, Rootless, eStargz, OCIcrypt, IPFS, ...
Apache License 2.0
8.01k stars 594 forks source link

nerdctl compose up stuck on creating container #3520

Open andresrv88 opened 4 days ago

andresrv88 commented 4 days ago

Description

I'm trying to create an environment to use fluentbit to forawrd logs to an HTTP and a TCP service.

I have been able to do this in Docker but it seems that there is a bug in containerd so I need to test it.

I have installed Rancher Desktop on windows and I'm using nerdctl CLI to create everything from a docker-compose.yml file (The same used with docker).

Unfortunately the process is getting stuck on the following step:

avillegas@ITMES5CD41761PF:~/fluentbit-local$ nerdctl --insecure-registry compose --debug -f docker-compose.yml up
<3>WSL (2574) ERROR: CreateProcessParseCommon:711: Failed to translate \\wsl.localhost\Ubuntu\home\avillegas\fluentbit-local
INFO[0000] Creating network nerdctl-tmp1559687876_default
WARN[0000] Ignoring: service fluentbit: depends_on: http-service: [Required]
WARN[0000] Ignoring: service fluentbit: depends_on: tcp-service: [Required]
INFO[0000] Ensuring image fluentbit-local-http-service:latest
DEBU[0000] verifying process skipped
INFO[0000] Ensuring image fluentbit-local-tcp-service:latest
DEBU[0000] verifying process skipped
INFO[0000] Ensuring image fluent/fluent-bit:3.1.6-amd64
DEBU[0000] verifying process skipped
DEBU[0000] filters: [labels."com.docker.compose.project"==nerdctl-tmp1559687876,labels."com.docker.compose.service"==http-service]
INFO[0000] Creating container express-logger
DEBU[0000] verifying process skipped
DEBU[0000] generated log driver: binary:///usr/local/libexec/nerdctl/nerdctl?_NERDCTL_INTERNAL_LOGGING=%2Fvar%2Flib%2Fnerdctl%2Fdbb19c5e
DEBU[0000] remote introspection plugin filters           filters="[type==io.containerd.snapshotter.v1, id==overlayfs]"

The first time I ran the compose up I was able to create all the containers but I had a problem with the etc volume for fluentbit. After fixing the mapping issue (changing relative path to absolute) the containers never started again. They even got stuck till the point I had to kill Rancher Desktop to destroy them.

Here is the compose yaml:

services:
  http-service:
    image: fluentbit-local-http-service:latest
    #build: ./express
    container_name: express-logger
    ports:
      - "9999:9999"
    environment:
      PORT: 9999

  tcp-service:
    image: fluentbit-local-tcp-service:latest
    #build: ./tcp
    container_name: tcp-logger
    ports:
      - "7777:7777"
    environment:
      PORT: 7777

  fluentbit:<!-- Failed to upload "http-service.zip" -->

    image: fluent/fluent-bit:3.1.6-amd64
    container_name: fluentbit-local
    ports:
      - "2020:2020"
    depends_on:
      - http-service
      - tcp-service
    volumes:
      - /home/avillegas/fluentbit-local/etc:/fluent-bit/etc
      - /mnt/c/AnypointStudio/plugins/org.mule.tooling.server.4.7.ee_7.18.0.202405262218/mule/logs:/home/nonroot

Both images

Image

Everything is being run from WSL (Ubuntu) on a Windows 11 machine.

Steps to reproduce the issue

  1. Import and pull the images
  2. Change the volume paths to something on your local machine
  3. run the nerdctl compose up command with the yaml provided

Describe the results you received and expected

The expected result is that the 3 containers will start and I will be able to use the fluent bit container to forward the logs from a tailed file to the HTTP and TCP services on the other containers

What version of nerdctl are you using?

Client: Version: v1.7.7 OS/Arch: linux/amd64 Git commit: 5882c720f4e7f358fb26b759e514b3ae9dd8ea83 buildctl: Version: v0.16.0 GitCommit: 0865fcc9b78559e856e81dc52b3613701e7be28d

Server: containerd: Version: v1.7.22 GitCommit: 7f7fdf5fed64eb6a7caf99b3e12efcf9d60e311c runc: Version: 1.1.15 GitCommit: v1.1.15-0-gbc20cb44

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

Host information

Client: Namespace: default Debug Mode: false

Server: Server Version: v1.7.22 Storage Driver: overlayfs Logging Driver: json-file Cgroup Driver: none Cgroup Version: 1 Plugins: Log: fluentd journald json-file syslog Storage: native overlayfs Security Options: seccomp Profile: builtin rootless Kernel Version: 5.15.146.1-microsoft-standard-WSL2 Operating System: Ubuntu 22.04.3 LTS OSType: linux Architecture: x86_64 CPUs: 12 Total Memory: 7.419GiB Name: ITMES5CD41761PF ID: c2a10d8e-6202-4740-a0fa-630d4e37d29f

WARNING: Running in rootless-mode without cgroups. To enable cgroups in rootless-mode, you need to boot the system in cgroup v2 mode. WARNING: IPv4 forwarding is disabled

andresrv88 commented 4 days ago

Here is a google drive link with the docker images for the HTTP and TCP services

https://drive.google.com/file/d/1sXPMWH2zOhc4cbfnVlG-_QEB-gNhiloI/view?usp=sharing