diff --git a/0059-set-state-to-stopped.patch b/0059-set-state-to-stopped.patch new file mode 100644 index 0000000000000000000000000000000000000000..184fc05f617f110b14023af1c37c7c29c2305bab --- /dev/null +++ b/0059-set-state-to-stopped.patch @@ -0,0 +1,29 @@ +From cdaabd27b2d3d091007d816d396c0b55301f2a42 Mon Sep 17 00:00:00 2001 +From: haozi007 +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 +--- + 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 + diff --git a/lxc.spec b/lxc.spec index 5cd4d9967dcd1078e5c028b6c6e85dd38ff1d2d2..082ac29cead80408aa5bc7bd0212508521460141 100644 --- a/lxc.spec +++ b/lxc.spec @@ -1,4 +1,4 @@ -%global _release 2020042302 +%global _release 2020042801 %global debug_package %{nil} 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 Patch9055: 0056-attach-add-sigfd-to-monitor-the-exit-of-pid.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: pkgconfig(libseccomp) diff --git a/series.conf b/series.conf index 21e500b9a53e454ac8c1d2c1a8ebeed963175f1a..8ee2ff598c03c6d0d984130df2e5ce38b1179f67 100644 --- a/series.conf +++ b/series.conf @@ -56,3 +56,4 @@ 0056-attach-add-sigfd-to-monitor-the-exit-of-pid.patch 0057-attach-add-read-data-from-attach-sigfd.patch 0058-support-syslog-for-console.patch +0059-set-state-to-stopped.patch