In almost all commands it's a useful addition to the -n
switch which is a common option, too.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
- Assume that the module name is "overlay" per default and not "overlayfs".
- Assume that the overlay version we are using requires a workdir.
- When we mount an overlay filesystem and we fail with ENODEV retry once with
the module name we haven't already used.
Signed-off-by: Christian Brauner <cbrauner@suse.de>
So far we accidently used close() on the original file descriptor. (After
fdopen() the original fd is considered private and should not be used anymore.
The close operations should be performed on the new file handle. We did the
correct thing on error but not on success.) Using close() on the original fd
caused "Text file busy" errors and prevented the cloned tmpfs container from
starting.
Signed-off-by: Christian Brauner <cbrauner@suse.de>
So far we've simply been using RUNTIME_PATH for the privileged and unprivileged
case. We should actually use XDG_RUNTIME_DIR for the unprivileged case.
Signed-off-by: Christian Brauner <cbrauner@suse.de>
When a container c is on a btrfs filesystem but is directory backed, copying
the container will default to snapshot. This is because of
should_default_to_snapshot() returning true in this case because c is on a
btrfs filesystem. We should make sure that should_default_to_snapshot() only
returns true, when c itself is a btrfs subvolume.
Signed-off-by: Christian Brauner <cbrauner@suse.de>
* Add undocumented options (-v/--set-var, --keep-var, -f/--rcfile)
* Change order of option in SYNOPSIS (-L that is placed after "command")
* Add long options in SYNOPSIS
Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
* Add undocumented options (-v/--set-var, --keep-var, -f/--rcfile)
* Change order of option in SYNOPSIS (-L that is placed after "command")
* Add long options in SYNOPSIS
Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Log output currently looks like this:
lxc-copy: debbdev/lxcdir.c: dir_clonepaths: 45 directories cannot be snapshotted. Try aufs or overlayfs.
we rather want it to be:
lxc-copy: deb: bdev/lxcdir.c: dir_clonepaths: 45 directories cannot be snapshotted. Try aufs or overlayfs.
Signed-off-by: Christian Brauner <cbrauner@suse.de>
Otherwise a container with a non-standard configuration file
can be started but not attached to.
Fixes the following case:
# lxc-start -n ct -f /different/path/my.config
# lxc-attach -n ct
Error: container ct is not defined
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This allows us to avoid using relative includes which is cleaner in the long
run when we create subdirectories for other components of liblxc.
Signed-off-by: Christian Brauner <cbrauner@suse.de>
To activate it specify lxc.syslog = <afacility>
For now the available facilities are: daemon, local[0-7] others will be
rejected
syslog got only activated after the function that checks for inheritance
of fd is passed in order to make sure the syslog fd is not inherited
and prevent the creation of the fd is any log have been issued during
the checks (which would end up in an infinite loop)
Signed-off-by: Fatih ACAR <fatih.acar@gandi.net>
Signed-off-by: Ahmed Amamou <ahmed@gandi.net>
Signed-off-by: Baptiste Daroussin <bapt@gandi.net>
Signed-off-by: William Dauchy <william@gandi.net>
This fixes a double free corruption on container-requested
reboots when lxc_spawn() fails before receiving the ttys, as
lxc_fini() (part of __lxc_start()'s cleanup) calls
lxc_delete_tty().
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>