!499 [sync] PR-498: containers in the FREEZING state also need to be unfreeze
* containers in the FREEZING state also need to be unfreeze
This commit is contained in:
parent
f3f5729e93
commit
1b1210440a
@ -0,0 +1,32 @@
|
||||
From 0b9387f46b4656b6f7f87abb86153013e561c242 Mon Sep 17 00:00:00 2001
|
||||
From: zhongtao <zhongtao17@huawei.com>
|
||||
Date: Mon, 11 Sep 2023 20:05:49 +0800
|
||||
Subject: [PATCH] containers in the FREEZING state also need to be unfreeze
|
||||
|
||||
Signed-off-by: zhongtao <zhongtao17@huawei.com>
|
||||
---
|
||||
src/lxc/lxccontainer.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
|
||||
index cc6c5cd..3ce2ba7 100644
|
||||
--- a/src/lxc/lxccontainer.c
|
||||
+++ b/src/lxc/lxccontainer.c
|
||||
@@ -546,7 +546,14 @@ static bool do_lxcapi_unfreeze(struct lxc_container *c)
|
||||
return false;
|
||||
|
||||
s = lxc_getstate(c->name, c->config_path);
|
||||
+#ifdef HAVE_ISULAD
|
||||
+ // Prevent lxc from unexpectedly exiting when executing freeze,
|
||||
+ // causing the container to be in the FREEZING state,
|
||||
+ // making normal life cycle management impossible.
|
||||
+ if (s == FROZEN || s == FREEZING)
|
||||
+#else
|
||||
if (s == FROZEN)
|
||||
+#endif
|
||||
return lxc_unfreeze(c->lxc_conf, c->name, c->config_path) == 0;
|
||||
|
||||
return true;
|
||||
--
|
||||
2.25.1
|
||||
|
||||
9
lxc.spec
9
lxc.spec
@ -1,4 +1,4 @@
|
||||
%global _release 2022102422
|
||||
%global _release 2022102423
|
||||
|
||||
Name: lxc
|
||||
Version: 4.0.3
|
||||
@ -43,6 +43,7 @@ Patch0032: 0032-fix-load-bpf-failed.patch
|
||||
Patch0033: 0033-fix-mount-device-path-incorrect.patch
|
||||
Patch0034: 0034-add-secure-compile-macro.patch
|
||||
Patch0035: 0035-codecheck-fix.patch
|
||||
Patch0036: 0036-containers-in-the-FREEZING-state-also-need-to-be-unf.patch
|
||||
|
||||
BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath
|
||||
BuildRequires: pkgconfig(libseccomp)
|
||||
@ -229,6 +230,12 @@ rm -rf %{buildroot}%{_sysconfdir}/default/%{name}
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Sep 11 2023 zhongtao<zhongtao17@huawei.com> - 4.0.3-2022102423
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC: containers in the FREEZING state also need to be unfreeze
|
||||
|
||||
* Wed Sep 06 2023 zhangxiaoyu<zhangxiaoyu58@huawei.com> - 4.0.3-2022102422
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user