- 03 2月, 2016 20 次提交
-
-
由 Erik Skultety 提交于
Since the method is static to remote_driver, it can't even be used by our daemon. Other than that, it would be useful to be able to use it with admin as well. This patch uses the new virTypedParameterRemote datatype introduced in one of previous patches.
-
由 Erik Skultety 提交于
Currently, the deserializer is hardcoded into remote_driver which makes it impossible for admin to use it. One way to achieve a shared implementation (besides moving the code to another module) would be pass @ret_params_val as a void pointer as opposed to the remote_typed_param pointer and add a new extra argument specifying which of those two protocols is being used and typecast the pointer at the function entry. An example from remote_protocol: struct remote_typed_param_value { int type; union { int i; u_int ui; int64_t l; uint64_t ul; double d; int b; remote_nonnull_string s; } remote_typed_param_value_u; }; typedef struct remote_typed_param_value remote_typed_param_value; struct remote_typed_param { remote_nonnull_string field; remote_typed_param_value value; }; That would leave us with a bunch of if-then-elses that needed to be used across the method. This patch takes the other approach using the new datatype introduced in one of earlier commits.
-
由 Erik Skultety 提交于
Both admin and remote protocols define their own types (remote_typed_param vs admin_typed_param). Because of the naming convention, admin typed params wouldn't be able to reuse the serialization/deserialization methods, which are tailored for use by remote protocol, even if those method were exported properly. In that case, introduce a new internal data type structurally copying both admin and remote protocols which, eventually, would allow serializer and deserializer to be used in a more generic way.
-
由 Nikolay Shirokovskiy 提交于
A pretty nasty deadlock occurs while trying to rename a VM in parallel with virDomainObjListNumOfDomains. The short description of the problem is as follows: Thread #1: qemuDomainRename: ------> aquires domain lock by qemuDomObjFromDomain ---------> waits for domain list lock in any of the listed functions: - virDomainObjListFindByName - virDomainObjListRenameAddNew - virDomainObjListRenameRemove Thread #2: virDomainObjListNumOfDomains: ------> aquires domain list lock ---------> waits for domain lock in virDomainObjListCount Introduce generic virDomainObjListRename function for renaming domains. It aquires list lock in right order to avoid deadlock. Callback is used to make driver specific domain updates. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
This reverts commit 0e0149ce. That commit was added to comply with systemd rules that were changed in the meantime, so this patch is pointless.
-
由 Ján Tomko 提交于
Do not store the return value of virDomainParseScaledValue, it was overwritten anyway. Delete the cleanup label, there is nothing to clean up.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
Free the old vcpupids array in case when this function is called again during the run of the VM. It will be later reused in the vCPU hotplug code. The function now returns the number of detected VCPUs.
-
由 Peter Krempa 提交于
Future patches will tweak and reuse the function in different places so move it separately first.
-
由 Peter Krempa 提交于
Avoid using virDomainDefSetVcpus when we can set it directly in the structure.
-
由 Peter Krempa 提交于
In some cases it may be better to have a bitmap representing state of individual vcpus rather than iterating the definition. The new helper creates a bitmap representing the state from the domain definition.
-
由 Peter Krempa 提交于
Use 'ret' for return variable name, clarify use of 'param_idx' and avoid unnecessary 'success' label. No functional changes. Also document the function.
-
由 Martin Kletzander 提交于
Since commit 71408079 we are generating socket path later than before -- when starting a domain. That makes one particular inconsistent state of a chardev, which was not possible before, currently valid. However, SELinux security driver forgot to guard the main restoring function by a check for NULL-paths. So make it no-op for NULL paths, as in the DAC driver. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1300532Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Erik Skultety 提交于
There might be cases, like with typed params, where triggering this check isn't desirable. But including the whole module in the exception regex is not always to right way of doing things. By adding an option to manually disable this check on a specific occurrence, the module itself will still be checked against the rule.
-
由 Dmitry Andreev 提交于
In case of guest panicked, preserved crashed domain has stopped CPUs. It's not possible to use tools like WinDbg for the problem investigation until we start CPUs back.
-
由 Nikolay Shirokovskiy 提交于
Error paths after sending the event that domain is started written as if ret = -1 which is set at the beginning of the function. It's common idioma to keep 'ret' equal to -1 until the end of function where it is set to 0. But here we use ret to keep result of restore operation too and thus breaks the idioma and its users :) Let's use different variable to hold restore result. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
由 John Ferlan 提交于
Rather than a loop reallocating space to build the regex, just allocate it once up front, then if there's more than 1 nextent, append a comma and another regex_unit string. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
The 'stripes' value is described as the "Number of stripes or mirrors in a logical volume". So add "mirror" and anything that starts with "raid" to the list of segtypes that can have an 'nextents' value greater than one. Use of raid segtypes (raid1, raid4, raid5*, raid6*, and raid10) is favored over mirror in more recent lvm code. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Rather than preallocating a set number of elements, then walking through the extents and adjusting the specific element in place, use the APPEND macros to handle that chore. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 02 2月, 2016 6 次提交
-
-
由 Michal Privoznik 提交于
In my previous commit a70f3b1c I've tried to fix case when building from VPATH and a file wasn't being installed. However, my fix broke non-VPATH build. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Eric Blake 提交于
Ever since commit ace4aecd, running 'make check' on RHEL 6 produces: ./test-lib.sh: line 21: realpath: command not found for every shell script test, because 'realpath' was not part of coreutils back then. * tests/test-lib.sh (_scriptdir): Compute with only portable shell. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Michael Chapman 提交于
After a block job hits 100%, we only need to apply a timeout waiting for a block job event if exactly one of the BLOCK_JOB or BLOCK_JOB_2 callbacks were able to be registered. If neither callback could be registered, there's clearly no need for a timeout. If both callbacks were registered, then we're guaranteed to eventually get one of the events. The path being used by virsh must be exactly the source path or target device in the domain's disk definition, and these are the respective strings sent back in these two events. Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
-
由 Michael Chapman 提交于
If virTimeMillisNow() fails, the SIGINT action must be reset back to its previous state. Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
-
由 Michael Chapman 提交于
When waiting for a block job, the various statuses (COMPLETED, READY, CANCELED, etc.) should all be treated consistently by having the loop be exited with "break". Use "goto cleanup" for the error cases only, when no block job status is available. Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
-
由 Michael Chapman 提交于
There is no need to call virshPrintJobProgress() unless the block job's cur or end cursors have changed since the last iteration. Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
-
- 01 2月, 2016 3 次提交
-
-
由 Cole Robinson 提交于
-
由 Michal Privoznik 提交于
Some lines in this file are misaligned which fires up my OCD. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Boris Fiuczynski 提交于
Having on_crash set to either coredump-destroy or coredump-restart creates core dumps with option memory-only in the directory specified by auto_dump_path. When a watchdog is triggered with the action dump the core dump is also placed into the directory specified by auto_dump_path but is created without the option memory-only. This patch sets the option memory-only also for core dumps created by the watchdog event. Signed-off-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Reviewed-by: NBjoern Walk <bwalk@linux.vnet.ibm.com> Reviewed-by: NStefan Zimmermann <stzi@linux.vnet.ibm.com>
-
- 30 1月, 2016 6 次提交
-
-
由 Michal Privoznik 提交于
The libvirt-common.h is build time generated file from .in. Obviously, it's generated into builddir and not srcdir. Problem is, the list of header files to install, virinc_HEADERS contains only $(srcdir)/*.h and this misses libvirt-common.h. This problem is pretty obvious when doing a VPATH build. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
Create a helper routine in order to parse any extents information including the extent size, length, and the device string contained within the generated 'lvs' output string. A future patch would then be able to avoid the code more cleanly Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Wido den Hollander 提交于
By opening a RBD volume in Read-Only we do not register a watcher on the header object inside the Ceph cluster. Refreshing a volume only calls rbd_stat() which is a operation which does not write to a RBD image. This allows us to use a cephx user which has no write permissions if we would want to use the libvirt storage pool for informational purposes only. It also saves us a write into the Ceph cluster which should speed up refreshing a RBD pool. rbd_open_read_only() is available in all librbd versions which also support rbd_open(). Signed-off-by: NWido den Hollander <wido@widodh.nl>
-
由 Wido den Hollander 提交于
RBD supports cloning by creating a snapshot, protecting it and create a child image based on that snapshot afterwards. The RBD storage driver will try to find a snapshot with zero deltas between the current state of the original volume and the snapshot. If such a snapshot is found a clone/child image will be created using the rbd_clone2() function from librbd. rbd_clone2() is available in librbd since Ceph version Dumpling (0.67) which dates back to August 2013. It will use the same features, strip size and stripe count as the parent image. This implementation will only create a single snapshot on the parent image if never changes. This reduces the amount of snapshots created for that RBD image which benefits the performance of the Ceph cluster. During build the decision will be made to use either rbd_diff_iterate() or rbd_diff_iterate2(). The latter is faster, but only available on Ceph versions after 0.94 (Hammer). Cloning is only supported if RBD format 2 is used. All images created by libvirt are already format 2. If a RBD format 1 image is used as the original volume the backend will report a VIR_ERR_OPERATION_UNSUPPORTED error. Signed-off-by: NWido den Hollander <wido@widodh.nl>
-
由 Wido den Hollander 提交于
Using VIR_STORAGE_VOL_WIPE_ALG_TRIM a RBD volume can be trimmed down to 0 bytes using rbd_discard() Effectively all the data on the volume will be lost/gone, but the volume remains available for use afterwards. Starting at offset 0 the storage pool will call rbd_discard() in stripe size * count increments which is usually 4MB. Stripe size being 4MB and count 1. rbd_discard() is available since Ceph version Dumpling (0.67) which dates back to August 2013. Signed-off-by: NWido den Hollander <wido@widodh.nl>
-
由 Wido den Hollander 提交于
This new algorithm adds support for wiping volumes using TRIM. It does not overwrite all the data in a volume, but it tells the backing storage pool/driver that all bytes in a volume can be discarded. It depends on the backing storage pool how this is handled. A SCSI backend might send UNMAP commands to remove all data present on a LUN. A Ceph backend might use rbd_discard() to instruct the Ceph cluster that all data on that RBD volume can be discarded. Signed-off-by: NWido den Hollander <wido@widodh.nl>
-
- 29 1月, 2016 5 次提交
-
-
由 Wido den Hollander 提交于
When wiping the RBD image will be filled with zeros started at offset 0 and until the end of the volume. This will result in the RBD volume growing to it's full allocation on the Ceph cluster. All data on the volume will be overwritten however, making it unavailable. It does NOT take any RBD snapshots into account. The original data might still be in a snapshot of that RBD volume. Signed-off-by: NWido den Hollander <wido@widodh.nl>
-
由 Wido den Hollander 提交于
Use the cast of (virStorageVolWipeAlgorithm) adding the missing case:'s (VIR_STORAGE_VOL_WIPE_ALG_ZERO and VIR_STORAGE_VOL_WIPE_ALG_LAST). Additionally, the old code would also still run the SCRUB command on default since it didn't go to cleanup when a invalid flag was supplied. We now go to cleanup and exit if a invalid flag would be provided. Signed-off-by: NWido den Hollander <wido@widodh.nl>
-
由 John Ferlan 提交于
When commit id '82c1740a' made changes to the output format (changing from using a ',' separator to '#'), the examples in the lvs output from the comments weren't changed. Additionally, the two new fields added ('segtype' and 'stripes') were not included in the output, leaving it well confusing. This patch fixes the sample output, adds a 'striped' example, and makes other comment related adjustments for long line and spacing between followup 'NB' remarks (while I'm there). Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Andrea Bolognani 提交于
The affected functions are: virPCIDeviceGetManaged() virPCIDeviceGetUnbindFromStub() virPCIDeviceGetRemoveSlot() virPCIDeviceGetReprobe() Change their return type from unsigned int to bool: the corresponding members in struct _virPCIDevice are defined as bool, and even the corresponding virPCIDeviceSet*() functions take a bool value as input so there's no point in these functions having unsigned int as return type. Suggested-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
In our generator for some code we put empty lines in the output to separate blocks of code. However, in some cases we put couple of spaces on the empty line too. It's not bug, it just isn't nice. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-