- 17 4月, 2011 1 次提交
-
-
由 Richard Laager 提交于
-
- 09 3月, 2011 1 次提交
-
-
由 Cole Robinson 提交于
virRun gives pretty useful error output, let's not overwrite it unless there is a good reason. Some places were providing more information about what the commands were _attempting_ to do, however that's usually less useful from a debugging POV than what actually happened.
-
- 29 1月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
Use it in all places where a memory or storage request size is converted to a larger granularity. This avoids requesting too small memory or storage sizes that could result from the truncation done by a simple division. This extends the round up fix in 6002e040 to the whole codebase. Instead of reporting errors for odd values in the VMX code round them up. Update the QEMU Argv tests accordingly as the original memory size 219200 isn't a even multiple of 1024 and is rounded up to 215 megabyte now. Change it to 219100 and 219136. Use two different values intentionally to make sure that rounding up works. Update virsh.pod accordingly, as rounding down and rejecting are replaced by rounding up.
-
- 27 1月, 2011 1 次提交
-
-
由 Osier Yang 提交于
If vol->capacity is odd, the capacity will be rounded down by devision, this patch is to round it up instead of rounding down, to be safer in case of one writes to the volume with the size he used to create. - src/storage/storage_backend_logical.c: make sure size is not rounded down
-
- 23 11月, 2010 1 次提交
-
-
由 Daniel P. Berrange 提交于
When libvirt starts up all storage pools default to the inactive state, even if the underlying storage is already active on the host. This introduces a new API into the internal storage backend drivers that checks whether a storage pool is already active. If the pool is active at libvirtd startup, the volume list will be immediately populated. * src/storage/storage_backend.h: New internal API for checking storage pool state * src/storage/storage_driver.c: Check whether a pool is active upon driver startup * src/storage/storage_backend_fs.c, src/storage/storage_backend_iscsi.c, src/storage/storage_backend_logical.c, src/storage/storage_backend_mpath.c, src/storage/storage_backend_scsi.c: Add checks for pool state
-
- 28 10月, 2010 1 次提交
-
-
由 Stefan Berger 提交于
The 2nd and 3rd hunk show the only double-closed file descriptor code part that I found while trying to clean up close(). The first hunk seems a harmless cleanup in that same file.
-
- 29 5月, 2010 1 次提交
-
-
由 Cole Robinson 提交于
If a directory pool contains pipes or sockets, a pool start can fail or hang: https://bugzilla.redhat.com/show_bug.cgi?id=589577 We already try to avoid these special files, but only attempt after opening the path, which is where the problems lie. Unify volume opening into helper functions, which use the proper open() flags to avoid error, followed by fstat to validate storage mode. Previously, virStorageBackendUpdateVolTargetInfoFD attempted to enforce the storage mode check, but allowed callers to detect this case and silently continue. In practice, only the FS backend was using this feature, the rest were treating unknown mode as an error condition. Unfortunately the InfoFD function wasn't raising an error message here, so error reporting was busted. This patch adds 2 functions: virStorageBackendVolOpen, and virStorageBackendVolOpenModeSkip. The latter retains the original opt out semantics, the former now throws an explicit error. This patch maintains the previous volume mode checks: allowing specific modes for specific pool types requires a bit of surgery, since VolOpen is called through several different helper functions. v2: Use ATTRIBUTE_NONNULL. Drop stat check, just open with O_NONBLOCK|O_NOCTTY. v3: Move mode check logic back to VolOpen. Use 2 VolOpen functions with different error semantics. v4: Make second VolOpen function more extensible. Didn't opt to change FS backend defaults, this can just be to fix the original bug. v5: Prefix default flags with VIR_, use ATTRIBUTE_RETURN_CHECK
-
- 10 2月, 2010 1 次提交
-
-
由 Daniel P. Berrange 提交于
The virConnectPtr is no longer required for error reporting since that is recorded in a thread local. Remove use of virConnectPtr from all APIs in storage_conf.{h,c} and storage_encryption_conf.{h,c} and update all callers to match
-
- 09 2月, 2010 3 次提交
-
-
由 Matthias Bolte 提交于
It was used for error reporting only.
-
由 Matthias Bolte 提交于
-
由 Matthias Bolte 提交于
-
- 21 1月, 2010 1 次提交
-
-
由 Laine Stump 提交于
In order to avoid problems trying to chown files that were created by root on a root-squashing nfs server, fork a new process that setuid's to the desired uid before creating the file. (It's only done this way if the pool containing the new volume is of type 'netfs', otherwise the old method of creating the file followed by chown() is used.) This changes the semantics of the "create_func" slightly - previously it was assumed that this function just created the file, then the caller would chown it to the desired uid. Now, create_func does both operations. There are multiple functions that can take on the role of create_func: createFileDir - previously called mkdir(), now calls virDirCreate(). virStorageBackendCreateRaw - previously called open(), now calls virFileCreate(). virStorageBackendCreateQemuImg - use virRunWithHook() to setuid/gid. virStorageBackendCreateQcowCreate - same. virStorageBackendCreateBlockFrom - preserve old behavior (but attempt chown when necessary even if not root) * src/storage/storage_backend.[ch] src/storage/storage_backend_disk.c src/storage/storage_backend_fs.c src/storage/storage_backend_logical.c src/storage/storage_driver.c: change the create_func implementations, also propagate the pool information to be able to detect NETFS ones.
-
- 03 11月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
Nearly all of the methods in src/util/util.h have error codes that must be checked by the caller to correct detect & report failure. Add ATTRIBUTE_RETURN_CHECK to ensure compile time validation of this * daemon/libvirtd.c: Add explicit check on return value of virAsprintf * src/conf/domain_conf.c: Add missing check on virParseMacAddr return value status & report error * src/network/bridge_driver.c: Add missing OOM check on virAsprintf and report error * src/qemu/qemu_conf.c: Add missing check on virParseMacAddr return value status & report error * src/security/security_selinux.c: Remove call to virRandomInitialize that's done in libvirt.c already * src/storage/storage_backend_logical.c: Add check & log on virRun return status * src/util/util.c: Add missing checks on virAsprintf/Run status * src/util/util.h: Annotate all methods with ATTRIBUTE_RETURN_CHECK if they return an error status code * src/vbox/vbox_tmpl.c: Add missing check on virParseMacAddr * src/xen/xm_internal.c: Add missing checks on virAsprintf * tests/qemuargv2xmltest.c: Remove bogus call to virRandomInitialize()
-
- 28 10月, 2009 1 次提交
-
-
由 Cole Robinson 提交于
Similar in theory to *AssignDef type functions, this duplicate functionality will be used by an future FindPoolSources implementations.
-
- 21 9月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
* daemon/qemud.c, src/Makefile.am: Adapt for changed paths * src/storage*.c, src/storage/*.h, src/parthelpre.c: Move to src/storage/
-
- 10 9月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
Remove the bogus dependancy between node_device.c & storage_backend.c by moving the virWaitForDevices into util.h where it can be shared safely * src/storage_backend_disk.c, src/storage_backend_logical.c, src/storage_backend_mpath.c, src/storage_backend_scsi.c: Replace virStorageBackendWaitForDevices with virFileWaitForDevices * src/storage_backend.c, src/storage_backend.h: Remove virStorageBackendWaitForDevices, virWaitForDevices * src/util.h, src/util.c: Add virFileWaitForDevices * configure.in: Move xmlrpc check further down after pkgconfig is detected * src/Makefile.am: Add missing XMLRPC_CFLAGS/LIBS to opennebula * src/libvirt_private.syms: Add many missing exports
-
- 05 9月, 2009 1 次提交
-
-
由 Jim Meyering 提交于
* src/storage_backend_logical.c (virStorageBackendLogicalBuildPool): Don't increment "n" when we won't use the result.
-
- 02 9月, 2009 1 次提交
-
-
由 Miloslav Trmač 提交于
Supports only virStorageVolCreateXML, not virStorageVolCreateXMLFrom. Curiously, qemu-img does not need the passphrase for anything to create an encrypted volume. This implementation thus does not need to touch any secrets to work with cooperating clients. More generic passphrase handling is added in the next patch. * src/storage_backend.c: Request encryption when creating qcow/qcow2 files * src/storage_backend_disk.c, src/storage_backend_fs.c, src/storage_backend_logical.c: Refuse to create volumes with encryption params set.
-
- 17 7月, 2009 1 次提交
-
-
由 Cole Robinson 提交于
With the previous refactoring, this is a simple process, since the global 'CreateBlockFrom' in storage_backend does all the work.
-
- 19 5月, 2009 1 次提交
-
-
由 Cole Robinson 提交于
-
- 17 2月, 2009 1 次提交
-
-
由 Cole Robinson 提交于
-
- 29 1月, 2009 1 次提交
-
-
由 Jim Meyering 提交于
* src/uml_conf.c (VIR_FROM_THIS): Define to VIR_FROM_UML. * src/xs_internal.c (VIR_FROM_THIS): Define to VIR_FROM_XEN. * src/xml.c (VIR_FROM_THIS): Define to VIR_FROM_XML. * src/stats_linux.c (VIR_FROM_THIS): Define to VIR_FROM_STATS_LINUX. * src/datatypes.c (VIR_FROM_THIS): Define to VIR_FROM_NONE. * src/lxc_conf.c (VIR_FROM_THIS): Define to VIR_FROM_LXC. * src/libvirt.c (VIR_FROM_THIS): Define to VIR_FROM_NONE. * src/node_device_conf.c (VIR_FROM_THIS): Define to VIR_FROM_NODEDEV. * src/openvz_conf.c (VIR_FROM_THIS): Define to VIR_FROM_OPENVZ. * src/openvz_driver.c (VIR_FROM_THIS): Define to VIR_FROM_OPENVZ. * src/conf.c (VIR_FROM_THIS): Define to VIR_FROM_CONF. Note: this loses config_filename:config_lineno diagnostics, but that's ok. * src/node_device.c (VIR_FROM_THIS): Define to VIR_FROM_NODEDEV. * src/sexpr.c (VIR_FROM_THIS): Define to VIR_FROM_SEXPR. * po/POTFILES.in: remove src/sexpr.c and src/lxc_conf.c
-
- 28 1月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 21 1月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 28 11月, 2008 1 次提交
-
-
由 Chris Lalancette 提交于
really should be synchronizing against udev. This is generally done by a call to udevsettle, which is exactly what this patch implements for the storage backends that are likely to create new /dev nodes. I believe I've read that even after udevsettle, you are not guaranteed that devices are all the way created, so we still need the polling in the rest of the sources, but this should give us a much better chance of things existing as we expect. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 17 11月, 2008 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 15 11月, 2008 1 次提交
-
-
由 Cole Robinson 提交于
-
- 05 11月, 2008 3 次提交
-
-
由 Chris Lalancette 提交于
"touched" any logical volumes, so they appear in the subsequent "pvs" call. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
- 23 10月, 2008 2 次提交
-
-
由 Chris Lalancette 提交于
findPoolSources. Given danpb's last feedback, I completely removed the XML parsing and did it all with structures. The result should (hopefully) be a lot easier on the eyes, and is a little more generic. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
由 Chris Lalancette 提交于
cleanup patch, add a ".defaultFormat" member to .poolOptions. In storage_conf.c, if virXPathString(/pool/source/format/@type) returns NULL, then set the pool type to .defaultFormat; otherwise, lookup the type via formatFromString. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 16 10月, 2008 1 次提交
-
-
由 Chris Lalancette 提交于
iSCSI volumes. This is implemented in the virStorageBackendUpdateVolInfoFD function, so all future callers will automatically benefit. This is a somewhat large patch because the conversion of the virStorageBackendPartTableTypeToString necessitated a change to the formatToString and formatFromString function pointers, which caused fallout in other places in the storage stuff. The good news is that most of these callers are now converted over to the VIR_ENUM_IMPL, which means a lot of redundant code is now gone. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 14 10月, 2008 1 次提交
-
-
由 Jim Meyering 提交于
Building with --disable-nls exposed many new warnings like these: virsh.c:4952: warning: format not a string literal and no format ... util.c:163: warning: format not a string literal and no format arguments All but one of the following changes add a "%s" argument before the offending _(...) argument. This was the only manual change: * src/lxc_driver.c (lxcVersion): Use %s and strerror(errno) rather than %m, to avoid a warning from gcc -Wformat-security. Add "%s" before each warned about format-string-with-no-%-directive: * src/domain_conf.c (virDomainHostdevSubsysUsbDefParseXML) (virDomainDefParseString, virDomainDefParseFile): * src/hash.c (virGetConnect, __virGetDomain, virReleaseDomain) (__virGetNetwork, virReleaseNetwork, __virGetStoragePool) (virReleaseStoragePool, __virGetStorageVol, virReleaseStorageVol): * src/lxc_container.c (lxcContainerChild): * src/lxc_driver.c (lxcDomainDefine, lxcDomainUndefine) (lxcDomainGetInfo, lxcGetOSType, lxcDomainDumpXML) (lxcSetupInterfaces, lxcDomainStart, lxcDomainCreateAndStart) (lxcVersion, lxcGetSchedulerParameters): * src/network_conf.c (virNetworkDefParseString) (virNetworkDefParseFile): * src/openvz_conf.c (openvzReadNetworkConf, openvzLoadDomains): * src/openvz_driver.c (openvzDomainDefineCmd) (openvzDomainGetInfo, openvzDomainDumpXML, openvzDomainShutdown) (openvzDomainReboot, ADD_ARG_LIT, openvzDomainDefineXML) (openvzDomainCreateXML, openvzDomainCreate, openvzDomainUndefine) (openvzDomainSetAutostart, openvzDomainGetAutostart) (openvzDomainSetVcpus): * src/qemu_driver.c (qemudDomainBlockPeek, qemudDomainMemoryPeek): * src/remote_internal.c (remoteDomainBlockPeek) (remoteDomainMemoryPeek, remoteAuthPolkit): * src/sexpr.c (sexpr_new, _string2sexpr): * src/storage_backend_disk.c (virStorageBackendDiskMakeDataVol) (virStorageBackendDiskCreateVol): * src/storage_backend_fs.c (virStorageBackendFileSystemNetFindPoolSources): * src/storage_backend_logical.c (virStorageBackendLogicalFindLVs) (virStorageBackendLogicalFindPoolSources): * src/test.c (testOpenDefault, testOpenFromFile, testOpen) (testGetDomainInfo, testDomainRestore) (testNodeGetCellsFreeMemory): * src/util.c (virExec): * src/virsh.c (cmdAttachDevice, cmdDetachDevice) (cmdAttachInterface, cmdDetachInterface, cmdAttachDisk) (cmdDetachDisk, cmdEdit): * src/xend_internal.c (do_connect, wr_sync, xend_op_ext) (urlencode, xenDaemonDomainCreateXML) (xenDaemonDomainLookupByName_ids, xenDaemonDomainLookupByID) (xenDaemonParseSxprOS, xend_parse_sexp_desc_char) (xenDaemonParseSxprChar, xenDaemonParseSxprDisks) (xenDaemonParseSxpr, sexpr_to_xend_topology, sexpr_to_domain) (xenDaemonDomainFetch, xenDaemonDomainGetAutostart) (xenDaemonDomainSetAutostart, xenDaemonDomainMigratePerform) (xenDaemonDomainDefineXML, xenDaemonGetSchedulerType) (xenDaemonGetSchedulerParameters) (xenDaemonSetSchedulerParameters, xenDaemonDomainBlockPeek) (xenDaemonFormatSxprChr, virDomainXMLDevID): * src/xm_internal.c (xenXMConfigCacheRefresh, xenXMDomainPinVcpu) (xenXMDomainCreate, xenXMDomainDefineXML) (xenXMDomainAttachDevice, xenXMDomainDetachDevice): * src/xml.c (virXPathString, virXPathNumber, virXPathLong) (virXPathULong, virXPathBoolean, virXPathNode, virXPathNodeSet): * src/xs_internal.c (xenStoreOpen):
-
- 10 10月, 2008 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 24 9月, 2008 1 次提交
-
-
由 Daniel Veillard 提交于
* src/storage_backend_logical.c: re-add the -f flag to vgremove * po/*: rebuilt Daniel
-
- 23 9月, 2008 1 次提交
-
-
由 Daniel Veillard 提交于
* src/storage_backend_logical.c: enable stop pool in logical backend improve portability when deleting a pool and also call pvremove patch by Chris Lalancette Daniel
-
- 08 9月, 2008 1 次提交
-
-
由 Daniel Veillard 提交于
* src/storage_backend_logical.c: finish applying initialization from Jim Fehlig patch for logical storage backend Daniel
-
- 04 9月, 2008 1 次提交
-
-
由 Daniel Veillard 提交于
* src/storage_backend_logical.c: fix a miscalculation of command line size for vgcreate, patch from Jim Fehlig Daniel
-
- 02 9月, 2008 1 次提交
-
-
由 Daniel Veillard 提交于
* src/storage_backend.h src/storage_backend_logical.c src/storage_conf.c src/storage_conf.h src/virsh.c: Applied patches from David Lively to add storage source elements needed for storage pool * docs/formatstorage.html docs/formatstorage.html.in: associated documentation Daniel
-