set state to stopped
Signed-off-by: haozi007 <liuhao27@huawei.com>
This commit is contained in:
parent
83809936a1
commit
0c96188924
29
0059-set-state-to-stopped.patch
Normal file
29
0059-set-state-to-stopped.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
From cdaabd27b2d3d091007d816d396c0b55301f2a42 Mon Sep 17 00:00:00 2001
|
||||||
|
From: haozi007 <liuhao27@huawei.com>
|
||||||
|
Date: Mon, 27 Apr 2020 10:54:37 +0800
|
||||||
|
Subject: [PATCH] set state to stopped
|
||||||
|
|
||||||
|
if send cmd to lxc-monitor timeout
|
||||||
|
|
||||||
|
Signed-off-by: haozi007 <liuhao27@huawei.com>
|
||||||
|
---
|
||||||
|
src/lxc/commands.c | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/lxc/commands.c b/src/lxc/commands.c
|
||||||
|
index c32aef19..37354e87 100644
|
||||||
|
--- a/src/lxc/commands.c
|
||||||
|
+++ b/src/lxc/commands.c
|
||||||
|
@@ -122,6 +122,9 @@ static int lxc_cmd_rsp_recv(int sock, struct lxc_cmd_rr *cmd)
|
||||||
|
#ifdef HAVE_ISULAD
|
||||||
|
/*isulad: add timeout 1s to avoid long block due to [lxc monitor] error*/
|
||||||
|
ret = lxc_abstract_unix_recv_fds_timeout(sock, &fd_rsp, 1, rsp, sizeof(*rsp), 1000 * 1000);
|
||||||
|
+ if (ret < 0 && (errno == ECONNRESET || errno == EAGAIN || errno == EWOULDBLOCK)) {
|
||||||
|
+ errno = ECONNRESET; /*isulad set errno ECONNRESET when timeout */
|
||||||
|
+ }
|
||||||
|
#else
|
||||||
|
ret = lxc_abstract_unix_recv_fds(sock, &fd_rsp, 1, rsp, sizeof(*rsp));
|
||||||
|
#endif
|
||||||
|
--
|
||||||
|
2.25.3
|
||||||
|
|
||||||
4
lxc.spec
4
lxc.spec
@ -1,4 +1,4 @@
|
|||||||
%global _release 2020042302
|
%global _release 2020042801
|
||||||
%global debug_package %{nil}
|
%global debug_package %{nil}
|
||||||
|
|
||||||
Name: lxc
|
Name: lxc
|
||||||
@ -65,6 +65,8 @@ Patch9053: 0054-start-do-not-check-pid-die-when-lxc_poll-exit.patch
|
|||||||
Patch9054: 0055-terminal-not-close-pipe-when-lxc_poll-exit.patch
|
Patch9054: 0055-terminal-not-close-pipe-when-lxc_poll-exit.patch
|
||||||
Patch9055: 0056-attach-add-sigfd-to-monitor-the-exit-of-pid.patch
|
Patch9055: 0056-attach-add-sigfd-to-monitor-the-exit-of-pid.patch
|
||||||
Patch9056: 0057-attach-add-read-data-from-attach-sigfd.patch
|
Patch9056: 0057-attach-add-read-data-from-attach-sigfd.patch
|
||||||
|
Patch9057: 0058-support-syslog-for-console.patch
|
||||||
|
Patch9058: 0059-set-state-to-stopped.patch
|
||||||
|
|
||||||
BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath
|
BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath
|
||||||
BuildRequires: pkgconfig(libseccomp)
|
BuildRequires: pkgconfig(libseccomp)
|
||||||
|
|||||||
@ -56,3 +56,4 @@
|
|||||||
0056-attach-add-sigfd-to-monitor-the-exit-of-pid.patch
|
0056-attach-add-sigfd-to-monitor-the-exit-of-pid.patch
|
||||||
0057-attach-add-read-data-from-attach-sigfd.patch
|
0057-attach-add-read-data-from-attach-sigfd.patch
|
||||||
0058-support-syslog-for-console.patch
|
0058-support-syslog-for-console.patch
|
||||||
|
0059-set-state-to-stopped.patch
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user