]> git.proxmox.com Git - mirror_lxcfs.git/log
mirror_lxcfs.git
8 years agosupport running tests from travis
Serge Hallyn [Fri, 30 Oct 2015 17:58:12 +0000 (12:58 -0500)]
support running tests from travis

Add a main.sh which can run a self-confined testsuite.

Note that without having lxcfs_mkdir installed, we cannot mkdir as
non-root user.

Update the test scripts to support using a lxcfs mountpoint other
than /var/lib/lxcfs

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
8 years agoenable travis
Serge Hallyn [Fri, 30 Oct 2015 17:57:50 +0000 (12:57 -0500)]
enable travis

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
8 years agodon't let idletime be > reaperage
Serge Hallyn [Fri, 30 Oct 2015 17:29:18 +0000 (12:29 -0500)]
don't let idletime be > reaperage

This is not a good way to do this.  We should decide on a proper
heuristic.  We could take something like reaperage * (idletime/total_uptime),
but that doesn't scale for how much our own container used the cpu nor
for time.

I will open a github issue to fix this.

However as it currently stands the test_proc testcase was failing, this
at least lets it pass.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
8 years agoMerge pull request #49 from hallyn/offset1
Stéphane Graber [Wed, 28 Oct 2015 22:32:54 +0000 (18:32 -0400)]
Merge pull request #49 from hallyn/offset1

fix corner cases in uptime and diskstat read

8 years agofix corner cases in uptime and diskstat read
Serge Hallyn [Wed, 28 Oct 2015 20:41:45 +0000 (20:41 +0000)]
fix corner cases in uptime and diskstat read

Closes #33

The code for these (a shortcut version of the other proc_*_read ones) was
doing snprintf(buf, size, ...).  If the user only requests one byte, we
just served them a trailing 0.  Fix that.

We weren't handling reads with offset in these cases either.  Fix that.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
8 years agoMerge pull request #48 from bmiklautz/uptime_format
Serge Hallyn [Wed, 28 Oct 2015 18:36:18 +0000 (13:36 -0500)]
Merge pull request #48 from bmiklautz/uptime_format

Change uptime format

8 years agoupdate .gitignore
Serge Hallyn [Tue, 27 Oct 2015 20:49:05 +0000 (15:49 -0500)]
update .gitignore

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
8 years agomove lxcfs_mkdir under libexecdir
Serge Hallyn [Tue, 27 Oct 2015 20:48:46 +0000 (15:48 -0500)]
move lxcfs_mkdir under libexecdir

Note, this will require us to add

       dh_auto_configure -- --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
               --libexecdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)

to debian/rules.

Closes #46

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
8 years agoChange "uptime" format
Bernhard Miklautz [Wed, 28 Oct 2015 13:07:28 +0000 (14:07 +0100)]
Change "uptime" format

/proc/uptime has the format %lu.%02lu %lu.%02lu. The format used by
lxcfs doesn't consider the nano second portion of the uptime which might
cause programs that rely on that format to fail.

This commit adapts the uptime format to match the kernels by adding
trailing dummy values (.0) to the uptime and idle time values.
The parsing of /proc/uptime was updated.

Signed-off-by: Bernhard Miklautz <bernhard.miklautz@shacknet.at>
8 years agoconfigure.ac: drop libcgmanager dependency
Serge Hallyn [Tue, 27 Oct 2015 20:43:30 +0000 (15:43 -0500)]
configure.ac: drop libcgmanager dependency

Closes #45

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
8 years agoconfigure.ac: v0.11 lxcfs-0.11
Serge Hallyn [Mon, 26 Oct 2015 20:59:25 +0000 (15:59 -0500)]
configure.ac: v0.11

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
8 years agoRemove a memory leak from getattr
Serge Hallyn [Mon, 26 Oct 2015 19:37:31 +0000 (14:37 -0500)]
Remove a memory leak from getattr

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
8 years agoremove stale comments, update some
Serge Hallyn [Thu, 22 Oct 2015 23:30:57 +0000 (18:30 -0500)]
remove stale comments, update some

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
8 years agofix memory leak
Serge Hallyn [Thu, 22 Oct 2015 23:01:07 +0000 (18:01 -0500)]
fix memory leak

each key also has an allocated char*, so use list_key to free the key.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
8 years agolxc mount hook: whitespace fixup
Wolfgang Bumiller [Wed, 21 Oct 2015 09:37:08 +0000 (11:37 +0200)]
lxc mount hook: whitespace fixup

Acked-by: Serge Hallyn <serge.hallyn@ubuntu.com>
8 years agolxc mount hook: add missing space before ]
Wolfgang Bumiller [Wed, 21 Oct 2015 09:37:07 +0000 (11:37 +0200)]
lxc mount hook: add missing space before ]

Otherwise [ interprets the ] as part of the path and also
errors about a missing ']'

Acked-by: Serge Hallyn <serge.hallyn@ubuntu.com>
8 years agoswap out libnih and libnih-dbus for glib
Serge Hallyn [Fri, 16 Oct 2015 19:44:29 +0000 (14:44 -0500)]
swap out libnih and libnih-dbus for glib

The motivation is to make threading possible, to hopefully greatly
speed up systemd startup inside containers.

This required converting all the nih-ified memory tracking.  (Some
of this can probably be done smarter in a more glib-friendly way, i.e.
avoiding doing a glib string alloc followed by strdup followed by
freeing the glib string)

We open a single dbus connection for all threads to use.  If that
connection is closed (i.e. cgmanager exits / restarts) the first
task to find it so takes a mutex and attempts to reconnect, once
per second, until it is reconnected.

When creating a directory for non-root user, execute a new binary
to get a clean dbus session as that user.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
8 years agoallow systemd to escape its init.scope cgroup
Serge Hallyn [Thu, 15 Oct 2015 13:29:56 +0000 (08:29 -0500)]
allow systemd to escape its init.scope cgroup

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
8 years agoMerge pull request #38 from sn-x/master
Serge Hallyn [Tue, 13 Oct 2015 20:34:41 +0000 (15:34 -0500)]
Merge pull request #38 from sn-x/master

Fixed issue #37

8 years agoFixed issue #37
Aljaz Meznaric [Fri, 9 Oct 2015 09:54:12 +0000 (11:54 +0200)]
Fixed issue #37

8 years agoMerge pull request #34 from ralt/patch-1
Stéphane Graber [Mon, 14 Sep 2015 14:56:02 +0000 (10:56 -0400)]
Merge pull request #34 from ralt/patch-1

Better explain what lxcfs does

8 years agoBetter explain what lxcfs does
Florian Margaine [Mon, 14 Sep 2015 10:22:29 +0000 (12:22 +0200)]
Better explain what lxcfs does

At first glance, I thought this project was a custom fs for the hosts, not for the containers themselves.

Hopefully this line will clear up the misunderstanding for future
readers, and show that this project is *really* useful!

Signed-off-by: Florian Margaine <florian@margaine.com>
8 years agoconfigure.ac: v0.10 lxcfs-0.10
Stéphane Graber [Thu, 3 Sep 2015 22:55:54 +0000 (18:55 -0400)]
configure.ac: v0.10

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
8 years agofix symlink
Serge Hallyn [Thu, 3 Sep 2015 13:46:52 +0000 (08:46 -0500)]
fix symlink

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
8 years agolxc mount hook: implement stgraber's suggestions
Serge Hallyn [Thu, 3 Sep 2015 04:00:11 +0000 (23:00 -0500)]
lxc mount hook: implement stgraber's suggestions

revert to using sh and use symlinks instead of extra mounts.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
8 years agoUpdate lxc mount hook to ovver a mount per co-mounted controller
Serge Hallyn [Thu, 3 Sep 2015 03:28:59 +0000 (22:28 -0500)]
Update lxc mount hook to ovver a mount per co-mounted controller

If cpu,cpuacct are comounted, then in addition to cpu,cpuacct make
mounts for 'cpu' and 'cpuacct'.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
8 years agolxc mount hook: don't mount lxcfs fs for any controller already setup
Serge Hallyn [Wed, 24 Jun 2015 23:26:06 +0000 (18:26 -0500)]
lxc mount hook: don't mount lxcfs fs for any controller already setup

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
8 years agodon't thread
Serge Hallyn [Wed, 24 Jun 2015 23:15:34 +0000 (18:15 -0500)]
don't thread

The pieces are there, but for now it's still not safe with libdbus

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
8 years agoReturn host's meminfo file if no memory cgroup
Serge Hallyn [Fri, 5 Jun 2015 04:18:20 +0000 (23:18 -0500)]
Return host's meminfo file if no memory cgroup

If memory cgroup is not available (that is, we can't find a
memory cgroup for the reading task), then just return the
contents of the host's /proc/meminfo.  (Same for all proc file
reads)

Closes #30

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agofix two threading issues
Serge Hallyn [Wed, 20 May 2015 15:56:46 +0000 (08:56 -0700)]
fix two threading issues

Make sure to prep dbus for threading before we start.

And use _exit() any time we are exiting from a forked child.  This is
to avoid calling the at_exit() functions.  Once a thread in the main
program has called nih_error_init(), this registers an at_exit fn which
asserts that the nih_context not be null - but after we fork, if libnih
is built with --enable-threading, then the nih_context is in fact null.
The only way to clear the atexit fns would be to exec().  So call
_exit() instead of exit(), because _exit() avoids calling the atexit
fns.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agouse threads when safe
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>
9 years agoconfigure.ac: v0.9 lxcfs-0.9
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>
9 years agoMerge pull request #26 from mikemccracken/maybe-fix-24
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

9 years agoinside *_read() funcs, return 0 for snprintf errors and truncations
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>
9 years agocheck return value from snprintf to avoid FUSE errors. Potentially fixes #24.
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>
9 years agoconfigure.ac: release 0.8 lxcfs-0.8
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>
9 years agoimplement --version
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>
9 years agoFix the check for cpu being in cpuset range
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>
9 years agoAdd some more sanity checks
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>
9 years agofree d at program end
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>
9 years agoMake sure that that '/cgroup' and the controller are sep'd by /
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>
9 years agocg_read: add ending newline
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>
9 years agouse direct_io
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>
9 years agoProvide the fuse options we want ourselves
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>
9 years agoCleanup whitespace
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>
9 years agoMerge pull request #22 from hustcat/cache.1
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

9 years agoinfo as parent when malloc memory for file buf
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>
9 years agoMerge pull request #19 from hallyn/cache.1
Serge Hallyn [Thu, 9 Apr 2015 21:18:06 +0000 (16:18 -0500)]
Merge pull request #19 from hallyn/cache.1

Cache.1

9 years agoadd cache for proc file, for support multiple read
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>
9 years agoLXC hook fixes
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>
9 years agocache: use file_dir object as parent for alloc'ed objects
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>
9 years agodon't check for cgroup perms when opendir'ing /cgroup
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>
9 years agoadd a file_info cache pointer for procfile reads
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>
9 years agoadd cache types for each procfile type that we provide
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>
9 years agocheck that file and dir entries don't get mixed up
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>
9 years agocache verified controller/cgroup info at cg file read/write
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>
9 years agocache opendir work and re-use it at readdir
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>
9 years agorelease 0.7 lxcfs-0.7
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>
9 years agobe robust to glibc fork failures
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>
9 years agotimeout the reception of a scm_cred
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>
9 years agonih_local's must be initialized as NULL
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>
9 years agoMerge pull request #16 from hustcat/diskstats
Serge Hallyn [Wed, 18 Mar 2015 14:59:02 +0000 (09:59 -0500)]
Merge pull request #16 from hustcat/diskstats

Add /proc/diskstats

9 years agoAdd /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>
9 years agoMerge pull request #15 from steelbrain/master
Serge Hallyn [Wed, 25 Feb 2015 05:00:27 +0000 (23:00 -0600)]
Merge pull request #15 from steelbrain/master

Fix formatting of README

9 years agoFix 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>
9 years agoFix test_proc following the stat fix
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>
9 years agoRelease LXCFS 0.6 lxcfs-0.6
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>
9 years agoShow cpu-average in /proc/stat and start cup numbering at 0
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>
9 years agoclean up after several functions
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>
9 years agoUpdate README
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>
9 years agoRelease LXCFS 0.5 lxcfs-0.5
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>
9 years agohook: Don't spam /etc/mtab
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>
9 years agoMake the LXC hook more robust
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>
9 years agoUpdate gitignore
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>
9 years agoBetter detect the cgmanager version
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>
9 years agoRelease LXCFS 0.4 lxcfs-0.4
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>
9 years agoRemount / recursive ms-slave in our new mntns
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>
9 years agoRevert "remount / ms-slave"
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.

9 years agoremount / ms-slave
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>
9 years agoRelease LXCFS 0.3 lxcfs-0.3
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>
9 years agoFix LXC config install path
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>
9 years agoRelease LXCFS 0.2 lxcfs-0.2
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>
9 years agoUpdate the lxc hook and add a LXC config file
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>
9 years agotests: Fix return value
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>
9 years agoRelease LXCFS 0.1 lxcfs-0.1
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>
9 years agoFix autotools
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>
9 years agotest: Introduce a basic cgroup tree test
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>
9 years agotest: Introduce a basic proc tree test
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>
9 years agoupdate docs
Serge Hallyn [Thu, 8 Jan 2015 22:29:11 +0000 (16:29 -0600)]
update docs

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoadd lxcfs container hook and comment
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>
9 years agowrite: make sure to null terminate the buffer
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>
9 years agoAdd some more missing newlines
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>
9 years agofix up pid conversion algorithm
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>
9 years agoUpdate README
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>
9 years agoAdd some more information to error messages
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>
9 years agoconvert pids at write to tasks and cgroup.procs files
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>
9 years agoMerge branch 'readtasks.pass.creds.2' into m.2
Serge Hallyn [Sat, 27 Dec 2014 03:09:14 +0000 (21:09 -0600)]
Merge branch 'readtasks.pass.creds.2' into m.2

9 years agoread: translate pids into the reader's pidns
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>
9 years agoAdd missing line breaks
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>
9 years agoimplement read of /proc/uptime
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>