- 12 7月, 2013 1 次提交
-
-
由 John Ferlan 提交于
Recent changes uncovered a NEGATIVE_RETURNS in the return from sysconf() when processing a for loop in virtTestCaptureProgramExecChild() in testutils.c Code review uncovered 3 other code paths with the same condition that weren't found by Covirity, so fixed those as well.
-
- 11 7月, 2013 2 次提交
-
-
由 Gao feng 提交于
these parameters shouldn't be marked as ATTRIBUTE_UNUSED. Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
由 Daniel P. Berrange 提交于
Convert the type of loop iterators named 'i', 'j', k', 'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or 'unsigned int', also santizing 'ii', 'jj', 'kk' to use the normal 'i', 'j', 'k' naming Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 10 7月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 09 7月, 2013 2 次提交
-
-
由 Gao feng 提交于
Create parent directroy for hostdev automatically when we start a lxc domain or attach a hostdev to a lxc domain. Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
由 Gao feng 提交于
This helper function is used to create parent directory for the hostdev which will be added to the container. If the parent directory of this hostdev doesn't exist, the mknod of the hostdev will fail. eg with /dev/net/tun Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
- 03 7月, 2013 1 次提交
-
-
由 Gao feng 提交于
We forgot to free the stack when Kernel doesn't support user namespace. Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
- 02 7月, 2013 5 次提交
-
-
由 Daniel P. Berrange 提交于
Add some debug logging of LXC wait/continue messages and uid/gid map update code.
-
由 Daniel P. Berrange 提交于
User namespaces will deny the ability to mount the SELinux filesystem. This is harmless for libvirt's LXC needs, so the error can be ignored. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Gao feng 提交于
user namespace doesn't allow to create devices in uninit userns. We should create devices on host side. We first mount tmpfs on dev directroy under state dir of container. then create devices under this dev dir. Finally in container, mount the dev directroy created on host to the /dev/ directroy of container. Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
由 Gao feng 提交于
This patch introduces new helper function virLXCControllerSetupUserns, in this function, we set the files uid_map and gid_map of the init task of container. lxcContainerSetID is used for creating cred for tasks running in container. Since after setuid/setgid, we may be a new user. This patch calls lxcContainerSetUserns at first to make sure the new created files belong to right user. Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
由 Gao feng 提交于
User namespace will be enabled only when the idmap exist in configuration. If you want disable user namespace,just remove these elements from XML. If kernel doesn't support user namespace and idmap exist in configuration file, libvirt lxc will start failed and return "Kernel doesn't support user namespace" message. Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
- 14 6月, 2013 1 次提交
-
-
由 Richard Weinberger 提交于
...fixes a trivial copy&paste error. Signed-off-by: NRichard Weinberger <richard@nod.at>
-
- 05 6月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Earlier commit f7e8653f dropped support for using LXC with kernels having single-instance devpts filesystem from the LXC controller. It forgot to remove the same code from the LXC container setup. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 21 5月, 2013 2 次提交
-
-
由 Osier Yang 提交于
-
由 Gao feng 提交于
After commit c131525b "Auto-add a root <filesystem> element to LXC containers on startup" for libvirt lxc, root must be existent. Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
- 17 5月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
Re-add the selinux header to lxc_container.c since other functions now use it, beyond the patch that was just reverted. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
This reverts commit 940c6f10.
-
- 16 5月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
Before trying to mount the selinux filesystem in a container use is_selinux_enabled() to check if the machine actually has selinux support (eg not booted with selinux=0) Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
During startup, the LXC driver uses paths such as /.oldroot/var/run/libvirt/lxc/... to access directories from the previous root filesystem after doing a pivot_root(). Unfortunately if /var/run is an absolute symlink to /run, instead of a relative symlink to ../run, these paths break. At least one Linux distro is known to use an absolute symlink for /var/run, so workaround this, by resolving all symlinks before doing the pivot_root(). Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 15 5月, 2013 4 次提交
-
-
由 Dan Walsh 提交于
We do not want to allow contained applications to be able to read fusefs_t. So we want /proc/meminfo label to match the system default proc_t. Fix checking of error codes
-
由 Daniel P. Berrange 提交于
The lxcContainerMountAllFS method had a 'bool skipRoot' flag to control whether it mounts the / filesystem. Since removal of the non-pivot root container setup codepaths, this flag is obsolete as the only caller always passes 'true'. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Many methods accept a string parameter specifying the old root directory prefix. Since removal of the non-pivot root container setup codepaths, this parameter is obsolete in many methods where the callers always pass "/.oldroot". Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The lxcContainerMountBasicFS method had a 'bool pivotRoot' flag to control whether it mounted a private /dev. Since removal of the non-pivot root container setup codepaths, this flag is obsolete as the only caller always passes 'true'. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 09 5月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 08 5月, 2013 1 次提交
-
-
由 John Ferlan 提交于
-
- 02 5月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
The source code base needs to be adapted as well. Some files include virutil.h just for the string related functions (here, the include is substituted to match the new file), some include virutil.h without any need (here, the include is removed), and some require both.
-
- 16 4月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
The LXC driver currently has code to detect cgroups mounts and then re-mount them inside the new root filesystem. Replace this fragile code with a call to virCgroupIsolateMount. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 09 4月, 2013 3 次提交
-
-
由 Daniel P. Berrange 提交于
If the user requests a mount for /run, this may hide any existing mounts that are lower down in /run. The result is that the container still sees the mounts in /proc/mounts, but cannot access them sh-4.2# df df: '/run/user/501/gvfs': No such file or directory df: '/run/media/berrange/LIVE': No such file or directory df: '/run/media/berrange/SecureDiskA1': No such file or directory df: '/run/libvirt/lxc/sandbox': No such file or directory Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/vg_t500wlan-lv_root 151476396 135390200 8384900 95% / tmpfs 1970888 3204 1967684 1% /run /dev/sda1 194241 155940 28061 85% /boot devfs 64 0 64 0% /dev tmpfs 64 0 64 0% /sys/fs/cgroup tmpfs 1970888 1200 1969688 1% /etc/libvirt-sandbox/scratch Before mounting any filesystem at a particular location, we must recursively unmount anything at or below the target mount point Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Ensure lxcContainerUnmountSubtree is at the top of the lxc_container.c file so it is easily referenced from any other method. No functional change Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Bogdan Purcareata 提交于
This allows a container-type domain to have exclusive access to one of the host's NICs. Wire <hostdev caps=net> with the lxc_controller - when moving the newly created veth devices into a new namespace, also look for any hostdev devices that should be moved. Note: once the container domain has been destroyed, there is no code that moves the interfaces back to the original namespace. This does happen, though, probably due to default cleanup on namespace destruction. Signed-off-by: NBogdan Purcareata <bogdan.purcareata@freescale.com>
-
- 04 4月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Currently the LXC container code has two codepaths, depending on whether there is a <filesystem> element with a target path of '/'. If we automatically add a <filesystem> device with src=/ and dst=/, for any container which has not specified a root filesystem, then we only need one codepath for setting up the filesystem. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 23 3月, 2013 3 次提交
-
-
由 Daniel P. Berrange 提交于
For a root filesystem with type=file or type=block, the LXC container was forgetting to actually mount it, before doing the pivot root step. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Currently the lxc controller sets up the devpts instance on $rootfsdef->src, but this only works if $rootfsdef is using type=mount. To support type=block or type=file for the root filesystem, we must use /var/lib/libvirt/lxc/$NAME.devpts for the temporary devpts mount in the controller
-
由 Daniel P. Berrange 提交于
Instead of using /var/lib/libvirt/lxc/$NAME for the FUSE filesystem, use /var/lib/libvirt/lxc/$NAME.fuse. This allows room for other temporary mounts in the same directory
-
- 11 3月, 2013 1 次提交
-
-
由 Guido Günther 提交于
these were missed by 63f18f37
-
- 08 3月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
In the LXC container startup code when switching stdio streams, we call VIR_FORCE_CLOSE on all FDs. This triggers a huge number of warnings, but we don't see them because stdio is closed at this point. strace() however shows them which can confuse people debugging the code. Switch to VIR_MASS_CLOSE to avoid this Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 16 1月, 2013 1 次提交
-
-
由 Gao feng 提交于
libvirt lxc will fail to start when selinux is disabled. error: Failed to start domain noroot error: internal error guest failed to start: PATH=/bin:/sbin TERM=linux container=lxc-libvirt container_uuid=b9873916-3516-c199-8112-1592ff694a9e LIBVIRT_LXC_UUID=b9873916-3516-c199-8112-1592ff694a9e LIBVIRT_LXC_NAME=noroot /bin/sh 2013-01-09 11:04:05.384+0000: 1: info : libvirt version: 1.0.1 2013-01-09 11:04:05.384+0000: 1: error : lxcContainerMountBasicFS:546 : Failed to mkdir /sys/fs/selinux: No such file or directory 2013-01-09 11:04:05.384+0000: 7536: info : libvirt version: 1.0.1 2013-01-09 11:04:05.384+0000: 7536: error : virLXCControllerRun:1466 : error receiving signal from container: Input/output error 2013-01-09 11:04:05.404+0000: 7536: error : virCommandWait:2287 : internal error Child process (ip link del veth1) unexpected exit status 1: Cannot find device "veth1" fix this problem by checking if selinuxfs is mounted in host before we try to create dir /sys/fs/selinux. Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
- 14 1月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-