-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Description
Description
Hello,
I'm wondering if it is on purpose that a TERM signal sent to the docker client process does not terminate the plugin it started.
This causes for example when running docker compose build and sending a TERM signal to the docker process` the compose plugin process continues to run.
Are there scenarions for plugins where it's desirable for the process continue running after the docker-client process has terminated?
Or should SysProcAttr.Pdeathsig be actually set for the started plugins?
docker version:
$ docker version
Client:
Version: 24.0.2
API version: 1.43
Go version: go1.20.4
Git commit: cb74dfcd85
Built: Mon May 29 15:50:06 2023
OS/Arch: linux/amd64
Context: default
Server:
Engine:
Version: 24.0.2
API version: 1.43 (minimum version 1.12)
Go version: go1.20.4
Git commit: 659604f9ee
Built: Mon May 29 15:50:06 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.7.1
GitCommit: 1677a17964311325ed1c31e2c0a3589ce6d5c30d.m
runc:
Version: 1.1.7
GitCommit:
docker-init:
Version: 0.19.0
GitCommit: de40ad0
docker info:
Client:
Version: 24.0.2
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: 0.10.5
Path: /usr/lib/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: 2.18.1
Path: /usr/lib/docker/cli-plugins/docker-compose
scan: Docker Scan (Docker Inc.)
Version: v0.1.0-280-gc7fa31d4c4
Path: /usr/lib/docker/cli-plugins/docker-scan
Server:
Containers: 102
Running: 0
Paused: 0
Stopped: 102
Images: 150
Server Version: 24.0.2
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: true
Native Overlay Diff: false
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 1677a17964311325ed1c31e2c0a3589ce6d5c30d.m
runc version:
init version: de40ad0
Security Options:
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.3.5-arch1-1
Operating System: Arch Linux
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 15.49GiB
Name: ltop
ID: KG5D:KMFV:DN27:F7AC:JLAN:USYW:MEB7:TXZQ:LASN:WAKE:OPJD:SULT
Docker Root Dir: /var/lib/docker
Debug Mode: false
Username: sisubot
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
How to Reproduce
Create the following executable bash-script to act as docker-plugin:
~/.docker/cli-plugins/docker-test
#!/usr/bin/env bash
sleep 50000- run docker test
- send a TERM signal to the
docker testprocess - check if the
.docker/cli-plugins/docker-testprocess still runs, it does
Related to: docker/compose#10634 (comment)
sirkjohannsen, bogue1979, FranciscoKurpiel and nocive