Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot connect a container to a network by ID #2436

Closed
sam-berning opened this issue Aug 15, 2023 · 0 comments · Fixed by #2589
Closed

Cannot connect a container to a network by ID #2436

sam-berning opened this issue Aug 15, 2023 · 0 comments · Fixed by #2589
Labels
area/network bug Something isn't working

Comments

@sam-berning
Copy link

Description

If I try to start a container with a network specified by its nerdctl ID instead of its name, the container will fail to start with the message "no such network", even though the network exists.

Steps to reproduce the issue

  1. sudo nerdctl network create test-network
  2. sudo nerdctl run --network <network-id> <some-image>

Describe the results you received and expected

Results:

FATA[0011] failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: time="2023-08-15T17:09:23Z" level=fatal msg="no such network: \"1841d116ee60eebf90828f0853d4c5f2aef580387077e2677290c4d8dceb4195\""
Failed to write to log, write /var/lib/nerdctl/1935db59/containers/finch/54a9533f8f83c7be6e133eecd89613a4f1be1ae40aeb5c1b4b0e0316933add18/oci-hook.createRuntime.log: file already closed: unknown

Expected: container should start successfully

What version of nerdctl are you using?

$ sudo nerdctl version
Client:
 Version:	v1.4.0
 OS/Arch:	linux/arm64
 Git commit:	7e8114a82da342cdbec9a518c5c6a1cce58105e9
 buildctl:
  Version:	v0.11.6
  GitCommit:	2951a28cd7085eb18979b1f710678623d94ed578

Server:
 containerd:
  Version:	v1.7.1
  GitCommit:	1677a17964311325ed1c31e2c0a3589ce6d5c30d
 runc:
  Version:	1.1.7
  GitCommit:	v1.1.7-0-g860f061b

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

Lima

Host information

Running nerdctl on my Mac in a Lima VM (using Finch)

$ sudo nerdctl info
Client:
 Namespace:	finch
 Debug Mode:	false

Server:
 Server Version: v1.7.1
 Storage Driver: overlayfs
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Log: fluentd journald json-file syslog
  Storage: native overlayfs stargz
 Security Options:
  seccomp
   Profile: default
  cgroupns
 Kernel Version: 6.3.12-200.fc38.aarch64
 Operating System: Fedora Linux 38 (Cloud Edition)
 OSType: linux
 Architecture: aarch64
 CPUs: 3
 Total Memory: 15.57GiB
 Name: lima-finch
 ID: bfae37fa-8ddb-4024-9460-432c13510b0b
@sam-berning sam-berning added the kind/unconfirmed-bug-claim Unconfirmed bug claim label Aug 15, 2023
@AkihiroSuda AkihiroSuda added bug Something isn't working area/network and removed kind/unconfirmed-bug-claim Unconfirmed bug claim labels Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/network bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants