- 22 7月, 2013 4 次提交
-
-
由 Jiri Denemark 提交于
-
由 Daniel P. Berrange 提交于
If no explicit driver is set for an image backed filesystem, set it to use the loop driver (if raw) or nbd driver (if non-raw) Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
A couple of places in LXC setup for filesystems did not do a "goto cleanup" after reporting errors. While fixing this, also add in many more debug statements to aid troubleshooting Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Viktor Mihajlovski 提交于
The alias for hostdevs of type SCSI can be too long for QEMU if larger LUNs are encountered. Here's a real life example: <hostdev mode='subsystem' type='scsi' managed='no'> <source> <adapter name='scsi_host0'/> <address bus='0' target='19' unit='1088634913'/> </source> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </hostdev> this results in a too long drive id, resulting in QEMU yelling Property 'scsi-generic.drive' can't find value 'drive-hostdev-scsi_host0-0-19-1088634913' This commit changes the alias back to the default hostdev$(index) scheme. Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
-
- 20 7月, 2013 2 次提交
-
-
由 Jiri Denemark 提交于
In case libvirtd is asked to unplug a device but the device is actually unplugged later when libvirtd is not running, we need to detect that and remove such device when libvirtd starts again and reconnects to running domains.
-
由 Jiri Denemark 提交于
This API provides a NULL-terminated list of devices which are currently attached to a QEMU domain.
-
- 19 7月, 2013 12 次提交
-
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
Make virStringArrayHasString return false when called on a non-existent string array.
-
由 Eric Blake 提交于
Attempts to start a domain with both SELinux and DAC security modules loaded will deadlock; latent problem introduced in commit fdb3bde3 and exposed in commit 29fe5d74. Basically, when recursing into the security manager for other driver's prefork, we have to undo the asymmetric lock taken at the manager level. Reported by Jiri Denemark, with diagnosis help from Dan Berrange. * src/security/security_stack.c (virSecurityStackPreFork): Undo extra lock grabbed during recursion. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Daniel P. Berrange 提交于
The code parsing VIR_TEST_RANGE mistakenly used 'unsigned int i' which violated syntax-check rules Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
When debugging a failing test with many test cases, it is useful to be able to skip most tests. Introducing a new environment variable VIR_TEST_RANGE=N-M enables execution of only the test cases numbered N-M inclusive, starting from 1. For example, to skip all the cgroup tests except 2 $ VIR_TEST_RANGE=2-3 VIR_TEST_DEBUG=1 ./vircgrouptest TEST: vircgrouptest 2) New cgroup for driver ... Unexpected found LXC cgroup: 1 libvirt: Cgroup error : Failed to create controller cpu for group: No such file or directory FAILED 3) New cgroup for domain driver ... Cannot find LXC cgroup: 1 libvirt: Cgroup error : Failed to create controller cpu for group: No such file or directory FAILED Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Eric Blake 提交于
Upstream gnulib recently patched a bug in bootstrap, for projects that use a different name than build-aux for a subdirectory. We don't, but it doesn't hurt to update. * .gnulib: Update, for bootstrap fix. * bootstrap: Sync to upstream. * bootstrap.conf: Match upstream bug fix. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Michal Privoznik 提交于
Currently, in the autogen.sh script we check whether .git is an existing directory in which case bootstrap is run. However, if libvirt is a submodule, then the .git is just a file (with reference to the topmost .git directory). However, our submodule routines work well. So there's no real reason why we should prohibit users to build libvirt from submodule.
-
由 Eric Blake 提交于
Makefiles are another easy file to enforce line limits. Mostly straightforward; interesting tricks worth noting: src/Makefile.am: $(confdir) was already defined, use it in more places tests/Makefile.am: path_add and VG required some interesting compression * cfg.mk (sc_prohibit_long_lines): Add another test. * Makefile.am: Fix offenders. * daemon/Makefile.am: Likewise. * docs/Makefile.am: Likewise. * python/Makefile.am: Likewise. * src/Makefile.am: Likewise. * tests/Makefile.am: Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Commit 75c12564 states that virGetGroupList must not be called between fork and exec, then commit ee777e99 promptly violated that for lxc's use of virSecurityManagerSetProcessLabel. Hoist the supplemental group detection to the time that the security manager needs to fork. Qemu is safe, as it uses virSecurityManagerSetChildProcessLabel which in turn uses virCommand to determine supplemental groups. This does not fix the fact that virSecurityManagerSetProcessLabel calls virSecurityDACParseIds calls parseIds which eventually calls getpwnam_r, which also violates fork/exec async-signal-safe safety rules, but so far no one has complained of hitting deadlock in that case. * src/security/security_dac.c (_virSecurityDACData): Track groups in private data. (virSecurityDACPreFork): New function, to set them. (virSecurityDACClose): Clean up new fields. (virSecurityDACGetIds): Alter signature. (virSecurityDACSetSecurityHostdevLabelHelper) (virSecurityDACSetChardevLabel, virSecurityDACSetProcessLabel) (virSecurityDACSetChildProcessLabel): Update callers. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
A future patch wants the DAC security manager to be able to safely get the supplemental group list for a given uid, but at the time of a fork rather than during initialization so as to pick up on live changes to the system's group database. This patch adds the framework, including the possibility of a pre-fork callback failing. For now, any driver that implements a prefork callback must be robust against the possibility of being part of a security stack where a later element in the chain fails prefork. This means that drivers cannot do any action that requires a call to postfork for proper cleanup (no grabbing a mutex, for example). If this is too prohibitive in the future, we would have to switch to a transactioning sequence, where each driver has (up to) 3 callbacks: PreForkPrepare, PreForkCommit, and PreForkAbort, to either clean up or commit changes made during prepare. * src/security/security_driver.h (virSecurityDriverPreFork): New callback. * src/security/security_manager.h (virSecurityManagerPreFork): Change signature. * src/security/security_manager.c (virSecurityManagerPreFork): Optionally call into driver, and allow returning failure. * src/security/security_stack.c (virSecurityDriverStack): Wrap the handler for the stack driver. * src/qemu/qemu_process.c (qemuProcessStart): Adjust caller. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Guido Günther 提交于
instead of the deprecated AC_TRY_LINK
-
由 Eric Blake 提交于
Long lines are harder to read and harder to diff; in fact, if lines get too long (> 1000 bytes), it starts causing issues where git send-email refuses to send patches for the file. I've cleaned up the tests directory in the past (see commits bd6c46fa, 3b750d13), but new long lines have been introduced in the meantime. Why 90 instead of 80? Because there were too many tests on the fringe edge, and I didn't want to edit that many files. Add a syntax check to prevent future long lines. * cfg.mk (sc_prohibit_long_lines): New rule. * tests/qemuxml2argvdata/qemuxml2argv-*.args: Split lines of any file with content longer than 90 columns. * tests/storagevolxml2argvdata/*.argv: Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 18 7月, 2013 22 次提交
-
-
由 Guido Günther 提交于
Some versions of kFreeBSD (like 9.0) declare link_addr in a header but lack an implementation. This makes ./configure pass but breaks compilation later with a undefined reference to `link_addr' Althought that's a bug in the OS header we can detect it easily by also trying to link. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=715320
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
-
由 Peter Krempa 提交于
-
由 Osier Yang 提交于
When either "cpuset" of <vcpu> is specified, or the "placement" of <vcpu> is "auto", only setting the cpuset.mems might cause the guest starting to fail. E.g. ("placement" of both <vcpu> and <numatune> is "auto"): 1) Related XMLs <vcpu placement='auto'>4</vcpu> <numatune> <memory mode='strict' placement='auto'/> </numatune> 2) Host NUMA topology % numactl --hardware available: 8 nodes (0-7) node 0 cpus: 0 4 8 12 16 20 24 28 node 0 size: 16374 MB node 0 free: 11899 MB node 1 cpus: 32 36 40 44 48 52 56 60 node 1 size: 16384 MB node 1 free: 15318 MB node 2 cpus: 2 6 10 14 18 22 26 30 node 2 size: 16384 MB node 2 free: 15766 MB node 3 cpus: 34 38 42 46 50 54 58 62 node 3 size: 16384 MB node 3 free: 15347 MB node 4 cpus: 3 7 11 15 19 23 27 31 node 4 size: 16384 MB node 4 free: 15041 MB node 5 cpus: 35 39 43 47 51 55 59 63 node 5 size: 16384 MB node 5 free: 15202 MB node 6 cpus: 1 5 9 13 17 21 25 29 node 6 size: 16384 MB node 6 free: 15197 MB node 7 cpus: 33 37 41 45 49 53 57 61 node 7 size: 16368 MB node 7 free: 15669 MB 4) cpuset.cpus will be set as: (from debug log) 2013-05-09 16:50:17.296+0000: 417: debug : virCgroupSetValueStr:331 : Set value '/sys/fs/cgroup/cpuset/libvirt/qemu/toy/cpuset.cpus' to '0-63' 5) The advisory nodeset got from querying numad (from debug log) 2013-05-09 16:50:17.295+0000: 417: debug : qemuProcessStart:3614 : Nodeset returned from numad: 1 6) cpuset.mems will be set as: (from debug log) 2013-05-09 16:50:17.296+0000: 417: debug : virCgroupSetValueStr:331 : Set value '/sys/fs/cgroup/cpuset/libvirt/qemu/toy/cpuset.mems' to '0-7' I.E, the domain process's memory is restricted on the first NUMA node, however, it can use all of the CPUs, which will likely cause the domain process to fail to start because of the kernel fails to allocate memory with the the memory policy as "strict". % tail -n 20 /var/log/libvirt/qemu/toy.log ... 2013-05-09 05:53:32.972+0000: 7318: debug : virCommandHandshakeChild:377 : Handshake with parent is done char device redirected to /dev/pts/2 (label charserial0) kvm_init_vcpu failed: Cannot allocate memory ... Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
These helpers use the remembered host capabilities to retrieve the cpu map rather than query the host again. The intended usage for this helpers is to fix automatic NUMA placement with strict memory alloc. The code doing the prepare needs to pin the emulator process only to cpus belonging to a subset of NUMA nodes of the host.
-
由 Martin Kletzander 提交于
When user does not specify any model for scsi controller, or worse, no controller at all, but libvirt automatically adds scsi controller with no model, we are not searching for virtio-scsi and thus this can fail for example on qemu which doesn't support lsi logic adapter. This means that when qemu on x86 doesn't support lsi53c895a and the user adds the following to an XML without any scsi controller: <disk ...> ... <target dev='sda'> </disk> libvirt fails like this: # virsh define asdf.xml error: Failed to define domain from asdf.xml error: internal error Unable to determine model for scsi controller Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=974943
-
由 Michal Privoznik 提交于
Similarly to qemu driver, we can use a helper function to lookup a domain instead of copying multiple lines around.
-
由 Michal Privoznik 提交于
With the majority of fields in the virLXCDriverPtr struct now immutable or self-locking, there is no need for practically any methods to be using the LXC driver lock. Only a handful of helper APIs now need it.
-
由 Michal Privoznik 提交于
The activeUsbHostdevs item in LXCDriver are lockable, but the lock has to be called explicitly. Call the virObject(Un)Lock() in order to achieve mutual exclusion once lxcDriverLock is removed.
-
由 Michal Privoznik 提交于
The 'driver->caps' pointer can be changed on the fly. Accessing it currently requires the global driver lock. Isolate this access in a single helper, so a future patch can relax the locking constraints.
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
Annotate the fields in virLXCDriverPtr to indicate the locking rules for their use.
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
Currently the virLXCDriverPtr struct contains an wide variety of data with varying access needs. Move all the static config data into a dedicated virLXCDriverConfigPtr object. The only locking requirement is to hold the driver lock, while obtaining an instance of virLXCDriverConfigPtr. Once a reference is held on the config object, it can be used completely lockless since it is immutable. NB, not all APIs correctly hold the driver lock while getting a reference to the config object in this patch. This is safe for now since the config is never updated on the fly. Later patches will address this fully.
-
由 Michal Privoznik 提交于
It is not used anywhere, so it makes no sense to have it there.
-