]> git.proxmox.com Git - mirror_lxcfs.git/log
mirror_lxcfs.git
4 years agobindings: initialize safely
Christian Brauner [Wed, 26 Feb 2020 15:24:44 +0000 (16:24 +0100)]
bindings: initialize safely

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #328 from brauner/master
Stéphane Graber [Wed, 26 Feb 2020 13:16:01 +0000 (14:16 +0100)]
Merge pull request #328 from brauner/master

lxcfs: add --pidfd option

4 years agolxcfs: add --pidfd option
Christian Brauner [Wed, 26 Feb 2020 13:08:08 +0000 (14:08 +0100)]
lxcfs: add --pidfd option

This makes running lxcfs way more reliable. It is opt-in for now.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #327 from brauner/master
Stéphane Graber [Wed, 26 Feb 2020 12:45:52 +0000 (13:45 +0100)]
Merge pull request #327 from brauner/master

tree-wide: post-restructuring cleanup

4 years agotree-wide: post-restructuring cleanup
Christian Brauner [Wed, 26 Feb 2020 09:29:53 +0000 (10:29 +0100)]
tree-wide: post-restructuring cleanup

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #326 from brauner/2020-02-20/cgroup2_support_10
Stéphane Graber [Tue, 25 Feb 2020 23:35:22 +0000 (00:35 +0100)]
Merge pull request #326 from brauner/2020-02-20/cgroup2_support_10

restructure everything

4 years agoMakefile: add missing header files
Christian Brauner [Tue, 25 Feb 2020 17:22:16 +0000 (18:22 +0100)]
Makefile: add missing header files

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoproc: split proc virtualization into separate files
Christian Brauner [Tue, 25 Feb 2020 17:17:52 +0000 (18:17 +0100)]
proc: split proc virtualization into separate files

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agobindings: split cgroup part of lxcfs into separate files
Christian Brauner [Tue, 25 Feb 2020 16:17:10 +0000 (17:17 +0100)]
bindings: split cgroup part of lxcfs into separate files

This was long overdue since the cgroup faking part is basically unused
at this point on most kernels.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoutils: split helpers from bindings.c into utils.{c,h}
Christian Brauner [Tue, 25 Feb 2020 15:52:23 +0000 (16:52 +0100)]
utils: split helpers from bindings.c into utils.{c,h}

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agocgroups: add get_cgroup_fd() helper
Christian Brauner [Tue, 25 Feb 2020 15:18:51 +0000 (16:18 +0100)]
cgroups: add get_cgroup_fd() helper

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #325 from brauner/2020-02-20/cgroup2_support_9
Stéphane Graber [Tue, 25 Feb 2020 13:15:52 +0000 (14:15 +0100)]
Merge pull request #325 from brauner/2020-02-20/cgroup2_support_9

cgroups: fixes and improvements

4 years agocgroups: remove unused variables
Christian Brauner [Tue, 25 Feb 2020 12:33:37 +0000 (13:33 +0100)]
cgroups: remove unused variables

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agocgroups: remove ->nrtasks method
Christian Brauner [Tue, 25 Feb 2020 12:27:30 +0000 (13:27 +0100)]
cgroups: remove ->nrtasks method

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agocgroups: move mntns fd into struct cgroup_ops
Christian Brauner [Tue, 25 Feb 2020 12:11:23 +0000 (13:11 +0100)]
cgroups: move mntns fd into struct cgroup_ops

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #324 from brauner/2020-02-20/cgroup2_support_8
Stéphane Graber [Mon, 24 Feb 2020 15:21:27 +0000 (16:21 +0100)]
Merge pull request #324 from brauner/2020-02-20/cgroup2_support_8

bindings: rework {con,de}structor

4 years agobindings: rework {con,de}structor
Christian Brauner [Mon, 24 Feb 2020 15:06:25 +0000 (16:06 +0100)]
bindings: rework {con,de}structor

- Improve naming for {con,de}structor.
- Fail when we can't setup cgroups.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #323 from brauner/2020-02-20/cgroup2_support_7
Stéphane Graber [Mon, 24 Feb 2020 12:50:04 +0000 (07:50 -0500)]
Merge pull request #323 from brauner/2020-02-20/cgroup2_support_7

bindings: port cpuview to new cgroup getters & cleanup macro expansion

4 years agobindings: use more cleanup macros
Christian Brauner [Mon, 24 Feb 2020 11:56:05 +0000 (12:56 +0100)]
bindings: use more cleanup macros

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agobindings: port cpuview to new cgroup getters
Christian Brauner [Mon, 24 Feb 2020 11:01:07 +0000 (12:01 +0100)]
bindings: port cpuview to new cgroup getters

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #322 from brauner/2020-02-20/cgroup2_support_5
Stéphane Graber [Mon, 24 Feb 2020 11:02:04 +0000 (06:02 -0500)]
Merge pull request #322 from brauner/2020-02-20/cgroup2_support_5

bindings: port blkio to new cgroup getters

4 years agobindings: port blkio to new cgroup getters
Christian Brauner [Mon, 24 Feb 2020 10:32:47 +0000 (11:32 +0100)]
bindings: port blkio to new cgroup getters

cgroup2's io controller does not support most of the blkio files.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #321 from brauner/2020-02-20/cgroup2_support_4
Stéphane Graber [Mon, 24 Feb 2020 10:01:05 +0000 (05:01 -0500)]
Merge pull request #321 from brauner/2020-02-20/cgroup2_support_4

bindings: port cpuset to new cgroup getters and implement cgroup2 sup…

4 years agobindings: introduce dot_or_empty()
Christian Brauner [Mon, 24 Feb 2020 09:54:08 +0000 (10:54 +0100)]
bindings: introduce dot_or_empty()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agobindings: port cpuset to new cgroup getters and implement cgroup2 support
Christian Brauner [Mon, 24 Feb 2020 09:35:50 +0000 (10:35 +0100)]
bindings: port cpuset to new cgroup getters and implement cgroup2 support

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #320 from brauner/2020-02-20/cgroup2_support_3
Stéphane Graber [Fri, 21 Feb 2020 14:43:47 +0000 (09:43 -0500)]
Merge pull request #320 from brauner/2020-02-20/cgroup2_support_3

bindings: port memory to new cgroup getters and support cgroup2

4 years agobindings: port memory to new cgroup getters and implement cgroup2 support
Christian Brauner [Fri, 21 Feb 2020 14:19:08 +0000 (15:19 +0100)]
bindings: port memory to new cgroup getters and implement cgroup2 support

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agobindings: rework proc meminfo helpers
Christian Brauner [Fri, 21 Feb 2020 13:05:56 +0000 (14:05 +0100)]
bindings: rework proc meminfo helpers

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #319 from brauner/2020-02-20/cgroup2_support_2
Stéphane Graber [Thu, 20 Feb 2020 21:46:27 +0000 (16:46 -0500)]
Merge pull request #319 from brauner/2020-02-20/cgroup2_support_2

cgroups: add getter instead of open-coded cgfs_get_value()

4 years agocgroups: add getter instead of open-coded cgfs_get_value()
Christian Brauner [Thu, 20 Feb 2020 21:06:10 +0000 (22:06 +0100)]
cgroups: add getter instead of open-coded cgfs_get_value()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #318 from brauner/2020-02-20/cgroup2_support
Stéphane Graber [Thu, 20 Feb 2020 15:48:43 +0000 (10:48 -0500)]
Merge pull request #318 from brauner/2020-02-20/cgroup2_support

bindings: add infrastructure for cgroup2 support

4 years agobindings: add infrastructure for cgroup2 support
Christian Brauner [Thu, 20 Feb 2020 15:30:47 +0000 (16:30 +0100)]
bindings: add infrastructure for cgroup2 support

Mostly based on code I've written for liblxc.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #316 from KellenRenshaw/lp1860813
Christian Brauner [Tue, 28 Jan 2020 10:17:48 +0000 (11:17 +0100)]
Merge pull request #316 from KellenRenshaw/lp1860813

handle swap reporting better when swap accounting is enabled

4 years agobindings: Adjusts the logic for calculating SwapFree to better handle conditions...
Kellen Renshaw [Tue, 28 Jan 2020 00:57:58 +0000 (17:57 -0700)]
bindings: Adjusts the logic for calculating SwapFree to better handle conditions where swap usage is reported to be <0.

Signed-off-by: Kellen Renshaw <kellen.renshaw@canonical.com>
4 years agoMerge pull request #312 from wlm86/dev
Stéphane Graber [Wed, 8 Jan 2020 13:19:36 +0000 (08:19 -0500)]
Merge pull request #312 from wlm86/dev

Improve version reporting

4 years agoEnhance version option
LiMing Wu [Wed, 8 Jan 2020 00:59:51 +0000 (08:59 +0800)]
Enhance version option

Signed-off-by: LiMing Wu <19092205@suning.com>
4 years agoAdd compile method to README
LiMing Wu [Tue, 7 Jan 2020 10:01:03 +0000 (18:01 +0800)]
Add compile method to README

Signed-off-by: LiMing Wu <19092205@suning.com>
4 years agoMerge pull request #308 from yinhongbo/master
Christian Brauner [Tue, 17 Dec 2019 13:25:35 +0000 (14:25 +0100)]
Merge pull request #308 from yinhongbo/master

fixed a problem with server stability degradation caused by cgroup dy…

4 years agouse is_shared_pidns helper
Hongbo Yin [Tue, 17 Dec 2019 13:14:14 +0000 (21:14 +0800)]
use is_shared_pidns helper

Signed-off-by: Hongbo Yin <yinhongbo@bytedance.com>
4 years agobindings: handle shared pidns
Hongbo Yin [Tue, 22 Oct 2019 08:41:55 +0000 (16:41 +0800)]
bindings: handle shared pidns

Signed-off-by: Hongbo Yin <yinhongbo@bytedance.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Hongbo Yin <yinhongbo@bytedance.com>
4 years agoMerge pull request #309 from yinhongbo/read_file
Christian Brauner [Tue, 15 Oct 2019 09:45:34 +0000 (11:45 +0200)]
Merge pull request #309 from yinhongbo/read_file

fix read_file second reading empty bug

4 years agofix read_file second reading empty bug
Hongbo Yin [Tue, 15 Oct 2019 07:39:58 +0000 (15:39 +0800)]
fix read_file second reading empty bug

Signed-off-by: Hongbo Yin <yinhongbo@bytedance.com>
4 years agoMerge pull request #307 from yinhongbo/master
Serge Hallyn [Tue, 8 Oct 2019 12:23:14 +0000 (07:23 -0500)]
Merge pull request #307 from yinhongbo/master

fix the problem of counting the number of CPUs when using cpuset and …

4 years agofix the problem of counting the number of CPUs when using cpuset and cpuset or using...
Hongbo Yin [Fri, 27 Sep 2019 10:50:44 +0000 (18:50 +0800)]
fix the problem of counting the number of CPUs when using cpuset and cpuset or using cpuset alone

Changelog: format code style

Signed-off-by: Hongbo Yin <yinhongbo@bytedance.com>
4 years agoMerge pull request #305 from yinhongbo/master
Christian Brauner [Fri, 6 Sep 2019 07:45:10 +0000 (09:45 +0200)]
Merge pull request #305 from yinhongbo/master

fix /sys/devices/system/cpu/online in cpuset not correct bug

4 years agofix /sys/devices/system/cpu/online in cpuset not correct bug
Hongbo Yin [Fri, 6 Sep 2019 07:35:58 +0000 (15:35 +0800)]
fix /sys/devices/system/cpu/online in cpuset not correct bug

Signed-off-by: Hongbo Yin <yinhongbo@bytedance.com>
4 years agoMerge pull request #303 from yinhongbo/master
Christian Brauner [Mon, 26 Aug 2019 17:49:48 +0000 (19:49 +0200)]
Merge pull request #303 from yinhongbo/master

fix container run pid host mode /proc/stat error log

4 years agofix container run pid host mode /proc/stat error log
Hongbo Yin [Mon, 26 Aug 2019 17:33:04 +0000 (01:33 +0800)]
fix container run pid host mode /proc/stat error log

Signed-off-by: Hongbo Yin <yinhongbo@bytedance.com>
4 years agoMerge pull request #302 from time-river/master
Christian Brauner [Mon, 26 Aug 2019 15:16:49 +0000 (17:16 +0200)]
Merge pull request #302 from time-river/master

macro: fix lxcfs_{error,debug,v} build error when __VA_ARGS__ is empty

4 years agomacro: fix lxcfs_{error,debug,v} build error when __VA_ARGS__ is empty
river [Mon, 26 Aug 2019 10:01:12 +0000 (18:01 +0800)]
macro: fix lxcfs_{error,debug,v} build error when __VA_ARGS__ is empty

Originally, the compiler complained:
  macro.h:7:25: error: expected expression before ')' token
      __func__, __VA_ARGS__);

The reason is that GCC wouldn't abandon `,` when `__VA_ARGS__` is empty.
For emaple:
  #define eprintf(format, ...) fprintf (stderr, format, __VA_ARGS__)
  eprintf("success!\n", );
       → fprintf(stderr, "success!\n", );

According to GCC doc, it's okay when adding `##` before `__VA_ARGS__`:
  #define eprintf(format, ...) fprintf (stderr, format, ##__VA_ARGS__)
  eprintf ("success!\n")
       → fprintf(stderr, "success!\n");

Signed-off-by: river <river@vvl.me>
4 years agoRelease LXCFS 3.1.2 lxcfs-3.1.2
Stéphane Graber [Wed, 24 Jul 2019 01:18:13 +0000 (21:18 -0400)]
Release LXCFS 3.1.2

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
4 years agoMerge pull request #296 from brauner/2019-07-23/swapfix
Stéphane Graber [Tue, 23 Jul 2019 15:16:35 +0000 (11:16 -0400)]
Merge pull request #296 from brauner/2019-07-23/swapfix

bindings: ensure that opts is non NULL

4 years agoRevert "Revert "cpu: improve cpu info virtualization""
Stéphane Graber [Tue, 23 Jul 2019 15:08:52 +0000 (11:08 -0400)]
Revert "Revert "cpu: improve cpu info virtualization""

This reverts commit 39b7df424120fa9c3c5dc209b37990fed57f1efd.

Looks like this is actually fine, un-revert.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
4 years agobindings: ensure that opts is non NULL
Christian Brauner [Tue, 23 Jul 2019 14:57:28 +0000 (16:57 +0200)]
bindings: ensure that opts is non NULL

When the shared library is reloaded but the lxcfs binary itself will
likely not be replaced and even if will still be in-memory, i.e. the
fuse loop will not be restarted.
The code here introduced a new struct lxcfs_opts which is allocated and
gets stashed in the private_data member of the fuse file when the lxcfs
binary is first called. Now, in a scenario where the shared library is
reloaded the lxcfs binary itself won't be re-run. So now we have a
shared library that assumes there's always a valid struct lxcfs_opts
stashed in the private_data member. But there isnt'. This very likely
causes the segfaults we have seen.

Fix it by verifying a struct has been stashed.

Fixes: 7e60aa1b1540 ("option to disable swap in meminfo")
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #294 from brauner/master
Stéphane Graber [Tue, 23 Jul 2019 13:56:18 +0000 (09:56 -0400)]
Merge pull request #294 from brauner/master

Revert "cpu: improve cpu info virtualization"

4 years agoRevert "cpu: improve cpu info virtualization"
Christian Brauner [Tue, 23 Jul 2019 13:50:49 +0000 (15:50 +0200)]
Revert "cpu: improve cpu info virtualization"

This reverts commit db1b32f6ff056ce713c06b9d41bcc1eadd054abd.

We had a multitude of reports saying that they hit segfaults with
current lxcfs. After a bisect and various mentions in the error reports
of corrupt cpu information this is likely the culprit: revert for now.

Link: https://github.com/lxc/lxd/issues/6000
Link: https://lists.linuxcontainers.org/pipermail/lxc-users/2019-July/014932.html
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoRelease LXCFS 3.1.1 lxcfs-3.1.1
Stéphane Graber [Mon, 22 Jul 2019 22:47:50 +0000 (18:47 -0400)]
Release LXCFS 3.1.1

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
4 years agoMakefile: Fix typo in file name
Stéphane Graber [Mon, 22 Jul 2019 22:47:20 +0000 (18:47 -0400)]
Makefile: Fix typo in file name

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
4 years agoRelease LXCFS 3.1.0 lxcfs-3.1.0
Stéphane Graber [Mon, 22 Jul 2019 22:43:16 +0000 (18:43 -0400)]
Release LXCFS 3.1.0

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
4 years agoMerge pull request #293 from brauner/2019-07-18/higher_precision_uptime
Stéphane Graber [Thu, 18 Jul 2019 19:44:14 +0000 (15:44 -0400)]
Merge pull request #293 from brauner/2019-07-18/higher_precision_uptime

bindings: enable higher precision uptime

4 years agobindings: enable higher precision uptime
Christian Brauner [Thu, 18 Jul 2019 13:44:06 +0000 (15:44 +0200)]
bindings: enable higher precision uptime

I don't know for what reason anyone but care but I guess ok.

Closes #292.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #290 from BurningXFlame/master
Christian Brauner [Wed, 17 Jul 2019 16:39:37 +0000 (18:39 +0200)]
Merge pull request #290 from BurningXFlame/master

CPU views based on quotas: several improvements

4 years agocpu: improve cpu info virtualization
Stephen Xiang [Fri, 14 Jun 2019 02:52:43 +0000 (10:52 +0800)]
cpu: improve cpu info virtualization

This commit introduces several improvements to CPU views based on
quotas:
- fall back to cpuacct.usage_percpu if cpuacct.usage_all not exists
- correct CPU usage
- correct CPU usage in partial CPU cases when quota/period doesn't yield
  an integer

Signed-off-by: Stephen Xiang <BurningXFlame@gmail.com>
[christian.brauner@ubuntu.com: squashed commits and fixed up commit message]
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Abstract must_strcat from must_strcat_pid. Replace stringbuild with must_strcat.

Signed-off-by: Stephen Xiang <BurningXFlame@gmail.com>
5 years agoMerge pull request #282 from aither64/syscpus
Christian Brauner [Tue, 21 May 2019 14:19:48 +0000 (16:19 +0200)]
Merge pull request #282 from aither64/syscpus

mount hook: mount /sys/devices/system/cpu/online

5 years agomount hook: mount /sys/devices/system/cpu/online
Jakub Skokan [Tue, 21 May 2019 13:50:54 +0000 (15:50 +0200)]
mount hook: mount /sys/devices/system/cpu/online

Signed-off-by: Jakub Skokan <jakub.skokan@havefun.cz>
5 years agoMerge pull request #278 from wavezhang/master
Christian Brauner [Thu, 9 May 2019 10:14:38 +0000 (12:14 +0200)]
Merge pull request #278 from wavezhang/master

Support /sys/devices/system/cpu/online

5 years agoMerge pull request #280 from brauner/master
Stéphane Graber [Wed, 24 Apr 2019 12:50:09 +0000 (08:50 -0400)]
Merge pull request #280 from brauner/master

Revert "Merge pull request #272 from brauner/2019-02-19/compiler_base…

5 years agoRevert "Merge pull request #272 from brauner/2019-02-19/compiler_based_housekeeping"
Christian Brauner [Wed, 24 Apr 2019 12:14:16 +0000 (14:14 +0200)]
Revert "Merge pull request #272 from brauner/2019-02-19/compiler_based_housekeeping"

This reverts commit ac98f00cd89278e82a4cffe9075792d2070abe69, reversing
changes made to d8addb023a0e96b7d42e253703ba909bbc81dd26.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #272 from brauner/2019-02-19/compiler_based_housekeeping
Serge Hallyn [Mon, 22 Apr 2019 04:25:58 +0000 (23:25 -0500)]
Merge pull request #272 from brauner/2019-02-19/compiler_based_housekeeping

lxcfs: coding style update

5 years agoremove unused function
Yafei Bao [Tue, 9 Apr 2019 02:37:29 +0000 (10:37 +0800)]
remove unused function

Signed-off-by: Yafei Bao <baoyafei@gmail.com>
5 years agosys dirs do not need to implement 'read' method
Yafei Bao [Mon, 8 Apr 2019 03:06:16 +0000 (11:06 +0800)]
sys dirs do not need to implement 'read' method

Signed-off-by: Yafei Bao <baoyafei@gmail.com>
5 years agosupport /sys/devices/system/cpu/online
Yafei Bao [Fri, 22 Mar 2019 07:58:21 +0000 (15:58 +0800)]
support /sys/devices/system/cpu/online

Signed-off-by: Yafei Bao <baoyafei@gmail.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agobindings: partially convert to cleanup macros
Christian Brauner [Tue, 19 Feb 2019 22:09:27 +0000 (23:09 +0100)]
bindings: partially convert to cleanup macros

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agolxcfs: use close cleanup attributes
Christian Brauner [Tue, 19 Feb 2019 21:44:48 +0000 (22:44 +0100)]
lxcfs: use close cleanup attributes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agolxcfs: coding style update
Christian Brauner [Tue, 19 Feb 2019 21:17:40 +0000 (22:17 +0100)]
lxcfs: coding style update

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #271 from dmaj/master
Serge Hallyn [Tue, 19 Feb 2019 18:41:44 +0000 (12:41 -0600)]
Merge pull request #271 from dmaj/master

option to disable swap in meminfo

5 years agooption to disable swap in meminfo
dm@localhost [Mon, 18 Feb 2019 05:17:30 +0000 (06:17 +0100)]
option to disable swap in meminfo

Signed-off-by: Dieter Maier <dma@web.de>
5 years agoMerge pull request #269 from tomponline/tp-skipcgroupmount
Stéphane Graber [Thu, 7 Feb 2019 01:39:17 +0000 (20:39 -0500)]
Merge pull request #269 from tomponline/tp-skipcgroupmount

hooks: skip mounting lxcfs cgroup tree on centos 7 hosts

5 years agoconfig: Adds RPM spec file.
tomponline [Wed, 6 Feb 2019 19:51:22 +0000 (19:51 +0000)]
config: Adds RPM spec file.

On RHEL 7 distros the RPM spec file will run the lxc.mount.hook with the --skip-cgroup-mounts option.

Signed-off-by: tomponline <tomp@tomp.uk>
5 years agohooks: Adds --skip-cgroup-mounts flag to lxc.mount.hook script.
tomponline [Wed, 6 Feb 2019 19:49:11 +0000 (19:49 +0000)]
hooks: Adds --skip-cgroup-mounts flag to lxc.mount.hook script.

This can be used to avoid instability in LXCFS when running on RHEL 7 hosts.

Signed-off-by: tomponline <tomp@tomp.uk>
5 years agoMerge pull request #270 from tomponline/tp-reload
Christian Brauner [Wed, 23 Jan 2019 11:45:08 +0000 (12:45 +0100)]
Merge pull request #270 from tomponline/tp-reload

config: Adds reload mode to sysvinit and systemd scripts.

5 years agoMerge pull request #268 from tomponline/tp-lock
Christian Brauner [Wed, 23 Jan 2019 10:24:44 +0000 (11:24 +0100)]
Merge pull request #268 from tomponline/tp-lock

Revert "bindings: protect do_release_file_info() with mutex"

5 years agoconfig: Adds reload mode to sysvinit and systemd scripts.
tomponline [Tue, 22 Jan 2019 14:23:05 +0000 (14:23 +0000)]
config: Adds reload mode to sysvinit and systemd scripts.

To to close down https://github.com/lxc/lxcfs/pull/188

Signed-off-by: tomponline <tomp@tomp.uk>
5 years agoRevert "bindings: protect do_release_file_info() with mutex"
tomponline [Tue, 22 Jan 2019 12:38:25 +0000 (12:38 +0000)]
Revert "bindings: protect do_release_file_info() with mutex"

This reverts commit 0108dc1cc6eab76392d228ee4ca844729096473d.

I am still experiencing hangs in lxcfs even with this patch.

Signed-off-by: tomponline <tomp@tomp.uk>
5 years agoMerge pull request #266 from tomponline/master
Christian Brauner [Fri, 18 Jan 2019 14:24:08 +0000 (16:24 +0200)]
Merge pull request #266 from tomponline/master

Adds mutex to do_release_file_info

5 years agobindings: protect do_release_file_info() with mutex
tomponline [Fri, 18 Jan 2019 13:05:09 +0000 (13:05 +0000)]
bindings: protect do_release_file_info() with mutex

Add a mutex to do_release_file_info to avoid lxcfs crash when stopping
multiple containers concurrently

Signed-off-by: tomponline <tomp@tomp.uk>
[christian.brauner@ubuntu.com: use correct commit message style]
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #262 from brauner/2018-12-12/cg_readdir
Wolfgang Bumiller [Wed, 12 Dec 2018 16:09:12 +0000 (17:09 +0100)]
Merge pull request #262 from brauner/2018-12-12/cg_readdir

bindings: prevent NULL pointer dereference

5 years agobindings: prevent NULL pointer dereference
Christian Brauner [Wed, 12 Dec 2018 11:49:16 +0000 (12:49 +0100)]
bindings: prevent NULL pointer dereference

Fixes: https://bugs.launchpad.net/ubuntu/+source/lxcfs/+bug/1807628
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #260 from aither64/cpu-views
Serge Hallyn [Sat, 8 Dec 2018 19:28:55 +0000 (13:28 -0600)]
Merge pull request #260 from aither64/cpu-views

CPU views based on quotas

5 years agostat: check for out of bound access to cpuacct usage data
Jakub Skokan [Wed, 24 Oct 2018 12:39:39 +0000 (14:39 +0200)]
stat: check for out of bound access to cpuacct usage data

Signed-off-by: Jakub Skokan <jakub.skokan@havefun.cz>
5 years agoCPU view: handle disabling/enabling of physical CPUs at runtime
Jakub Skokan [Sun, 21 Oct 2018 13:13:07 +0000 (15:13 +0200)]
CPU view: handle disabling/enabling of physical CPUs at runtime

Signed-off-by: Jakub Skokan <jakub.skokan@havefun.cz>
5 years agoCPU view: handle CPU hotplug at runtime
Jakub Skokan [Sun, 21 Oct 2018 07:04:12 +0000 (09:04 +0200)]
CPU view: handle CPU hotplug at runtime

Signed-off-by: Jakub Skokan <jakub.skokan@havefun.cz>
5 years agoCPU view: add mutexes
Jakub Skokan [Mon, 25 Jun 2018 16:24:14 +0000 (18:24 +0200)]
CPU view: add mutexes

Signed-off-by: Jakub Skokan <jakub.skokan@havefun.cz>
5 years agoCPU view: prune stale entries
Jakub Skokan [Mon, 25 Jun 2018 12:47:43 +0000 (14:47 +0200)]
CPU view: prune stale entries

Signed-off-by: Jakub Skokan <jakub.skokan@havefun.cz>
5 years agostat: use cpu views
Jakub Skokan [Mon, 25 Jun 2018 07:05:30 +0000 (09:05 +0200)]
stat: use cpu views

Signed-off-by: Jakub Skokan <jakub.skokan@havefun.cz>
5 years agocalc_hash(): do not apply modulo LOAD_SIZE
Jakub Skokan [Mon, 25 Jun 2018 06:55:23 +0000 (08:55 +0200)]
calc_hash(): do not apply modulo LOAD_SIZE

This will allow `calc_hash()` to be used for other purposes than
the loadavg implementation.

Signed-off-by: Jakub Skokan <jakub.skokan@havefun.cz>
5 years agocpuinfo: use cpu view based on cpu quotas
Jakub Skokan [Mon, 25 Jun 2018 06:54:15 +0000 (08:54 +0200)]
cpuinfo: use cpu view based on cpu quotas

Signed-off-by: Jakub Skokan <jakub.skokan@havefun.cz>
5 years agoMerge pull request #255 from brauner/2018-08-26/fix_makedev
Stéphane Graber [Sun, 26 Aug 2018 20:09:35 +0000 (16:09 -0400)]
Merge pull request #255 from brauner/2018-08-26/fix_makedev

tests: include missing sys/sysmacros.h header

5 years agotests: include missing sys/sysmacros.h header
Christian Brauner [Sun, 26 Aug 2018 10:23:31 +0000 (12:23 +0200)]
tests: include missing sys/sysmacros.h header

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #253 from brauner/2018-08-17/prevent_double_free
Stéphane Graber [Fri, 17 Aug 2018 16:00:00 +0000 (12:00 -0400)]
Merge pull request #253 from brauner/2018-08-17/prevent_double_free

bindings: prevent double free