You need to sign in or sign up before continuing.
- 23 10月, 2012 2 次提交
-
-
由 Ján Tomko 提交于
Rename the 'wait' parameter to 'loop'. This silences the warning: storage/storage_backend.c:1348:34: error: declaration of 'wait' shadows a global declaration [-Werror=shadow] and fixes the build with -Werror. -- Note: loop is pool backwards.
-
由 Cole Robinson 提交于
virStorageVolLookupByPath is an API call that virt-manager uses quite a bit when dealing with storage. This call use BackendStablePath which has several usleep() heuristics that can be tripped up and hang virt-manager for a while. Current example: an empty mpath pool pointing to /dev/mapper makes _any_ calls to virStorageVolLookupByPath take 5 seconds. The sleep heuristics are actually only needed in certain cases when we are waiting for new storage to appear, so let's skip the timeout steps when calling from LookupByPath.
-
- 12 10月, 2012 1 次提交
-
-
由 Martin Kletzander 提交于
We are currently able to work only with non-translated SELinux contexts, but we are using functions that work with translated contexts throughout the code. This patch swaps all SELinux context translation relative calls with their raw sisters to avoid parsing problems. The problems can be experienced with mcstrans for example. The difference is that if you have translations enabled (yum install mcstrans; service mcstrans start), fgetfilecon_raw() will get you something like 'system_u:object_r:virt_image_t:s0', whereas fgetfilecon() will return 'system_u:object_r:virt_image_t:SystemLow' that we cannot parse. I was trying to confirm that the _raw variants were here since the dawn of time, but the only thing I see now is that it was imported together in the upstream repo [1] from svn, so before 2008. Thanks Laurent Bigonville for finding this out. [1] http://oss.tresys.com/git/selinux.git
-
- 25 9月, 2012 1 次提交
-
-
由 Osier Yang 提交于
It might need some time till the LUN's stable path shows up on initiator host, and although the time window is not foreseeable, as a better than nothing fix, this patch adds timeout for the stable path discovery process.
-
- 21 9月, 2012 1 次提交
-
-
由 Eric Blake 提交于
https://www.gnu.org/licenses/gpl-howto.html recommends that the 'If not, see <url>.' phrase be a separate sentence. * tests/securityselinuxhelper.c: Remove doubled line. * tests/securityselinuxtest.c: Likewise. * globally: s/; If/. If/
-
- 10 8月, 2012 1 次提交
-
-
由 Eric Blake 提交于
Otherwise, in locations like virobject.c where PROBE is used, for certain configure options, the compiler warns: util/virobject.c:110:1: error: 'intptr_t' undeclared (first use in this function) As long as we are making this header always available, we can clean up several other files. * src/internal.h (includes): Pull in <stdint.h>. * src/conf/nwfilter_conf.h: Rely on internal.h. * src/storage/storage_backend.c: Likewise. * src/storage/storage_backend.h: Likewise. * src/util/cgroup.c: Likewise. * src/util/sexpr.h: Likewise. * src/util/virhashcode.h: Likewise. * src/util/virnetdevvportprofile.h: Likewise. * src/util/virnetlink.h: Likewise. * src/util/virrandom.h: Likewise. * src/vbox/vbox_driver.c: Likewise. * src/xenapi/xenapi_driver.c: Likewise. * src/xenapi/xenapi_utils.c: Likewise. * src/xenapi/xenapi_utils.h: Likewise. * src/xenxs/xenxs_private.h: Likewise. * tests/storagebackendsheepdogtest.c: Likewise.
-
- 03 8月, 2012 1 次提交
-
-
由 Hendrik Schwartke 提交于
The access, birth, modification and change times are added to storage volumes and corresponding xml representations. This shows up in the XML in this format: <timestamps> <atime>1341933637.027319099</atime> <mtime>1341933637.027319099</mtime> </timestamps> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 23 7月, 2012 1 次提交
-
-
由 Osier Yang 提交于
Per the FSF address could be changed from time to time, and GNU recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html) You should have received a copy of the GNU General Public License along with Foobar. If not, see <http://www.gnu.org/licenses/>. This patch removes the explicit FSF address, and uses above instead (of course, with inserting 'Lesser' before 'General'). Except a bunch of files for security driver, all others are changed automatically, the copyright for securify files are not complete, that's why to do it manually: src/security/security_selinux.h src/security/security_driver.h src/security/security_selinux.c src/security/security_apparmor.h src/security/security_apparmor.c src/security/security_driver.c
-
- 19 7月, 2012 2 次提交
-
-
由 Sebastian Wiedenroth 提交于
This patch brings support to manage sheepdog pools and volumes to libvirt. It uses the "collie" command-line utility that comes with sheepdog for that. A sheepdog pool in libvirt maps to a sheepdog cluster. It needs a host and port to connect to, which in most cases is just going to be the default of localhost on port 7000. A sheepdog volume in libvirt maps to a sheepdog vdi. To create one specify the pool, a name and the capacity. Volumes can also be resized later. In the volume XML the vdi name has to be put into the <target><path>. To use the volume as a disk source for virtual machines specify the vdi name as "name" attribute of the <source>. The host and port information from the pool are specified inside the host tag. <disk type='network'> ... <source protocol="sheepdog" name="vdi_name"> <host name="localhost" port="7000"/> </source> </disk> To work right this patch parses the output of collie, so it relies on the raw output option. There recently was a bug which caused size information to be reported wrong. This is fixed upstream already and will be in the next release. Signed-off-by: NSebastian Wiedenroth <wiedi@frubar.net>
-
由 Daniel P. Berrange 提交于
Update the storage driver to use virReportError instead of the virStorageReportError custom macro Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 12 7月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
To make it easier to dynamically change the command line ARGV, switch all storage code over to use virCommandPtr APIs for running programs Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 22 5月, 2012 1 次提交
-
-
由 Wido den Hollander 提交于
This patch adds support for a new storage backend with RBD support. RBD is the RADOS Block Device and is part of the Ceph distributed storage system. It comes in two flavours: Qemu-RBD and Kernel RBD, this storage backend only supports Qemu-RBD, thus limiting the use of this storage driver to Qemu only. To function this backend relies on librbd and librados being present on the local system. The backend also supports Cephx authentication for safe authentication with the Ceph cluster. For storing credentials it uses the built-in secret mechanism of libvirt. Signed-off-by: NWido den Hollander <wido@widodh.nl>
-
- 08 2月, 2012 1 次提交
-
-
由 Cole Robinson 提交于
Input to the volume cloning code is a source volume and an XML descriptor for the new volume. It is possible for the new volume to have a greater size than source volume, at which point libvirt will just stick 0s on the end of the new image (for raw format anyways). Unfortunately a logic error messed up our tracking of the of the excess amount that needed to be written: end result is that sparse clones were made very much non-sparse, and cloning regular disk images could end up excessively sized (though data unaltered). Drop the 'remain' variable entriely here since it's redundant, and track actual allocation directly against the desired 'total'.
-
- 04 2月, 2012 1 次提交
-
-
由 Laine Stump 提交于
virFileOpenAs previously would only try opening a file as the current user, or as a different user, but wouldn't try both methods in a single call. This made it cumbersome to use as a replacement for open(2). Additionally, it had a lot of historical baggage that led to it being difficult to understand. This patch refactors virFileOpenAs in the following ways: * reorganize the code so that everything dealing with both the parent and child sides of the "fork+setuid+setgid+open" method are in a separate function. This makes the public function easier to understand. * Allow a single call to virFileOpenAs() to first attempt the open as the current user, and if that fails to automatically re-try after doing fork+setuid (if deemed appropriate, i.e. errno indicates it would now be successful, and the file is on a networkFS). This makes it possible (in many, but possibly not all, cases) to drop-in virFileOpenAs() as a replacement for open(2). (NB: currently qemuOpenFile() calls virFileOpenAs() twice, once without forking, then again with forking. That unfortunately can't be changed without at least some discussion of the ramifications, because the requested file permissions are different in each case, which is something that a single call to virFileOpenAs() can't deal with.) * Add a flag so that any fchown() of the file to a different uid:gid is explicitly requested when the function is called, rather than it being implied by the presence of the O_CREAT flag. This just makes for less subtle surprises to consumers. (Commit b1643dc1 added the check for O_CREAT before forcing ownership. This patch just makes that restriction more explicit.) * If either the uid or gid is specified as "-1", virFileOpenAs will interpret this to mean "the current [gu]id". All current consumers of virFileOpenAs should retain their present behavior (after a few minor changes to their setup code and arguments).
-
- 26 1月, 2012 1 次提交
-
-
由 Cole Robinson 提交于
On F16 at least, empty volume groups don't have a directory under /dev. The directory only appears once a logical volume is created. This tickles some behavior in BackendStablePath which ends with libvirt sleeping for 5 seconds while waiting for the directory to appear. This causes all sorts of problems for the virStorageVolLookupByPath API which virtinst uses, even if trying to resolve a path that is independent of the logical pool. In reality we don't even need to do that checking since logical pools always have a stable target path. Short circuit the polling in that case. Fixes bug 782261
-
- 25 11月, 2011 2 次提交
-
-
由 Michal Privoznik 提交于
This partly reverts my previous patch f88de3eb. We need to get file status after open, as given path could have been symlink, so fstat() will operate on different file than lstat().
-
由 Michal Privoznik 提交于
If pool directory contains special files like FIFO or sockets we want to skip those on pool-start or pool-refresh otherwise open() will get an error.
-
- 27 10月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Detected by Coverity. Only possible if qemu-img gives bogus output, but we might as well be robust. * src/storage/storage_backend.c (virStorageBackendQEMUImgBackingFormat): Check for strstr failure.
-
- 01 10月, 2011 1 次提交
-
-
由 Serge E. Hallyn 提交于
If the regexes supported (?:pvs)?, then we could handle this by optionally matching but not returning the initial command name. But it doesn't. So add a new char* argument to virStorageBackendRunProgRegex(). If that argument is NULL then we act as usual. Otherwise, if the string at that argument is found at the start of a returned line, we drop that before running the regex. With this patch, virt-manager shows me lvs with command_names 1 or 0. The definitions of PVS_BASE etc may want to be moved into the configure scripts (though given how PVS is found, IIUC that could only happen if pvs was a link to pvs_real), but in any case no sense dealing with that until we're sure this is an ok way to handle it. Signed-off-by: NSerge Hallyn <serge.hallyn@canonical.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 01 9月, 2011 1 次提交
-
-
由 Osier Yang 提交于
Commit 0376f4a6 intended to fix incorrect use of VIR_ERR_NO_SUPPORT, but replacing it with VIR_ERR_OPERATION_INVALID is not proper either.
-
- 23 8月, 2011 1 次提交
-
-
由 Osier Yang 提交于
-
- 19 8月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
Although we are flushing cache after some critical writes (e.g. volume creation), after some others we do not (e.g. volume cloning). This patch fix this issue. That is for volume cloning, writing header of logical volume, and storage wipe.
-
- 22 7月, 2011 1 次提交
-
-
由 Eric Blake 提交于
In preparation for a future patch adding new virFile APIs. * src/util/files.h, src/util/files.c: Move... * src/util/virfile.h, src/util/virfile.c: ...here, and rename functions to virFile prefix. Macro names are intentionally left alone. * *.c: All '#include "files.h"' uses changed. * src/Makefile.am (UTIL_SOURCES): Reflect rename. * cfg.mk (exclude_file_name_regexp--sc_prohibit_close): Likewise. * src/libvirt_private.syms: Likewise. * docs/hacking.html.in: Likewise. * HACKING: Regenerate.
-
- 13 7月, 2011 1 次提交
-
-
由 Eric Blake 提交于
* src/storage/storage_backend.c (virStorageBackendCreateBlockFrom) (virStorageBackendCreateQemuImg) (virStorageBackendCreateQcowCreate): Reject unknown flags. * src/storage/storage_backend_disk.c (virStorageBackendDiskBuildPool) (virStorageBackendDiskDeleteVol): Likewise. * src/storage/storage_backend_fs.c (virStorageBackendFileSystemNetFindPoolSources) (virStorageBackendFileSystemBuild) (virStorageBackendFileSystemDelete, createFileDir) (virStorageBackendFileSystemVolBuildFrom) (virStorageBackendFileSystemVolDelete): Likewise. * src/storage/storage_backend_iscsi.c (virStorageBackendISCSIFindPoolSources): Likewise. * src/storage/storage_backend_logical.c (virStorageBackendLogicalFindPoolSources) (virStorageBackendLogicalBuildPool) (virStorageBackendLogicalDeletePool) (virStorageBackendLogicalDeleteVol): Likewise. * src/storage/storage_driver.c (storageOpen, storagePoolCreate) (storagePoolDefine, storagePoolRefresh, storagePoolGetXMLDesc) (storageVolumeCreateXML, storageVolumeCreateXMLFrom) (storageVolumeGetXMLDesc): Likewise.
-
- 08 7月, 2011 1 次提交
-
-
由 Eric Blake 提交于
No caller was using the flags argument, and this function is internal only, so we might as well skip it. * src/util/util.h (safezero): Update signature. * src/util/util.c (safezero): Update function. * src/locking/lock_driver_sanlock.c (virLockManagerSanlockSetupLockspace) (virLockManagerSanlockCreateLease): Update all callers. * src/storage/storage_backend.c (createRawFile): Likewise.
-
- 04 7月, 2011 1 次提交
-
-
由 Osier Yang 提交于
virStorageBackendCreateRaw: createRawFile already reported the exact error. Before the fix: error: Failed to create vol vol-create.img error: cannot create path '/var/lib/libvirt/images/vol-create.img': Unknown error 18446744073709551597 After the fix: error: Failed to create vol vol-create.img error: cannot fill file '/var/lib/libvirt/images/vol-create.img': No space left on device
-
- 17 6月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
Most of the safezero() implementations return -1 on error, setting errno. The safezero() impl using posix_fallocate() though returned a positive errno value on error (due to the unusual API contract of posix_fallocate() compared to most syscall APIs). * src/util/util.c: Ensure safezero() returns -1 and sets errno on error. * src/storage/storage_backend.c: Change safezero != 0 to < 0 for detecting errors
-
- 14 6月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Suggested here: https://www.redhat.com/archives/libvir-list/2011-May/msg00594.html * src/storage/storage_backend.c (virStorageBackendCreateQemuImg): Generate size inline.
-
- 01 6月, 2011 1 次提交
-
-
由 Cole Robinson 提交于
Since directories can be used for <filesystem> passthrough, they are basically storage volumes. v2: Skip ., .., lost+found dirs v3: Use gnulib last_component v4: Use gnulib "dirname.h", not system <dirname.h> Don't skip lost+found
-
- 24 5月, 2011 2 次提交
-
-
由 Jiri Denemark 提交于
Two additional places need initgroups call to properly work in an environment where the UID is allowed to open/create stuff through its supplementary groups.
-
由 Michal Privoznik 提交于
Commit d7b26792 introduced a return value picking of qemu-img on '-h', but without any comment.
-
- 23 5月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
qemu-img returns non-zero status on -h. Therefore we need to provide virCommandRun() a non-NULL exit status pointer.
-
- 17 5月, 2011 3 次提交
-
-
由 Cole Robinson 提交于
virRunWithHook is now unused, so we can drop it. Tested w/ raw + qcow2 volume creation and copying. v2: Use opaque data to skip hook second time around Simply command building v3: Drop explicit FindFileInPath
-
由 Cole Robinson 提交于
Some clients overwrite the error from the regex helper, or do half-baked error reporting with the exitstatus.
-
由 Cole Robinson 提交于
v2: Simplify command creation Add a missing virCommandFree Use virCommand auto-cleanup for async process
-
- 14 5月, 2011 1 次提交
-
-
由 Cole Robinson 提交于
-
- 12 4月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Jim Meyering recently improved gnulib to catch various grammar errors during 'make syntax-check'. * .gnulib: Update to latest, for syntax-check improvements. * include/libvirt/libvirt.h.in (virConnectAuthCallbackPtr): Use cannot rather than two words. * src/driver.c: Likewise. * src/driver.h (VIR_SECRET_GET_VALUE_INTERNAL_CALL): Likewise. * src/remote/remote_driver.c (initialize_gnutls): Likewise. * src/util/pci.c (pciBindDeviceToStub): Likewise. * src/storage/storage_backend.c (virStorageBackendCreateQemuImg): Likewise. (virStorageBackendUpdateVolTargetInfoFD): Avoid doubled word. * docs/formatdomain.html.in: Likewise. * src/qemu/qemu_process.c (qemuProcessStart): Likewise. * cfg.mk (exclude_file_name_regexp--sc_prohibit_can_not) (exclude_file_name_regexp--sc_prohibit_doubled_word): Exclude existing translation problems.
-
- 05 4月, 2011 1 次提交
-
-
由 Jesse Cook 提交于
This patch enables the relative backing file path support provided by qemu-img create. If a relative path is specified for the backing file, it is converted to an absolute path using the storage pool path. The absolute path is used to verify that the backing file exists. If the backing file exists, the relative path is allowed and will be provided to qemu-img create.
-
- 29 3月, 2011 2 次提交
-
-
由 Eric Blake 提交于
* src/storage/storage_backend.c (createRawFileOpHook): Change signature. (struct createRawFileOpHookData): Delete unused struct. (virStorageBackendCreateRaw): Adjust caller. * src/qemu/qemu_driver.c (struct fileOpHookData): Delete unused struct. (qemudDomainSaveFileOpHook): Rename... (qemuDomainSaveFileOpHook): ...and change signature. (qemudDomainSaveFlag): Adjust caller.
-
由 Eric Blake 提交于
This patch intentionally doesn't change indentation, in order to make it easier to review the real changes. * src/util/util.h (VIR_FILE_OP_RETURN_FD, virFileOperationHook): Delete. (virFileOperation): Rename... (virFileOpenAs): ...and reduce parameters. * src/util/util.c (virFileOperationNoFork, virFileOperation): Rename and simplify. * src/qemu/qemu_driver.c (qemudDomainSaveFlag): Adjust caller. * src/storage/storage_backend.c (virStorageBackendCreateRaw): Likewise. * src/libvirt_private.syms: Reflect rename.
-