[lxc-devel] [lxc/lxc] 6ff5e5: commands: non-functional changes
GitHub
noreply at github.com
Mon Nov 20 22:26:33 UTC 2017
Branch: refs/heads/stable-2.1
Home: https://github.com/lxc/lxc
Commit: 6ff5e517ba4a0921077183be355c2ab39e9b5d20
https://github.com/lxc/lxc/commit/6ff5e517ba4a0921077183be355c2ab39e9b5d20
Author: Christian Brauner <christian.brauner at ubuntu.com>
Date: 2017-11-20 (Mon, 20 Nov 2017)
Changed paths:
M src/lxc/commands.c
M src/lxc/commands.h
M src/lxc/commands_utils.c
M src/lxc/commands_utils.h
M src/lxc/start.c
Log Message:
-----------
commands: non-functional changes
Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
Commit: 16f67810e28e762c1da47c86b7d7e08c17de9c2f
https://github.com/lxc/lxc/commit/16f67810e28e762c1da47c86b7d7e08c17de9c2f
Author: Christian Brauner <christian.brauner at ubuntu.com>
Date: 2017-11-20 (Mon, 20 Nov 2017)
Changed paths:
M src/lxc/lxccontainer.c
Log Message:
-----------
lxccontainer: non-functional changes
Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
Commit: e2bce0ecb4bd58217f38cdcdd181e960783640ad
https://github.com/lxc/lxc/commit/e2bce0ecb4bd58217f38cdcdd181e960783640ad
Author: Christian Brauner <christian.brauner at ubuntu.com>
Date: 2017-11-20 (Mon, 20 Nov 2017)
Changed paths:
M src/lxc/commands.c
Log Message:
-----------
commands: fix state socket implementation
Remove dead state clients from state client list. Consider the following
scenario:
01 start container
02 issue shutdown request
03 state_client_fd is added to lxc_handler
03 container doesn't respond to shutdown request
04 user aborts shutdown request
05 lxc_cmd_fd_cleanup() removes state_client_fd from lxc_mainloop
06 invalid state_client_fd is still recorded in the lxc_handler
07 user issues lxc_cmd_stop() request via SIGKILL
08 container reaches STOPPED state and sends message to state_client_fd
09 state_client_fd number has been reused by lxc_cmd_stop_callback()
10 invalid data gets dumped to lxc_cmd_stop()
Reproducer:
Set an invalid shutdown signal to which the init system does not respond with a
shutdown via lxc.signal.halt e.g. "lxc.signal.halt = SIGUSR1". Then do:
1. start container
root at conventiont|~
> lxc-start -n a1
2. try to shutdown container
root at conventiont|~
> lxc-stop -n a1
3. abort shutdown
^C
4. SIGKILL the container (lxc.signal.stop = SIGKILL)
root at conventiont|~
> lxc-stop -n a1 -k
lxc-stop: a1: commands.c: lxc_cmd_rsp_recv: 165 File too large - Response data for command "stop" is too long: 12641 bytes > 8192
To not let this happen we remove the state_client_fd from the lxc_handler when
we detect a cleanup event in lxc_cmd_fd_cleanup().
Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
Compare: https://github.com/lxc/lxc/compare/a8ea013156df...e2bce0ecb4bd
More information about the lxc-devel
mailing list