-
Notifications
You must be signed in to change notification settings - Fork 31
Task was destroyed but it is pending! #13
Copy link
Copy link
Open
Description
After sending mysqld a SIGTERM singal to shut it down,
chaperone detects this but an error message occurs.
mysqld.conf for mariadb/mysql official Dockerhub image:
# mysqld.conf
settings: {
env_set: {
"MYSQL_PID_FILE": "/run/mysqld/mysqld.pid"
},
env_inherit: [
"MYSQL_ROOT_PASSWORD",
"MYSQL_DATABASE",
"MYSQL_USER",
"MYSQL_PASSWORD",
"MYSQL_ALLOW_EMPTY_PASSWORD",
"MYSQL_RANDOM_ROOT_PASSWORD",
"MYSQL_ONETIME_PASSWORD"
]
}
mysql1.service: {
type: forking,
command: "mysqld",
enabled: false,
uid: mysql,
gid: mysql,
service_groups: database,
pidfile: "$(MYSQL_PID_FILE)",
}
# setup script starts also mysqld
mysql.service: {
type: simple,
command: "/docker-entrypoint.sh mysqld",
# Dockerfile entrypoint + default cmd
uid: root,
gid: root,
pidfile: "$(MYSQL_PID_FILE)",
process_timeout: 60,
restart: true,
enabled: true,
stderr: "log",
service_groups: database,
}
$ docker exec test killall -s SIGTERM mysqld
Docker log:
Dec 6 12:33:13 e1588f1e7257 mysql[152]: 2016-12-06 12:33:13 140467036891072 [Note] mysqld (mysqld 10.1.19-MariaDB-1~jessie) starting as process 9 ...
Dec 6 12:35:00 e1588f1e7257 chaperone[1]: REAP pid=9,status=0
Dec 6 12:35:00 e1588f1e7257 chaperone[1]: no child processes present
Dec 6 12:35:00 e1588f1e7257 chaperone[1]: mysql.service exit status for pid=9 is '<ProcStatus exit_status=0>'
Dec 6 12:35:00 e1588f1e7257 chaperone[1]: Final termination phase.
Task was destroyed but it is pending!
task: <Task pending coro=<_monitor_service() running at /usr/local/lib/python3.4/dist-packages/chaperone/cproc/pt/simple.py:29> wait_for=<Future pending cb=[Task._wakeup()]> cb=[SubProcess.add_pending.<locals>.<lambda>() at /usr/local/lib/python3.4/dist-packages/chaperone/cproc/subproc.py:631]>
The mysql process should have been restarted by chaperone,
but it terminated completely and the Docker container stopped.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels