!27 fix wait child process hang and remove lxcfs-tools dependency
From: @zhangsong234 Reviewed-by: @lifeng2221dd1 Signed-off-by: @lifeng2221dd1
This commit is contained in:
commit
ec4bf72602
32
0016-remove-lxcfs-tools-dependency-for-common-use.patch
Normal file
32
0016-remove-lxcfs-tools-dependency-for-common-use.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From 93a91769aaece5bcdac817443e31cd0a15a0952a Mon Sep 17 00:00:00 2001
|
||||
From: zhangsong234 <zhangsong34@huawei.com>
|
||||
Date: Tue, 30 Mar 2021 15:14:24 +0800
|
||||
Subject: [PATCH] remove lxcfs-tools dependency for common use
|
||||
|
||||
Signed-off-by: zhangsong234 <zhangsong34@huawei.com>
|
||||
---
|
||||
config/init/systemd/lxcfs.service.in | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/config/init/systemd/lxcfs.service.in b/config/init/systemd/lxcfs.service.in
|
||||
index 3d763c6..bdaa2fa 100644
|
||||
--- a/config/init/systemd/lxcfs.service.in
|
||||
+++ b/config/init/systemd/lxcfs.service.in
|
||||
@@ -5,11 +5,11 @@ Before=lxc.service
|
||||
Documentation=man:lxcfs(1)
|
||||
|
||||
[Service]
|
||||
-ExecStartPre=/usr/local/bin/lxcfs-tools prestart
|
||||
+ExecStartPre=-/usr/local/bin/lxcfs-tools prestart
|
||||
ExecStart=/usr/bin/lxcfs /var/lib/lxc/lxcfs/
|
||||
-ExecStartPost=/usr/local/bin/lxcfs-tools remount -a
|
||||
+ExecStartPost=-/usr/local/bin/lxcfs-tools remount -a
|
||||
KillMode=process
|
||||
-ExecStop=/usr/local/bin/lxcfs-tools umount -a
|
||||
+ExecStop=-/usr/local/bin/lxcfs-tools umount -a
|
||||
ExecStopPost=-/bin/fusermount -u /var/lib/lxc/
|
||||
Delegate=yes
|
||||
ExecReload=/bin/kill -USR1 $MAINPID
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
30
0017-proc_fuse-fix-wait-child-process-hang.patch
Normal file
30
0017-proc_fuse-fix-wait-child-process-hang.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From aa362b383ca5e79e03fd350867fb4f96a1335ae5 Mon Sep 17 00:00:00 2001
|
||||
From: zhangsong234 <zhangsong34@huawei.com>
|
||||
Date: Thu, 27 May 2021 10:16:00 +0800
|
||||
Subject: [PATCH] proc_fuse: fix wait child process hang
|
||||
|
||||
Signed-off-by: zhangsong234 <zhangsong34@huawei.com>
|
||||
---
|
||||
src/proc_fuse.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/proc_fuse.c b/src/proc_fuse.c
|
||||
index 96eb9d7..82b32c1 100644
|
||||
--- a/src/proc_fuse.c
|
||||
+++ b/src/proc_fuse.c
|
||||
@@ -487,11 +487,11 @@ struct devinfo* container_dev_read(pid_t pid) {
|
||||
dev_num = dev_stat.st_dev & (~0xf);
|
||||
fprintf(stream, "sda %d end 0 ", dev_num);
|
||||
fflush(stream);
|
||||
+child_out:
|
||||
fclose(stream);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
-child_out:
|
||||
close(mypipe[1]);
|
||||
stream = fdopen(mypipe[0], "r");
|
||||
if (stream == NULL) {
|
||||
--
|
||||
2.27.0
|
||||
|
||||
12
lxcfs.spec
12
lxcfs.spec
@ -4,9 +4,9 @@
|
||||
#Basic Information
|
||||
Name: lxcfs
|
||||
Version: 4.0.5
|
||||
Release: 3
|
||||
Release: 5
|
||||
Summary: FUSE filesystem for LXC
|
||||
License: Apache-2.0
|
||||
License: LGPL 2.1+
|
||||
URL: http://linuxcontainers.org
|
||||
Source: https://linuxcontainers.org/downloads/%{name}/%{name}-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@ -25,6 +25,8 @@ Patch9012: 0012-lxcfs-proc_diskstats_read-func-obtain-data-from-blki.patch
|
||||
Patch9013: 0013-add-secure-compile-option-in-Makefile.patch
|
||||
Patch9014: 0014-fix-proc-diskstats-show-in-container.patch
|
||||
Patch9015: 0015-lxcfs-adapt-4.18-kernel.patch
|
||||
Patch9016: 0016-remove-lxcfs-tools-dependency-for-common-use.patch
|
||||
Patch9017: 0017-proc_fuse-fix-wait-child-process-hang.patch
|
||||
|
||||
#Dependency
|
||||
BuildRequires: autoconf automake libtool help2man
|
||||
@ -84,6 +86,12 @@ fi
|
||||
%{_unitdir}/*
|
||||
|
||||
%changelog
|
||||
* Thu May 27 2021 zhangsong234 <zhangsong34@huawei.com> - 4.0.5-5
|
||||
- proc_fuse: fix wait child process hang
|
||||
|
||||
* Tue Mar 30 2021 zhangsong234 <zhangsong34@huawei.com> - 4.0.5-4
|
||||
- remove lxcfs-tools dependency for common use
|
||||
|
||||
* Mon Nov 30 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.0.5-2
|
||||
- fix reinstall bug
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user