- 06 Nov, 2013 3 commits
-
-
Dwight Engen authored
Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
Changelog: [serge] remove unneeded explicity qsort call Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Stéphane Graber authored
Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
- 05 Nov, 2013 4 commits
-
-
Stéphane Graber authored
Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
Dwight Engen authored
Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Dwight Engen authored
Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Dwight Engen authored
Containers started with lxc-execute may not have a conf, but nothing in the implementation of lxcapi_get_cgroup_item() actually needs/uses it, and it can be useful to get items out of the containers' cgroup items. Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
- 04 Nov, 2013 5 commits
-
-
Dwight Engen authored
- Also removed duplicate stats_clear lua function Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
Previously, the lua stats collection was building its own paths to the cgroup files, which could be wrong depending on what --with-cgroup-pattern was passed to configure. Fix it to use the get_cgroup_item api so it always finds the files. Remove cgroup_path_get since it is not used anymore. Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
fix up api test to run and add test for new [gs]et_cgroup_item Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
S.Çağlar Onur authored
Signed-off-by:
S.Çağlar Onur <caglar@10ur.org> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
S.Çağlar Onur authored
Signed-off-by:
S.Çağlar Onur <caglar@10ur.org> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
- 01 Nov, 2013 4 commits
-
-
S.Çağlar Onur authored
Signed-off-by:
S.Çağlar Onur <caglar@10ur.org> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
S.Çağlar Onur authored
valgrind drd tool shows conflicting stores happening at lxc_global_config_value@src/lxc/utils.c (v2) Conflict occurs between following lines [...] 269 if (values[i]) 270 return values[i]; [...] and [...] 309 /* could not find value, use default */ 310 values[i] = (*ptr)[1]; [...] fix it using a specific lock dedicated to that problem as Serge suggested. Also introduce a new autoconf parameter (--enable-mutex-debugging) to convert mutexes to error reporting type and to provide a stacktrace when locking fails. Signed-off-by:
S.Çağlar Onur <caglar@10ur.org> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
If we're not root, our mounts in private userns won't get pushed back anyway. If we are root, we need to make sure that anything the template does gets cleaned up. Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Serge Hallyn authored
They are a nuisance. Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
- 30 Oct, 2013 8 commits
-
-
Dwight Engen authored
I goofed and left in a getchar() that I was using to pause the test program in a case that was failing for me. Remove it. Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
S.Çağlar Onur authored
daemonize implies close_all_fds so set it in lxcapi_want_daemonize instead of setting in every cli or in every binding explicitly Reported-by:
Fatih Arslan <ftharsln@gmail.com> Signed-off-by:
S.Çağlar Onur <caglar@10ur.org> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
lxc_conf exists after api_save_config Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
don't use lxcpath variable for rootfs_path, it's confusing. if rootfs is passed in and tpath is passed in, return error before we save a new config, and don't delete the container make sure to check c->lxc_conf is not NULL before dereferencing it. Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Sheng Yong authored
1. rootfs.path set, -t not set: rootfs.path is rootfs path 2. rootfs.path set, -t set: change template default path to rootfs path 3. rootfs.path not set, -t set: template default path is rootfs path 4. rootfs.path not set, -t not set: error 5. rootfs.path set but cannot access: error Signed-off-by:
Sheng Yong <shyodx@gmail.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Sheng Yong authored
If lxc.rootfs is specified, we believe rootfs is ready. lxc-start will check this later. Return true, because the container is created. Signed-off-by:
Sheng Yong <shyodx@gmail.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Dwight Engen authored
Commit 1ea59ad2 sets memory.use_hierarchy, which means that this test cannot use memory.swappiness as its dummy cgroup item to set/unset since writing to it with use_hierarchy set gets -EINVAL. Change test to use memory.soft_limit_in_bytes instead. Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
- 29 Oct, 2013 4 commits
-
-
Dwight Engen authored
Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Dwight Engen authored
Coverity 1076328 marked this as "Use after free", which it isn't really, its actually just free()ing the wrong 2nd, 3rd, etc... pointers. Test by passing two or more args to startl, without this change you get segfault when free()ing the second pointer/arg. Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Serge Hallyn authored
We want to ensure smooth upgrades when doing rpm -U throughout the release cycle so this change implements the scheme documented at: http://fedoraproject.org/wiki/Packaging%3aNamingGuidelines#NonNumericReleaseSigned-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Dwight Engen authored
The kernel (net/core/dev_ioctl.c:dev_ioctl()) is going to NULL terminate this name after the copy-in of the ifr, so even though this is a fixed sized array the last byte isn't usable as part of the name. All the ioctls we're using go through this code path. Use the ifr name in the DEBUG message in case it was possibly truncated. Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
- 28 Oct, 2013 2 commits
-
-
S.Çağlar Onur authored
Signed-off-by:
S.Çağlar Onur <caglar@10ur.org> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
S.Çağlar Onur authored
Signed-off-by:
S.Çağlar Onur <caglar@10ur.org> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
- 25 Oct, 2013 6 commits
-
-
Dwight Engen authored
Mar 24 2009 was actually a Tuesday, maybe Daniel was still recovering from Monday ;) Stranger still that RPM actually checks this!? Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
S.Çağlar Onur authored
The addrlen parameter should be the actual length of socket's name for abstract sockets. Otherwise socket gets padded with NULLs. cat /proc/net/unix | grep lxc [...] 0000000000000000: 00000003 00000000 00000000 0001 03 226548 @lxc/ad055575fe28ddd5//var/lib/lxc^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ [...] with this patch; cat /proc/net/unix | grep lxc [...] 0000000000000000: 00000002 00000000 00010000 0001 01 109563 @lxc/ad055575fe28ddd5//var/lib/lxc [...] Changes since v1: * check the length of passed-in string Changes since v2: * remove non-abstract socket code path to simplify functions * rename lxc_af_unix_* family to lxc_abstract_unix_* Signed-off-by:S.Çağlar Onur <caglar@10ur.org> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
S.Çağlar Onur authored
list_active_containers parses /proc/net/unix which can contain multiple entries for the same container; 0000000000000000: 00000002 00000000 00010000 0001 01 273672 @/var/lib/lxc/6/command 0000000000000000: 00000002 00000000 00010000 0001 01 274395 @/var/lib/lxc/5/command 0000000000000000: 00000002 00000000 00010000 0001 01 273890 @/var/lib/lxc/4/command 0000000000000000: 00000002 00000000 00010000 0001 01 273141 @/var/lib/lxc/3/command 0000000000000000: 00000002 00000000 00010000 0001 01 273915 @/var/lib/lxc/2/command 0000000000000000: 00000002 00000000 00010000 0001 01 273683 @/var/lib/lxc/1/command 0000000000000000: 00000002 00000000 00010000 0001 01 273074 @/var/lib/lxc/0/command 0000000000000000: 00000002 00000000 00010000 0001 01 273931 @/var/lib/lxc/9/command 0000000000000000: 00000002 00000000 00010000 0001 01 273110 @/var/lib/lxc/8/command 0000000000000000: 00000002 00000000 00010000 0001 01 273390 @/var/lib/lxc/7/command 0000000000000000: 00000003 00000000 00000000 0001 03 275903 @/var/lib/lxc/8/command 0000000000000000: 00000003 00000000 00000000 0001 03 276043 @/var/lib/lxc/1/command 0000000000000000: 00000003 00000000 00000000 0001 03 273301 @/var/lib/lxc/0/command 0000000000000000: 00000003 00000000 00000000 0001 03 275650 @/var/lib/lxc/4/command On this system list_active_containers returns 14 containers while only 10 containers are running. Following patch; * Introduces array_contains function to do a binary search on given array, * Starts to sort arrays inside the add_to_clist and add_to_names functions, * Consumes array_contains in list_active_containers to eliminate duplicates, * Replaces the linear search code in lxcapi_get_interfaces with the new function. Changes since v1: * Do not load containers if a if a container list is not passed in * Fix possible memory leaks in lxcapi_get_ips and lxcapi_get_interfaces if realloc fails Signed-off-by:
S.Çağlar Onur <caglar@10ur.org> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Natanael Copa authored
We allow 4 consoles in the LXC config file so we can enable 4 in the inittab as well. Signed-off-by:
Natanael Copa <ncopa@alpinelinux.org> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Natanael Copa authored
The bootmisc script is needed to clean up various temp dirs like /tmp and migrate /var/run to /run if needed. The syslog service is started in 'boot' runlevel when running on real hardware so we do the same for containers. Signed-off-by:
Natanael Copa <ncopa@alpinelinux.org> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
But don't fail the container start if that fails. Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
- 24 Oct, 2013 4 commits
-
-
Stéphane Graber authored
Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Note this results in nics named things like 'lxcuser-0p'. We'll likely want to pass the requested name to lxc-user-nic, but let's do that in a separate patch. If we're not root, we can't create new network itnerfaces to pass into the container. Instead wait until the container is started, and call lxc-user-nic to create and assign the nics. Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Serge Hallyn authored
Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Serge Hallyn authored
It needs to be done from the handler, not the container, since the container may not have the rights. Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com> Changelog: Jul 22: remove hardcoded path for /bin/chown Jul 22: use new lxc-usernsexec Conflicts: src/lxc/lxccontainer.c
-