]>
git.proxmox.com Git - mirror_lxcfs.git/log
summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Serge Hallyn [Tue, 19 May 2015 21:27:05 +0000 (14:27 -0700)]
use threads when safe
libnih, when not built with --enable-threading, cannot be safely
used by a threaded application. Detect whether it is built to be
threadsafe using a new libnih helper, and, if so, run threaded by
(a) not passing '-s' to fuse, and (b) making the dbus connection
and detected api version thread-local.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Sat, 9 May 2015 00:52:28 +0000 (19:52 -0500)]
configure.ac: v0.9
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Stéphane Graber [Fri, 8 May 2015 21:09:38 +0000 (21:09 +0000)]
Merge pull request #26 from mikemccracken/maybe-fix-24
Add error handling for snprintf calls inside *_read() funcs
Michael McCracken [Fri, 8 May 2015 20:24:03 +0000 (16:24 -0400)]
inside *_read() funcs, return 0 for snprintf errors and truncations
Signed-off-by: Michael McCracken <mike.mccracken@canonical.com>
Michael McCracken [Fri, 8 May 2015 08:46:02 +0000 (04:46 -0400)]
check return value from snprintf to avoid FUSE errors. Potentially fixes #24.
Signed-off-by: Michael McCracken <mike.mccracken@canonical.com>
Serge Hallyn [Thu, 7 May 2015 19:39:34 +0000 (14:39 -0500)]
configure.ac: release 0.8
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Thu, 7 May 2015 16:25:52 +0000 (11:25 -0500)]
implement --version
Because this is needed for help2man to determine the program name.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Thu, 30 Apr 2015 11:07:34 +0000 (13:07 +0200)]
Fix the check for cpu being in cpuset range
Also add a testcase to make sure that the new function is correct.
In order to share the cpuset range checking code with with the
test, move it into cpuset.c. Not sure whether we want that in a
utils.c instead.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Mon, 20 Apr 2015 13:40:39 +0000 (08:40 -0500)]
Add some more sanity checks
Limit string size in sscanf, convert some sprintfs to snprintfs
(to make them future-proof), and free d in case of error.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Sun, 19 Apr 2015 04:51:03 +0000 (23:51 -0500)]
free d at program end
to silence warnings from memory checkers
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Sun, 19 Apr 2015 04:03:45 +0000 (23:03 -0500)]
Make sure that that '/cgroup' and the controller are sep'd by /
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Fri, 17 Apr 2015 21:13:33 +0000 (16:13 -0500)]
cg_read: add ending newline
Closes #23
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Fri, 17 Apr 2015 20:39:35 +0000 (15:39 -0500)]
use direct_io
This will prevent a file read for over getattr.
File sizes show up as 0, but they do so in cgroupfs and procfs as well.
Closes #20.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Fri, 17 Apr 2015 20:28:04 +0000 (15:28 -0500)]
Provide the fuse options we want ourselves
continue to allow the options which in the past we basically required
callers to provide ("-s -f -o allow_other"), exit on anything else.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Fri, 10 Apr 2015 18:54:46 +0000 (13:54 -0500)]
Cleanup whitespace
and remove commented out debug statement
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Fri, 10 Apr 2015 18:52:02 +0000 (13:52 -0500)]
Merge pull request #22 from hustcat/cache.1
cache for proc file
Ye Yin [Fri, 10 Apr 2015 07:19:44 +0000 (15:19 +0800)]
info as parent when malloc memory for file buf
reduce one blank for /proc/stat
Signed-off-by: Ye Yin <eyniy@qq.com>
Serge Hallyn [Thu, 9 Apr 2015 21:18:06 +0000 (16:18 -0500)]
Merge pull request #19 from hallyn/cache.1
Cache.1
Ye Yin [Thu, 9 Apr 2015 11:01:10 +0000 (19:01 +0800)]
add cache for proc file, for support multiple read
Signed-off-by: Ye Yin <eyniy@qq.com>
Stéphane Graber [Tue, 7 Apr 2015 20:17:40 +0000 (16:17 -0400)]
LXC hook fixes
- Detects whether cgroups are enabled in the container's config
- Don't mount a second tmpfs on /sys/fs/cgroup
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Serge Hallyn [Tue, 7 Apr 2015 03:10:17 +0000 (22:10 -0500)]
cache: use file_dir object as parent for alloc'ed objects
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Mon, 6 Apr 2015 22:24:11 +0000 (17:24 -0500)]
don't check for cgroup perms when opendir'ing /cgroup
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Mon, 6 Apr 2015 22:11:39 +0000 (17:11 -0500)]
add a file_info cache pointer for procfile reads
This doesn't actually use them yet, but now fi->fh->buf can be
used in https://github.com/lxc/lxcfs/pull/18
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Mon, 6 Apr 2015 22:03:14 +0000 (17:03 -0500)]
add cache types for each procfile type that we provide
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Mon, 6 Apr 2015 21:35:20 +0000 (16:35 -0500)]
check that file and dir entries don't get mixed up
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Mon, 6 Apr 2015 21:30:54 +0000 (16:30 -0500)]
cache verified controller/cgroup info at cg file read/write
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Mon, 6 Apr 2015 21:13:54 +0000 (16:13 -0500)]
cache opendir work and re-use it at readdir
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Fri, 3 Apr 2015 20:09:09 +0000 (15:09 -0500)]
release 0.7
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Fri, 3 Apr 2015 18:25:57 +0000 (13:25 -0500)]
be robust to glibc fork failures
kill child and retry when __glibc_fork() child hangs on an assert
(newpid != ppid) failure.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Fri, 3 Apr 2015 01:44:39 +0000 (20:44 -0500)]
timeout the reception of a scm_cred
Else if the peer is killed at a strange time we will hang forever waiting.
Also don't kill children - always just let them time out
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Fri, 3 Apr 2015 01:28:58 +0000 (20:28 -0500)]
nih_local's must be initialized as NULL
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Wed, 18 Mar 2015 14:59:02 +0000 (09:59 -0500)]
Merge pull request #16 from hustcat/diskstats
Add /proc/diskstats
Ye Yin [Wed, 11 Mar 2015 08:33:08 +0000 (16:33 +0800)]
Add /proc/diskstats
Signed-off-by: Ye Yin <eyniy@qq.com>
Serge Hallyn [Wed, 25 Feb 2015 05:00:27 +0000 (23:00 -0600)]
Merge pull request #15 from steelbrain/master
Fix formatting of README
steelbrain [Wed, 25 Feb 2015 04:49:57 +0000 (23:49 -0500)]
Fix formatting of README
Signed-off-by: Anees Iqbal <aneesiqbalbhatti@gmail.com>
Stéphane Graber [Tue, 17 Feb 2015 04:42:33 +0000 (23:42 -0500)]
Fix test_proc following the stat fix
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Serge Hallyn [Tue, 17 Feb 2015 03:56:10 +0000 (21:56 -0600)]
Release LXCFS 0.6
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Christian Brauner [Tue, 17 Feb 2015 01:41:54 +0000 (19:41 -0600)]
Show cpu-average in /proc/stat and start cup numbering at 0
Signed-off-by: Christian Brauner <christianvanbrauner@gmail.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Mon, 16 Feb 2015 22:33:53 +0000 (16:33 -0600)]
clean up after several functions
which weren't freeing line of closing an open file.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Stéphane Graber [Sat, 31 Jan 2015 12:47:45 +0000 (13:47 +0100)]
Update README
Close #10
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Stéphane Graber [Wed, 28 Jan 2015 14:45:54 +0000 (15:45 +0100)]
Release LXCFS 0.5
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Stéphane Graber [Wed, 28 Jan 2015 14:35:06 +0000 (15:35 +0100)]
hook: Don't spam /etc/mtab
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Stéphane Graber [Wed, 28 Jan 2015 09:07:05 +0000 (10:07 +0100)]
Make the LXC hook more robust
Don't fail if /sys/fs/cgroup or some proc files don't exist.
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Stéphane Graber [Tue, 27 Jan 2015 05:37:53 +0000 (05:37 +0000)]
Update gitignore
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Stéphane Graber [Mon, 26 Jan 2015 22:07:21 +0000 (17:07 -0500)]
Better detect the cgmanager version
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Stéphane Graber [Fri, 23 Jan 2015 18:45:52 +0000 (13:45 -0500)]
Release LXCFS 0.4
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Stéphane Graber [Fri, 23 Jan 2015 18:44:38 +0000 (13:44 -0500)]
Remount / recursive ms-slave in our new mntns
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Stéphane Graber [Fri, 23 Jan 2015 18:44:12 +0000 (13:44 -0500)]
Revert "remount / ms-slave"
This will affect the hostns, let's go with my implementation instead :)
This reverts commit
1ff1e28c04267064c73c5b968d31f6e5f2e1f3fa .
Serge Hallyn [Fri, 23 Jan 2015 18:38:42 +0000 (12:38 -0600)]
remount / ms-slave
to avoid propagating proc mounts from get_pid1_time() back to host
Signed-ff-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Stéphane Graber [Wed, 21 Jan 2015 16:15:11 +0000 (11:15 -0500)]
Release LXCFS 0.3
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Stéphane Graber [Wed, 21 Jan 2015 06:14:40 +0000 (01:14 -0500)]
Fix LXC config install path
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Stéphane Graber [Tue, 20 Jan 2015 19:48:01 +0000 (14:48 -0500)]
Release LXCFS 0.2
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Stéphane Graber [Tue, 20 Jan 2015 18:07:06 +0000 (13:07 -0500)]
Update the lxc hook and add a LXC config file
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Stéphane Graber [Mon, 12 Jan 2015 18:16:19 +0000 (13:16 -0500)]
tests: Fix return value
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Stéphane Graber [Fri, 9 Jan 2015 23:59:34 +0000 (18:59 -0500)]
Release LXCFS 0.1
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Stéphane Graber [Fri, 9 Jan 2015 23:58:15 +0000 (18:58 -0500)]
Fix autotools
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Stéphane Graber [Fri, 9 Jan 2015 21:49:13 +0000 (16:49 -0500)]
test: Introduce a basic cgroup tree test
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Stéphane Graber [Fri, 9 Jan 2015 21:29:22 +0000 (16:29 -0500)]
test: Introduce a basic proc tree test
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Serge Hallyn [Thu, 8 Jan 2015 22:29:11 +0000 (16:29 -0600)]
update docs
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Thu, 8 Jan 2015 22:01:28 +0000 (16:01 -0600)]
add lxcfs container hook and comment
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Thu, 8 Jan 2015 15:59:54 +0000 (09:59 -0600)]
write: make sure to null terminate the buffer
We are passed a size, respect it.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Stéphane Graber [Thu, 8 Jan 2015 15:45:39 +0000 (10:45 -0500)]
Add some more missing newlines
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Serge Hallyn [Wed, 7 Jan 2015 21:54:39 +0000 (15:54 -0600)]
fix up pid conversion algorithm
Mainly when the pid conversion task gets a ESRCH from sendmsg,
then it should send send the next message (with v='1' meaning
error) without first waiting for a ping from its peer, since
the peer already sent one and has gotten no response.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Stéphane Graber [Sat, 27 Dec 2014 10:37:00 +0000 (11:37 +0100)]
Update README
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Stéphane Graber [Sat, 27 Dec 2014 10:27:27 +0000 (11:27 +0100)]
Add some more information to error messages
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Serge Hallyn [Sat, 27 Dec 2014 04:26:05 +0000 (22:26 -0600)]
convert pids at write to tasks and cgroup.procs files
we're not yet distinguishing between thread vs threadgroup moving.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Sat, 27 Dec 2014 03:09:14 +0000 (21:09 -0600)]
Merge branch 'readtasks.pass.creds.2' into m.2
Serge Hallyn [Fri, 26 Dec 2014 04:48:43 +0000 (22:48 -0600)]
read: translate pids into the reader's pidns
When reading a cgroupfs 'tasks' or 'cgroup.procs' file, we must translate
all pids from our namespace into the reader's.
TODO - convert writes
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Stéphane Graber [Thu, 25 Dec 2014 21:13:45 +0000 (22:13 +0100)]
Add missing line breaks
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Serge Hallyn [Fri, 19 Dec 2014 03:48:30 +0000 (21:48 -0600)]
implement read of /proc/uptime
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Thu, 18 Dec 2014 04:39:08 +0000 (22:39 -0600)]
add comment describing how we'll do uptime
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Thu, 18 Dec 2014 04:26:20 +0000 (22:26 -0600)]
implement read for meminfo
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Wed, 17 Dec 2014 21:04:17 +0000 (15:04 -0600)]
implement read for /proc/stat
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Wed, 17 Dec 2014 18:42:23 +0000 (12:42 -0600)]
move comment about caching open results
hoping to implement this soon
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Wed, 17 Dec 2014 18:22:15 +0000 (12:22 -0600)]
implement cat of proc/cpuinfo
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Wed, 17 Dec 2014 06:34:45 +0000 (00:34 -0600)]
add boilerplate for the /proc file readdir+reads.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Tue, 16 Dec 2014 20:30:33 +0000 (14:30 -0600)]
check for permission at opendir
So we don't surprise the caller at readdir
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Tue, 16 Dec 2014 20:25:56 +0000 (14:25 -0600)]
fix some error codes
userspace is looking for EACCES not EPERM for common perm deny.
Also return einval for bad names, not eio.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Tue, 16 Dec 2014 19:58:19 +0000 (13:58 -0600)]
don't try to build lxcfs.1 if help2man is not available
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Tue, 16 Dec 2014 19:26:34 +0000 (13:26 -0600)]
remove stmt in lxcfs.c
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Tue, 16 Dec 2014 17:20:17 +0000 (11:20 -0600)]
Hide cgroups not under caller's own cgroup
For a directory, we show an empty directory. For any attempt to getattr
a file, we return -ENOENT.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Tue, 16 Dec 2014 01:17:12 +0000 (19:17 -0600)]
implement chmod
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Mon, 15 Dec 2014 23:55:53 +0000 (17:55 -0600)]
remove some debug output
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Mon, 15 Dec 2014 23:51:17 +0000 (17:51 -0600)]
implement rmdir
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Mon, 15 Dec 2014 23:23:55 +0000 (17:23 -0600)]
Implement chown
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Mon, 15 Dec 2014 18:45:27 +0000 (12:45 -0600)]
implement write
Also fix the permission checking function.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Mon, 15 Dec 2014 02:21:03 +0000 (20:21 -0600)]
Implement mkdir
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Sat, 13 Dec 2014 04:27:20 +0000 (22:27 -0600)]
Add support for file read
To make 'cat /var/lib/lxcfs/cgroup/freezer/tasks' work, we also need for
getattr to actually give a file size. So, do that.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Fri, 12 Dec 2014 21:44:20 +0000 (15:44 -0600)]
getattr: fill in ownership of cgroup dirs.
Also check for privilege in uid namespaces over file uids.
And remove some extra debugging printfs.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Stéphane Graber [Fri, 12 Dec 2014 19:37:37 +0000 (21:37 +0200)]
Merge pull request #1 from hallyn/serge.2
Implement basic getattr/readdir
Serge Hallyn [Fri, 12 Dec 2014 18:53:10 +0000 (12:53 -0600)]
Add base lxcfs.c
So far it just does getattr and readdir for /cgroup/*
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Serge Hallyn [Fri, 12 Dec 2014 18:47:20 +0000 (12:47 -0600)]
add autoconf boilerplate and cgmanager fns
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Stéphane Graber [Fri, 12 Dec 2014 12:44:09 +0000 (14:44 +0200)]
Initial commit
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>