- 15 Nov, 2013 2 commits
-
-
Stéphane Graber authored
Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
Stéphane Graber authored
So this implements the changes we discussed yesterday: - Only one container may be queried at the time - -n is now required once again - -H + a single filter only returns the value - -t/--is-state is now removed Note that -S is considered as more than a single filter, so -H in that case only affects the formatting of the values. For the same reason, I haven't yet implemented the -H + multiple filters case which we said should return a simple "key: value" output as it wasn't trivial to re-arrange the stats code to print a different format (for the other options, it's just a two lines change in the print functions). Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com> Acked-by:
Dwight Engen <dwight.engen@oracle.com>
-
- 14 Nov, 2013 3 commits
-
-
Serge Hallyn authored
To do this, add a c->clear_config() helper to the api. (this fixes the bug https://bugs.launchpad.net/bugs/1251352) Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@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>
-
Bogdan Purcareata authored
When moving an interface from the host netns to a container's, the ifindex might not remain the same. This happens when the index of the host interface is already assigned to another interface in the new netns. For veth/vlan/macvlan, virtual interfaces are first created on the host, and then moved in the container. Since they are created after all other interfaces are discovered, there is no chance for its assigned ifindex to be already present in a freshly created netns, because it's a greater number. However, when moving a physical interface, there is a chance that its ifindex in the host netns is not free in the new netns. The patch forces ifindex re-read for the LXC_NET_PHYS case to update the lxc_netdev structure. Signed-off-by:
Bogdan Purcareata <bogdan.purcareata@freescale.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
- 13 Nov, 2013 1 commit
-
-
S.Çağlar Onur authored
Adding block/char devices to running container is a common operation so provide a common implementation for users to consume. changes since v2; * lets the user set an alternate path inside the container as Stéphane suggested changes since v1; * removed duplicated code Signed-off-by:
S.Çağlar Onur <caglar@10ur.org> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
- 12 Nov, 2013 6 commits
-
-
KATOH Yasufumi authored
Update for commit b9d957c3Signed-off-by:
KATOH Yasufumi <karma@jazz.email.ne.jp> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
KATOH Yasufumi authored
Update for commit 2752ececSigned-off-by:
KATOH Yasufumi <karma@jazz.email.ne.jp> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
pc-wurm authored
I think '-t timeout' was mistakenly written, so I corrected it to '-t template', since the -t argument is used for setting templates, not timeout as far as I know. Signed-off-by:
pc-wurm <yordanov@pc-wurm.de> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Stéphane Graber authored
Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
This is likely unnecessary, but is consistent with other uses of fopen()/fclose() in lxc. Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
S.Çağlar Onur <caglar@10ur.org> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
We were calling save_config() twice within the create() flow, each from a different process. Depending on order of scheduling, sometimes the data from the first save_config() (which was just the stuff from LXC_DEFAULT_CONFIG) would overwrite the config we wanted (the full config), causing a truncated config file which would then cause lxc to segfault once it read it back in because no rootfs.path was set. This fixes it by only calling save_config() once in the create() flow. A rejected alternative was to call fsync(fileno(fout)) before the fclose in save_config. Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
S.Çağlar Onur <caglar@10ur.org> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
- 11 Nov, 2013 1 commit
-
-
Serge Hallyn authored
commit aae93dd3 fixed the command socket name to use the right pathlen instead of always passing in the max socket namelen. However, this breaks lxc-info/lxc-list/etc for containers started before that commit. So if the correct command sock name doesn't work, try the preexising one. Note we can probably undo this "after awhile". Maybe in august 2014. Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
- 08 Nov, 2013 4 commits
-
-
Dwight Engen authored
- This allows testing independently the modes with/without threading Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Otherwise we can reap another thread's forked pid. Changelog: Per Dwight's suggestion, use pid_t for argument. Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
S.Çağlar Onur <caglar@10ur.org>
-
Serge Hallyn authored
lxc-start is not safe (and doesn't actually make sense) if the task is nto single-threaded. Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Qiang Huang authored
It's a duplicate of util.h. Signed-off-by:
Qiang Huang <h.huangqiang@huawei.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
- 06 Nov, 2013 8 commits
-
-
Dwight Engen authored
I accidentally introduced this with the change to lxc-info (commit b9d957c3). Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
To do so we do a quick setns into the container's netns. This (unexpectedly) turns out cleaner than trying to rename it from lxc_setup(), because we don't know the original nic name in the container until we created it which we do in the parent after the init has been cloned. Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Serge Hallyn authored
conf.c/conf.h: have replaced bool hostid_is_mapped() with int mapped_hostid() which returns the mapped uid for the caller's uid on the host, or -1 if none create_run_template: pass caller's uid into template. lxc-ubuntu-cloud: 1. accept --mapped-uid argument 2. don't write to devices cgroup - not allowed. 3. if running in userns, use $HOME/.cache 4. chown cached files to the uid to which our caller was mapped 5. ignore /dev when extracting rootfs in a userns Changelog: nov 5: remove debugging INFO line. Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Dwight Engen authored
- allow lxc-info to show more than one container, using regex for the name Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
Found by running the lxc-test-list test with valgrind. The names were put into a local array, and never freed in the success case where the caller didn't want the names returned and in the early out failure case. Note we don't need to check the return from remove_from_array() because we just successfully added the name above. Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
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 2 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>
-