- 18 7月, 2013 18 次提交
-
-
由 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.
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
Moreover, since virAsprintf now does report OOM error, there's no need to call virReportOOMError in error path.
-
由 Ján Tomko 提交于
When virAsprintf was changed from a function to a macro reporting OOM error in dc6f2dad, it was documented as returning 0 on success. This is incorrect, it returns the number of bytes written as asprintf does. Some of the functions were converted to use virAsprintf's return value directly, changing the return value on success from 0 to >= 0. For most of these, this is not a problem, but the change in virPCIDriverDir breaks PCI passthrough. The return value check in virhashtest pre-dates virAsprintf OOM conversion. vmwareMakePath seems to be unused.
-
由 Daniel P. Berrange 提交于
Merge the virCommandPreserveFD / virCommandTransferFD methods into a single virCommandPasFD method, and use a new VIR_COMMAND_PASS_FD_CLOSE_PARENT to indicate their difference in behaviour Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Wire up the new virDomainCreate{XML}WithFiles methods in the LXC driver, so that FDs get passed down to the init process. The lxc_container code needs to do a little dance in order to renumber the file descriptors it receives into linear order, starting from STDERR_FILENO + 1. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
In the following commit: commit 03d813bb Author: Marek Marczykowski <marmarek@invisiblethingslab.com> Date: Thu May 23 02:01:30 2013 +0200 remote: fix dom->id after virDomainCreateWithFlags The virDomainCreateWithFlags remote client helper was made to invoke REMOTE_PROC_DOMAIN_LOOKUP_BY_UUID to refresh the 'id' of the domain, following the pattern used in the previous virDomainCreate method impl. The remote protocol for virDomainCreateWithFlags though did actually fix the design flaw in virDomainCreate, by directly returning the new domain info. For some reason, this data was never used. So we can just use that data now instead. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Since they make use of file descriptor passing, the remote protocol methods for virDomainCreate{XML}WithFiles must be written by hand. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
With container based virt, it is useful to be able to pass pre-opened file descriptors to the container init process. This allows for containers to be auto-activated from incoming socket connections, passing the active socket into the container. To do this, introduce a pair of new APIs, virDomainCreateXMLWithFiles and virDomainCreateWithFiles, which accept an array of file descriptors. For the LXC driver, UNIX file descriptor passing will be used to send them to libvirtd, which will them pass them down to libvirt_lxc, which will then pass them to the container init process. This will only be implemented for LXC right now, but the design is generic enough it could work with other hypervisors, hence I suggest adding this to libvirt.so, rather than libvirt-lxc.so Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Geoff Hickey 提交于
Add support for creating disk-only (no memory) snapshots in esx, and for quiescing the VM before taking the snapshot. The VMware API supports these operations directly, so adding support to libvirt is just a matter of setting the flags correctly when calling VMware. VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY and VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE are now valid flags for esx. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Dario Faggioli 提交于
Although, having it depending on Xen >= 4.3 (by using the proper libxl feature flag). Xen currently implements a NUMA placement policy which is basically the same as the 'interleaved' policy of `numactl', although it can be applied on a subset of the available nodes. We therefore hardcode "interleave" as 'numa_mode', and we use the newly introduced libxl interface to figure out what nodes a domain spans ('numa_nodeset'). With this change, it is now possible to query the NUMA node affinity of a running domain: [raistlin@Zhaman ~]$ sudo virsh --connect xen:/// list Id Name State ---------------------------------------------------- 23 F18_x64 running [raistlin@Zhaman ~]$ sudo virsh --connect xen:/// numatune 23 numa_mode : interleave numa_nodeset : 1 Signed-off-by: NDario Faggioli <dario.faggioli@citrix.com>
-
由 Dario Faggioli 提交于
domainGetNumaParameters has a string typed parameter, hence it is necessary for the libxl driver to support this. This change implements the connectSupportsFeature hook for the libxl driver, advertising that VIR_DRV_FEATURE_TYPED_PARAM_STRING is supported. Signed-off-by: NDario Faggioli <dario.faggioli@citrix.com> Cc: Eric Blake <eblake@redhat.com>
-
由 Stefan Bader 提交于
Xen 4.3 changes sysctl version to 10 and domctl version to 9. Update the hypervisor driver to work with those. Signed-off-by: NStefan Bader <stefan.bader@canonical.com>
-
- 17 7月, 2013 12 次提交
-
-
由 Michal Privoznik 提交于
Commit 75c12564 states that virGetGroupList must not be called between fork and exec, then commit ee777e99 promptly violated that for lxc. Patch originally posted by Eric Blake <eblake@redhat.com>.
-
由 Ján Tomko 提交于
Reuse the buffer for getline and track buffer allocation separately from the string length to prevent unlikely out-of-bounds memory access. This fixes the following leak that happened when zero bytes were read: ==404== 120 bytes in 1 blocks are definitely lost in loss record 1,344 of 1,671 ==404== at 0x4C2C71B: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==404== by 0x906F862: getdelim (iogetdelim.c:68) ==404== by 0x52A48FB: virCgroupPartitionNeedsEscaping (vircgroup.c:1136) ==404== by 0x52A0FB4: virCgroupPartitionEscape (vircgroup.c:1171) ==404== by 0x52A0EA4: virCgroupNewDomainPartition (vircgroup.c:1450)
-
由 Michal Privoznik 提交于
In all qemu APIs we tend to prefer qemuDomObjFromDomain over virDomainObjListFindByUUID. But somehow the qemuDomainGetSchedulerType left unattended.
-
由 Michal Privoznik 提交于
While generating seclabels, we check the seclabel stack if required driver is in the stack. If not, an error is returned. However, it is possible for a seclabel to not have any model set (happens with LXC domains that have just <seclabel type='none'>). If that's the case, we should just skip the iteration instead of calling STREQ(NULL, ...) and SIGSEGV-ing subsequently.
-
由 Michal Privoznik 提交于
Currently, if the primary security driver is 'none', we skip initializing caps->host.secModels. This means, later, when LXC domain XML is parsed and <seclabel type='none'/> is found (see virSecurityLabelDefsParseXML), the model name is not copied to the seclabel. This leads to subsequent crash in virSecurityManagerGenLabel where we call STREQ() over the model (note, that we are expecting model to be !NULL).
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
-
由 Guido Günther 提交于
If we don't autostart a network it's not being created. Debian Bug http://bugs.debian.org/715200
-
由 Eric Blake 提交于
Introduced in commit 24b08219; compilation on RHEL 6.4 complained: qemu/qemu_hotplug.c: In function 'qemuDomainAttachChrDevice': qemu/qemu_hotplug.c:1257: error: declaration of 'remove' shadows a global declaration [-Wshadow] /usr/include/stdio.h:177: error: shadowed declaration is here [-Wshadow] * src/qemu/qemu_hotplug.c (qemuDomainAttachChrDevice): Avoid the name 'remove'. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 16 7月, 2013 10 次提交
-
-
由 Gao feng 提交于
The owner of this host devices should be the root user of container. Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
由 Gao feng 提交于
These host devices are created for container, the owner should be the root user of container. Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
由 Gao feng 提交于
Otherwise the container will fail to start if we enable user namespace, since there is no rights to do mknod in uninit user namespace. Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
由 Gao feng 提交于
The owner of this disk device should be the root user of container. Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
由 Gao feng 提交于
lxc driver will use this function to change the owner of hot added devices. Move virLXCControllerChown to lxc_container.c and Rename it to lxcContainerChown. Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
由 Gao feng 提交于
These disk devices are created for container, the owner should be the root user of container. Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
由 Gao feng 提交于
Since mknod in container is forbidden, we should setup disks on host side. Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
由 Peter Krempa 提交于
A part of the returned monitor response was freed twice and caused crashes of the daemon when using guest agent cpu count retrieval. # virsh vcpucount dom --guest Introduced in v1.0.6-48-gc6afcb05
-
由 Wido den Hollander 提交于
Not all RBD (Ceph) storage pools have cephx authentication turned on, so "secret" might not be initialized. It could also be that the secret couldn't be located. Only call virSecretFree() if "secret" is initialized earlier. Signed-off-by: NWido den Hollander <wido@widodh.nl>
-
由 John Ferlan 提交于
Implement the new API that will handle setting the balloon driver statistics collection period in order to enable or disable the collection dynamically.
-