Open MVJosh opened 2 years ago
# Meta details
Running `kata-collect-data.sh` version `1.13.0-alpha0 (commit )` at `2022-07-27.09:49:32.391809397+0000`.
---
Runtime is `/usr/bin/kata-runtime`.
# `kata-env`
Output of "`/usr/bin/kata-runtime kata-env`":
```toml
[Meta]
Version = "1.0.24"
[Runtime]
Debug = false
Trace = false
DisableGuestSeccomp = true
DisableNewNetNs = false
SandboxCgroupOnly = false
Path = "/usr/bin/kata-runtime"
[Runtime.Version]
OCI = "1.0.1-dev"
[Runtime.Version.Version]
Semver = "1.13.0-alpha0"
Major = 1
Minor = 13
Patch = 0
Commit = ""
[Runtime.Config]
Path = "/usr/share/defaults/kata-containers/configuration.toml"
[Hypervisor]
MachineType = "pc"
Version = "QEMU emulator version 5.0.0\nCopyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers"
Path = "/usr/bin/qemu-vanilla-system-x86_64"
BlockDeviceDriver = "virtio-scsi"
EntropySource = "/dev/urandom"
SharedFS = "virtio-9p"
VirtioFSDaemon = "/usr/bin/virtiofsd"
Msize9p = 8192
MemorySlots = 10
PCIeRootPort = 0
HotplugVFIOOnRootBus = false
Debug = false
UseVSock = false
[Image]
Path = "/usr/share/kata-containers/kata-containers-image_clearlinux_1.13.0-alpha0_agent_27b90c2690.img"
[Kernel]
Path = "/usr/share/kata-containers/vmlinuz-5.4.60.91-52.container"
Parameters = "systemd.unit=kata-containers.target systemd.mask=systemd-networkd.service systemd.mask=systemd-networkd.socket scsi_mod.scan=none"
[Initrd]
Path = ""
[Proxy]
Type = "kataProxy"
Path = "/usr/libexec/kata-containers/kata-proxy"
Debug = false
[Proxy.Version]
Semver = "1.13.0-alpha0-5949d14"
Major = 1
Minor = 13
Patch = 0
Commit = "<
Hi @MVJosh, it seems you are using the deprecated 1.x series of Kata Containers that already been unmaintained, you'd better to upgrade to new version?
And even in the latest Kata Containers, it doesn't support docker run net=container
or docker run --link
.
Description of problem
When running a container with the kata runtime (via docker), if
--network container:<other_container_id>
is specified the kata container can start initially, but if it is restarted (for example after a crash) docker returns an errorError response from daemon: Cannot restart container <container_id>: failed to create shim task: OCI runtime create failed: Failed to add qdisc for network index 2 : file exists: unknown
.Note: I can run kata containers with their own networking stack just fine, and they restart without problem. It's only when sharing a network namespace with another container that the problem arises.
Steps to reproduce:
Expected result
Kata container in shared network namespace should restart successfully
Actual result
Docker fails to restart Kata container in shared network namespace with:
Further information
This is motivated by trying to run Kata containers in HashiCorp Nomad (using the Docker task driver). Nomad runs containers in a shared network namespaces by starting a parent "pause" container, then starting the main task container in the parent's namespace.