- 13 Jan, 2014 8 commits
-
-
Serge Hallyn authored
By setting lxc.network.hwaddr to something like fe:xx:xx:xx:xx:xx each "x" will be replaced by a random value. If less significant bit of first byte is "templated", it will be set to 0. This change introduce also a common randinit() function that could be used to initialize random generator. Signed-off-by:
gza <lxc@zitta.fr> Acked-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
KATOH Yasufumi authored
Signed-off-by:
KATOH Yasufumi <karma@jazz.email.ne.jp> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
It simply creates a test user and tries to create and start a container as that user. Tries to lxc-attach to that container to test network connectivity. Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Serge Hallyn authored
It's nice if we can do it, but not required. Exiting on this failure causes lxc-create started by root as a less-privileged userid to fail. Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Dwight Engen authored
Since previously I had found a config item that wasn't being propagated by lxc-clone, I went through all the config items and made sure that: a) Each item is documented in lxc.conf b) Each item is written out by write_config The only one that isn't is lxc.include, which by its nature only pulls in other config item types. Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Currently when a container is shut down, lxc walks the set of all cgroup paths it created, in reverse order, and tries to remove them. This doesn't suffice if the container has also created new cgroups. It'd be impolite to recursively remove all the cgroup paths we created, since this can include '/lxc' and thereunder all other containers started since. This patch changes container shutdown to only delete the container's own path, but do so recursively. Note that if we fail during startup, the container won't have created any cgroup paths so it the old way works fine. Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Stéphane Graber authored
This adds a new template called "download". It's a fairly simple template with a minimal set of dependency which will grab any pre-built image available on https://images.linuxcontainers.org Note that the serverside is still work in progress (missing SSL support). Access is done over https by default with a warning being emitted if fallback to http was required (may be needed for testing, when behind proxy and with private servers). All index files and tarballs are gpg-signed with the default pubkeyid contained in the template itself. The main benefit of this template is to be entirely distribution-agnostic, any template that can be integrated with the server build infrastructure will then work on any LXC machine when using the download template. This template is also compatible with user namespaces and will hopefully help widden the number of distros that may work in unprivileged LXC. This commit also bundles a small change to the template configs to have the ubuntu template (used by the download template) to work with unprivileged LXC. Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Stéphane Graber authored
Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
- 11 Jan, 2014 2 commits
-
-
Stéphane Graber authored
This should be the last change of name for those options. This change basically move them all to lxc.bdev.<backend>.<option>. Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com> Acked-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
If /proc/self/ns does not exist, then preserve_ns was failing to initialize the saved_ns[i] to -1. This caused attach_ns() to try and attach, and of course fail. Initialize the saved ns values before returning an error. The return values of preserve_ns and attach_ns were also being ignored. Honor them. Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
- 10 Jan, 2014 4 commits
-
-
Stéphane Graber authored
Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Stéphane Graber authored
Instead of having one function for each possible key in lxc.conf which doesn't really scale and requires an API update for every new key, switch to a generic lxc_get_global_config_item() function which takes a key name as argument. Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Stéphane Graber authored
Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Stéphane Graber authored
This is a first step in bringing the lxc.conf configfile in line with the container's format. Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
- 09 Jan, 2014 1 commit
-
-
KATOH Yasufumi authored
The old version of lxc-ls is the wrapper of ls(1). But now it is python script, so "see also ls(1)" is not needed. Signed-off-by:
KATOH Yasufumi <karma@jazz.email.ne.jp> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
- 08 Jan, 2014 2 commits
-
-
Stephen Ayotte authored
Change all instances of "unsigned long" where referring to a bdev size to uint64_t; this fixes some overflows on 32-bit machines, where "unsigned long" is uint32_t. Support all unit-sizes supported by LVM except 's' and 'e' [bkmgt]. Print a warning and use default bdev-size if invalid unit-size specified. Signed-off-by:
Stephen Ayotte <stephen.ayotte@gmail.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Qiang Huang authored
Signed-off-by:
Qiang Huang <h.huangqiang@huawei.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
- 07 Jan, 2014 9 commits
-
-
Stéphane Graber authored
Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
Stéphane Graber authored
Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
Jiri Slaby authored
It is needed by insserv-compat. Signed-off-by:
Jiri Slaby <jslaby@suse.cz> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Jiri Slaby authored
On suse we have the header in a subdir inside /usr/include, so pkgconfig has to be used to find out proper CFLAGS. Signed-off-by:
Jiri Slaby <jslaby@suse.cz> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Stéphane Graber authored
Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
Serge Hallyn authored
Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
This happens for instance if you run a test under sudo which then runs lxc commands under 'su - <someuser>' Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
KATOH Yasufumi authored
* nokill option of lxc-stop (commit 84fbfcb4) * lxc.haltsignal in lxc.conf (commit f0f1d8c0) * fix sgml (commit d438f5a0) Signed-off-by:
KATOH Yasufumi <karma@jazz.email.ne.jp> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
S.Çağlar Onur authored
Setting "lxc.console = none" causes following failure during startup lxc-start 1389039861.061 INFO lxc_start_ui - using rcfile lxcpath/original/config lxc-start 1389039861.062 INFO lxc_confile - read uid map: type u nsid 0 hostid 260000 range 10000 lxc-start 1389039861.062 INFO lxc_confile - read uid map: type g nsid 0 hostid 260000 range 10000 lxc-start 1389039861.062 WARN lxc_log - lxc_log_init called with log already initialized lxc-start 1389039861.065 INFO lxc_lsm - LSM security driver AppArmor lxc-start 1389039861.066 DEBUG lxc_conf - allocated pty '/dev/pts/0' (5/6) lxc-start 1389039861.066 DEBUG lxc_conf - allocated pty '/dev/pts/7' (7/8) lxc-start 1389039861.066 DEBUG lxc_conf - allocated pty '/dev/pts/8' (9/10) lxc-start 1389039861.066 DEBUG lxc_conf - allocated pty '/dev/pts/9' (11/12) lxc-start 1389039861.066 INFO lxc_conf - tty's configured lxc-start 1389039861.066 DEBUG lxc_start - sigchild handler set lxc-start 1389039861.066 ERROR lxc_conf - Error chowning lxc-start 1389039861.066 ERROR lxc_conf - Failed to chown lxc-start 1389039861.066 ERROR lxc_start - Failed to shift tty into container lxc-start 1389039861.066 ERROR lxc_start - failed to initialize the container lxc-start 1389039861.067 INFO lxc_monitor - using monitor sock name lxc/0863ffed81827105/lxcpath fix it by checking the console.name before using it. Signed-off-by:S.Çağlar Onur <caglar@10ur.org> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
- 06 Jan, 2014 11 commits
-
-
S.Çağlar Onur authored
doxygen and graphviz causes travis vm to download ~400 MB from internet and causes travis builds to timeouts occasionally. Signed-off-by:
S.Çağlar Onur <caglar@10ur.org> 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>
-
Qiang Huang authored
Debian and Ubuntu uses docbook2x-man, but some other distr like suse uses docbook-to-man. I think all of them should work on LXC. Signed-off-by:
Qiang Huang <h.huangqiang@huawei.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
- use this in the busybox template since busybox's init expects to receive SIGUSR1 to halt - fix lxc.stopsignal to be output by write_config so lxcapi_clone() and lxcapi_save_config() will output it Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Nick Huber authored
On my Ubuntu 13.10 system, lxc-ps was always giving empty output. The output of /proc/$initpid/cgroup was 11:name=systemd:/user/1000.user/c3.session 10:hugetlb:/container 9:perf_event:/container 8:blkio:/container 7:freezer:/container 6:devices:/container 5:memory:/container 4:cpuacct:/container 3:cpu:/container 2:cpuset:/container Using the cpuset line should be a safer option. Signed-off-by:
Nick Huber <nicholashuber@gmail.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Qiang Huang authored
Signed-off-by:
Qiang Huang <h.huangqiang@huawei.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Dwight Engen authored
This makes the arguments between lxc-stop and lxc-autostart more consistent, so that --shutdown doesn't have two different meanings. Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
KATOH Yasufumi authored
* lxc-attach(1): Update to the status of kernel 3.8 or higher * lxc-create(1), lxc-destroy(1): Now lxc-ls don't have "-l" option, so remove * lxc(7): update description of lxc-ls and lxc-info to current version * see-also: fix lxc(1) to lxc(7) Signed-off-by:
KATOH Yasufumi <karma@jazz.email.ne.jp> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
KATOH Yasufumi authored
Update for commit a771fe18Signed-off-by:
KATOH Yasufumi <karma@jazz.email.ne.jp> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
S.Çağlar Onur authored
Add pthread_atfork check to configure.ac and uses it when necessary, Introduces tls.m4 macro for checking thread-local storage support, Puts values array into thread-local storage (lxc_global_config_value@src/lxc/utils.c), Removes static_lock/static_unlock from LXC code. Lastly, it introduces a warning for bionic users about multithreaded usage of LXC. (requires 64b1be29 to be reverted first) Signed-off-by:
S.Çağlar Onur <caglar@10ur.org> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Stéphane Graber authored
This reverts commit 64b1be29. Reverting in preparation for another implementation which is bionic-compatible. Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com>
-
- 03 Jan, 2014 1 commit
-
-
Dwight Engen authored
This change updates the way init scripts get installed so that more than one init system can be supported. Instead of installing the systemd service file from the spec file, it should be installed at make install time, so that someone compiling from source also gets the unit file installed. Update the plamo template to use a lock file not named just /var/lock/subsys/lxc since the presence of that file is used by sysv init rc file to know if it should run the K01lxc script. This also makes it consistent with the other templates which use /var/lock/subsys/lxc-$template-name. Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
- 02 Jan, 2014 2 commits
-
-
Serge Hallyn authored
Stéphane noticed that lxc-snapshot of a dir-backed container created an overlayfs container. The expectation is that the user can continue to modify the original container and later make a new snapshot, but this doesn't work with the existing behavior - the overlayfs clone will end up with the modified contents. So add a 'LXC_CLONE_KEEPBDEVTYPE' flag, which c->snapshot() passes to c->clone(). Also add a LXC_CLONE_MAYBE_SNAPSHOT. If this is set and a backing store does not support snapshotting, then proceed with a copy clone. Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
It is desirable to have a mode where a soft shutdown is requested, but then do a hard shutdown if after some time period the container has not shut down. This the default behaviour of lxc-stop, but is not currently possible with lxc-autostart. This change makes this the default behaviour when shutdown is specified to lxc-autostart. This will be very useful for init scripts. An indefinte wait for soft shutdown (though I'm not sure how that would be useful) is still possible by passing a timeout of 0. Change default timeout value to 60 seconds to match lxc-stop Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-