- 08 6月, 2011 4 次提交
-
-
由 Cole Robinson 提交于
Otherwise the following virFileMakePath will create the directory for us and fail further ahead, which probably isn't intended.
-
由 Cole Robinson 提交于
Add a handshake with the cloned container process to try and detect if it fails to start.
-
由 Cole Robinson 提交于
Add a simple handshake with the lxc_controller process so we can detect process startup failures. We do this by adding a new --handshake cli arg to lxc_controller for passing a file descriptor. If the process fails to launch, we scrape all output from the logfile and report it to the user.
-
由 Cole Robinson 提交于
We will reuse these shortly, and each use should have a different error message.
-
- 12 5月, 2011 1 次提交
-
-
由 Lai Jiangshan 提交于
These VIR_XXXX0 APIs make us confused, use the non-0-suffix APIs instead. How do these coversions works? The magic is using the gcc extension of ##. When __VA_ARGS__ is empty, "##" will swallow the "," in "fmt," to avoid compile error. example: origin after CPP high_level_api("%d", a_int) low_level_api("%d", a_int) high_level_api("a string") low_level_api("a string") About 400 conversions. 8 special conversions: VIR_XXXX0("") -> VIR_XXXX("msg") (avoid empty format) 2 conversions VIR_XXXX0(string_literal_with_%) -> VIR_XXXX(%->%%) 0 conversions VIR_XXXX0(non_string_literal) -> VIR_XXXX("%s", non_string_literal) (for security) 6 conversions Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
-
- 29 3月, 2011 1 次提交
-
-
由 Osier Yang 提交于
LXC driver doesn't support vcpu affinity yet, so just need to modify it to support cpu shares.
-
- 18 3月, 2011 1 次提交
-
-
由 Nikunj A. Dadhania 提交于
* Correct the documentation for cgroup: the swap_hard_limit indicates mem+swap_hard_limit. * Change cgroup private apis to: virCgroupGet/SetMemSwapHardLimit Signed-off-by: NNikunj A. Dadhania <nikunj@linux.vnet.ibm.com>
-
- 15 3月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
The current LXC I/O controller looks for HUP to detect when a guest has quit. This isn't reliable as during initial bootup it is possible that 'init' will close the console and let mingetty re-open it. The shutdown of containers was also flakey because it only killed the libvirt I/O controller and expected container processes to gracefully follow. Change the I/O controller such that when it see HUP or an I/O error, it uses kill($PID, 0) to see if the process has really quit. Change the container shutdown sequence to use the virCgroupKillPainfully function to ensure every really goes away This change makes the use of the 'cpu', 'devices' and 'memory' cgroups controllers compulsory with LXC * docs/drvlxc.html.in: Document that certain cgroups controllers are now mandatory * src/lxc/lxc_controller.c: Check if PID is still alive before quitting on I/O error/HUP * src/lxc/lxc_driver.c: Use virCgroupKillPainfully
-
- 10 3月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Adding audit points showed that we were granting too much privilege to qemu; it should not need any mknod rights to recreate any devices. On the other hand, lxc should have all device privileges. The solution is adding a flag parameter. This also lets us restrict write access to read-only disks. * src/util/cgroup.h (virCgroup*Device*): Adjust prototypes. * src/util/cgroup.c (virCgroupAllowDevice) (virCgroupAllowDeviceMajor, virCgroupAllowDevicePath) (virCgroupDenyDevice, virCgroupDenyDeviceMajor) (virCgroupDenyDevicePath): Add parameter. * src/qemu/qemu_driver.c (qemudDomainSaveFlag): Update clients. * src/lxc/lxc_controller.c (lxcSetContainerResources): Likewise. * src/qemu/qemu_cgroup.c: Likewise. (qemuSetupDiskPathAllow): Also, honor read-only disks.
-
- 24 2月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
Using the 'personality(2)' system call, we can make a container on an x86_64 host appear to be i686. Likewise for most other Linux 64bit arches. * src/lxc/lxc_conf.c: Fill in 32bit capabilities for x86_64 hosts * src/lxc/lxc_container.h, src/lxc/lxc_container.c: Add API to check if an arch has a 32bit alternative * src/lxc/lxc_controller.c: Set the process personality when starting guest
-
- 23 2月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
Normal practice for /dev/pts is to have it mode=620,gid=5 but LXC was leaving mode=000,gid=0 preventing unprivilegd users in the guest use of PTYs * src/lxc/lxc_controller.c: Fix /dev/pts setup
-
- 21 2月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Done mechanically with: $ git grep -l '\bDEBUG0\? *(' | xargs -L1 sed -i 's/\bDEBUG0\? *(/VIR_&/' followed by manual deletion of qemudDebug in daemon/libvirtd.c, along with a single 'make syntax-check' fallout in the same file, and the actual deletion in src/util/logging.h. * src/util/logging.h (DEBUG, DEBUG0): Delete. * daemon/libvirtd.h (qemudDebug): Likewise. * global: Change remaining clients over to VIR_DEBUG counterpart.
-
- 09 2月, 2011 1 次提交
-
-
由 Gui Jianfeng 提交于
LXC Blkio weight configuration support. Reviewed-by: N"Nikunj A. Dadhania" <nikunj@linux.vnet.ibm.com> Signed-off-by: NGui Jianfeng <guijianfeng@cn.fujitsu.com>
-
- 18 11月, 2010 1 次提交
-
-
由 Eric Blake 提交于
Per the gettext developer: http://lists.gnu.org/archive/html/bug-gnu-utils/2010-10/msg00019.html http://lists.gnu.org/archive/html/bug-gnu-utils/2010-10/msg00021.html gettext() doesn't work correctly on all platforms unless you have called setlocale(). Furthermore, gnulib's gettext.h has provisions for setting up a default locale, which is the preferred method for libraries to use gettext without having to call textdomain() and override the main program's default domain (virInitialize already calls bindtextdomain(), but this is insufficient without the setlocale() added in this patch; and a redundant bindtextdomain() in this patch doesn't hurt, but serves as a good example for other packages that need to bind a second translation domain). This patch is needed to silence a new gnulib 'make syntax-check' rule in the next patch. * daemon/libvirtd.c (main): Setup locale and gettext. * src/lxc/lxc_controller.c (main): Likewise. * src/security/virt-aa-helper.c (main): Likewise. * src/storage/parthelper.c (main): Likewise. * tools/virsh.c (main): Fix exit status. * src/internal.h (DEFAULT_TEXT_DOMAIN): Define, for gettext.h. (_): Simplify definition accordingly. * po/POTFILES.in: Add src/storage/parthelper.c.
-
- 11 11月, 2010 1 次提交
-
-
由 Daniel P. Berrange 提交于
The /dev/console device inside the container must NOT map to the real /dev/console device node, since this allows the container control over the current host console. A fun side effect of this is that starting a container containing a real Fedora OS will kill off your X server. Remove the /dev/console node, and replace it with a symlink to the primary console TTY * src/lxc/lxc_container.c: Replace /dev/console with a symlink to /dev/pty/0 * src/lxc/lxc_controller.c: Remove /dev/console from cgroups ACL
-
- 10 11月, 2010 1 次提交
-
-
由 Stefan Berger 提交于
Using automated replacement with sed and editing I have now replaced all occurrences of close() with VIR_(FORCE_)CLOSE() except for one, of course. Some replacements were straight forward, others I needed to pay attention. I hope I payed attention in all the right places... Please have a look. This should have at least solved one more double-close error.
-
- 20 10月, 2010 1 次提交
-
-
由 Guido Günther 提交于
Debian stock kernel has CONFIG_CGROUP_MEM_RES_CTLR disabled due to the overhead [1]. Allow to start containers if the corresponding files in the cgroup filesystem are missing. This fixes Debian bug #566180 [2]. [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=534964 [2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=566180
-
- 13 10月, 2010 2 次提交
-
-
由 Nikunj A. Dadhania 提交于
libvirt-lxc now configures the hardlimit, softlimit and swaplimit, if specified in the domain xml file or picks up the defaults.
-
由 Nikunj A. Dadhania 提交于
Adding parsing code for memory tunables in the domain xml file also change the internal define structures used for domain memory informations Adds a new specific test
-
- 30 7月, 2010 1 次提交
-
-
由 Ryota Ozaki 提交于
Previously, the functions in src/lxc/veth.c could sometimes return positive values on failure rather than -1. This made accurate error reporting difficult, and led to one failure to catch an error in a calling function. This patch makes all the functions in veth.c consistently return 0 on success, and -1 on failure. It also fixes up the callers to the veth.c functions where necessary. Note that this patch may be related to the bug: https://bugzilla.redhat.com/show_bug.cgi?id=607496. It will not fix the bug, but should unveil what happens. * po/POTFILES.in - add veth.c, which previously had no translatable strings * src/lxc/lxc_controller.c * src/lxc/lxc_container.c * src/lxc/lxc_driver.c - fixup callers to veth.c, and remove error logs, as they are now done in veth.c * src/lxc/veth.c - make all functions consistently return -1 on error. * src/lxc/veth.h - use ATTRIBUTE_NONNULL to protect against NULL args.
-
- 23 7月, 2010 1 次提交
-
-
由 Ryota Ozaki 提交于
Init process may remain after sending SIGTERM for some reason. For example, if original init program is used, it is definitely not killed by SIGTERM. * src/lxc/lxc_controller.c: kill with SIGKILL if SIGTERM wasn't sufficient
-
- 29 6月, 2010 1 次提交
-
-
由 Ryota Ozaki 提交于
The message is actually not of error but of debugging. 02:22:56.091: error : lxcControllerMain:316 : monitor=3 client=4 appPty=19 contPty=7
-
- 21 5月, 2010 2 次提交
-
-
由 Jim Meyering 提交于
Run this: git grep -l 'VIR_ERROR\s*("'|xargs perl -pi -e \ 's/(VIR_ERROR)\s*\((".*?"),/$1(_($2),/'
-
由 Jim Meyering 提交于
* src/lxc/lxc_controller.c (ignorable_epoll_accept_errno): New function. (lxcControllerMain): Handle a failed accept carefully: most errno values indicate legitimate failure and must be fatal. However, ignore a special case: that in which an incoming client quits between the poll() indicating its presence, and our accept() which is trying to process it.
-
- 19 5月, 2010 1 次提交
-
-
由 Jim Meyering 提交于
Approximately 60 messages were marked. Since these diagnostics are intended solely for developers and maintainers, encouraging translation is deemed to be counterproductive: http://thread.gmane.org/gmane.comp.emulators.libvirt/25050/focus=25052 Run this command: git grep -l VIR_WARN|xargs perl -pi -e \ 's/(VIR_WARN0?)\s*\(_\((".*?")\)/$1($2/'
-
- 10 3月, 2010 1 次提交
-
-
由 Eric Blake 提交于
* global: patch created by running: for f in $(git ls-files '*.[ch]') ; do cppi $f > $f.t && mv $f.t $f done
-
- 05 3月, 2010 1 次提交
-
-
由 Daniel P. Berrange 提交于
When using the 'ns' cgroup controller, the moment a process calls 'unshare(CLONE_NEWNS)', it will be given a private cgroup tree under its current location. This really messages up the LXC controller process, because it ends up creating the containers' cgroup in the wrong place. The fix is fairly easy, just move the cgroup setup before the code which calls unshare(). The 'ns' controller will still create extra undesired cgroups, but they at least won't break libvirt's setup now. The patch also adds a missing cgroups allow rule for /dev/tty device node
-
- 10 2月, 2010 2 次提交
-
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
- 09 2月, 2010 2 次提交
-
-
由 Matthias Bolte 提交于
-
由 Matthias Bolte 提交于
-
- 21 1月, 2010 1 次提交
-
-
由 Laine Stump 提交于
* src/lxc/lxc_container.c src/lxc/lxc_controller.c src/lxc/lxc_driver.c src/network/bridge_driver.c src/qemu/qemu_driver.c src/uml/uml_driver.c: virFileMakePath returns 0 for success, or the value of errno on failure, so error checking should be to test if non-zero, not if lower than 0
-
- 11 11月, 2009 1 次提交
-
-
由 Daniel Veillard 提交于
* src/libvirt.c src/lxc/lxc_conf.c src/lxc/lxc_container.c src/lxc/lxc_controller.c src/node_device/node_device_hal.c src/openvz/openvz_conf.c src/qemu/qemu_driver.c src/qemu/qemu_monitor_text.c src/remote/remote_driver.c src/storage/storage_backend_disk.c src/storage/storage_driver.c src/util/logging.c src/xen/sexpr.c src/xen/xend_internal.c src/xen/xm_internal.c: Steve Grubb <sgrubb@redhat.com> sent a code review and those are the fixes correcting the problems
-
- 05 11月, 2009 2 次提交
-
-
由 Ryota Ozaki 提交于
* src/lxc/lxc_container.c src/lxc/lxc_controller.c src/lxc/lxc_driver.c src/lxc/veth.c: most of cleanups are just capitalizing their messages though, some fixes wrong error messages and awkward indentations, and improves error messages.
-
由 Ryota Ozaki 提交于
* src/lxc/lxc_container.c src/lxc/lxc_controller.c src/lxc/lxc_driver.c src/lxc/veth.c: fix broken function comments
-
- 08 10月, 2009 1 次提交
-
-
由 Amy Griffis 提交于
* src/lxc/lxc_driver.c src/lxc/lxc_controller.c: before launching the lxc controller, have the lxc driver query the log settings and setup envp[]. This provides the advantage of honoring the actual log configuration instead of only what had been set in the environment. The lxc controller now simply has to call virLogSetFromEnv().
-
- 23 9月, 2009 1 次提交
-
-
由 Chris Lalancette 提交于
Add the virStrncpy function, which takes a dst string, source string, the number of bytes to copy and the number of bytes available in the dest string. If the source string is too large to fit into the destination string, including the \0 byte, then no data is copied and the function returns NULL. Otherwise, this function copies n bytes from source into dst, including the \0, and returns a pointer to the dst string. This function is intended to replace all unsafe uses of strncpy in the code base, since strncpy does *not* guarantee that the buffer terminates with a \0. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 21 9月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
* src/lxc_conf.c, src/lxc_conf.h, src/lxc_container.c, src/lxc_container.h, src/lxc_controller.c, src/lxc_driver.c, src/lxc_driver.h, src/veth.c, src/veth.h: Move to src/lxc/ * src/opennebula/one_driver.c: Remove bogus veth.h include * src/Makefile.am: Adjust for lxc paths * daemon/qemud.c: Adjust include for lxc
-
- 04 9月, 2009 1 次提交
-
-
由 Jim Meyering 提交于
* src/lxc_controller.c (main): Unlink sockpath only if it's non-NULL.
-
- 05 8月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
* src/lxc_controller.c: Don't throw error in LXC startup if the cgroups driver mount isn't available. Improve error logging for resource setup
-