- 25 3月, 2014 1 次提交
-
-
由 Ján Tomko 提交于
-
- 18 3月, 2014 1 次提交
-
-
由 Daniel P. Berrange 提交于
Any source file which calls the logging APIs now needs to have a VIR_LOG_INIT("source.name") declaration at the start of the file. This provides a static variable of the virLogSource type. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 14 3月, 2014 1 次提交
-
-
由 Laine Stump 提交于
Again completely mechanical, but a lot of lines.
-
- 12 3月, 2014 2 次提交
- 10 3月, 2014 1 次提交
-
-
由 Michal Privoznik 提交于
This fixes a possible double free. In virNetworkAssignDef() if virBitmapNew() fails, then virNetworkObjFree(network) is called. However, with network->def pointing to actual @def. So if caller frees @def again, ... Moreover, this fixes one possible memory leak too. In virInterfaceAssignDef() if appending to the list of interfaces fails, we ought to call virInterfaceObjFree() instead of bare VIR_FREE(). Although, in order to do that some array size variables needs to be turned into size_t rather than int. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 15 2月, 2014 1 次提交
-
-
由 Peter Krempa 提交于
The internal pools were an idea in one of the first iterations of the gluster series, which we decided not to use. Somehow the patch still got pushed. Remove it as the internal flag isn't needed. This reverts commit 362da820.
-
- 16 1月, 2014 2 次提交
-
-
由 Peter Krempa 提交于
To allow using the storage driver APIs to do operation on generic domain disks we will need to introduce internal storage pools that will give is a base to support this stuff even on files that weren't originally defined as a part of the pool. This patch introduces the 'internal' flag for a storage pool that will prevent it from being listed along with the user defined storage pools.
-
由 Christophe Fergeau 提交于
Currently, during XML parsing, when a call to a FromString() function to get an enum value fails, the error which is reported is either VIR_ERR_CONFIG_UNSUPPORTED, VIR_ERR_INTERNAL_ERROR or VIR_ERR_XML_ERROR. This commit makes such conversion failures consistently return VIR_ERR_CONFIG_UNSUPPORTED.
-
- 19 12月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
Recent addition of the gluster pool type omitted fixing the virsh and virConnectListAllStoragePool filters. A typecast of the converting function in virsh showed that also the sheepdog pool was omitted in the command parser. This patch adds gluster pool filtering support and fixes virsh to properly convert all supported storage pool types. The added typecast should avoid doing such mistakes in the future.
-
- 26 11月, 2013 3 次提交
-
-
由 Eric Blake 提交于
In the 'directory' and 'netfs' storage pools, a user can see both 'file' and 'dir' storage volume types, to know when they can descend into a subdirectory. But in a network-based storage pool, such as the upcoming 'gluster' pool, we use 'network' instead of 'file', and did not have any counterpart for a directory until this patch. Adding a new volume type 'network-dir' is better than reusing 'dir', because it makes it clear that the only way to access 'network' volumes within that container is through the network mounting (leaving 'dir' for something accessible in the local file system). * include/libvirt/libvirt.h.in (virStorageVolType): Expand enum. * docs/formatstorage.html.in: Document it. * docs/schemasa/storagevol.rng (vol): Allow new value. * src/conf/storage_conf.c (virStorageVol): Use new value. * src/qemu/qemu_command.c (qemuBuildVolumeString): Fix client. * src/qemu/qemu_conf.c (qemuTranslateDiskSourcePool): Likewise. * tools/virsh-volume.c (vshVolumeTypeToString): Likewise. * src/storage/storage_backend_fs.c (virStorageBackendFileSystemVolDelete): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
We support gluster volumes in domain XML, so we also ought to support them as a storage pool. Besides, a future patch will want to take advantage of libgfapi to handle the case of a gluster device holding qcow2 rather than raw storage, and for that to work, we need a storage backend that can read gluster storage volume contents. This sets up the framework. Note that the new pool is named 'gluster' to match a <disk type='network'><source protocol='gluster'> image source already supported in a <domain>; it does NOT match the <pool type='netfs'><source><target type='glusterfs'>, since that uses a FUSE mount to a local file name rather than a network name. This and subsequent patches have been tested against glusterfs 3.4.1 (available on Fedora 19); there are likely bugs in older versions that may prevent decent use of gfapi, so this patch enforces the minimum version tested. A future patch may lower the minimum. On the other hand, I hit at least two bugs in 3.4.1 that will be fixed in 3.5/3.4.2, where it might be worth raising the minimum: glfs_readdir is nicer to use than glfs_readdir_r [1], and glfs_fini should only return failure on an actual failure [2]. [1] http://lists.gnu.org/archive/html/gluster-devel/2013-10/msg00085.html [2] http://lists.gnu.org/archive/html/gluster-devel/2013-10/msg00086.html * configure.ac (WITH_STORAGE_GLUSTER): New conditional. * m4/virt-gluster.m4: new file. * libvirt.spec.in (BuildRequires): Support gluster in spec file. * src/conf/storage_conf.h (VIR_STORAGE_POOL_GLUSTER): New pool type. * src/conf/storage_conf.c (poolTypeInfo): Treat similar to sheepdog and rbd. (virStoragePoolDefFormat): Don't output target for gluster. * src/storage/storage_backend_gluster.h: New file. * src/storage/storage_backend_gluster.c: Likewise. * po/POTFILES.in: Add new file. * src/storage/storage_backend.c (backends): Register new type. * src/Makefile.am (STORAGE_DRIVER_GLUSTER_SOURCES): Build new files. * src/storage/storage_backend.h (_virStorageBackend): Documet assumption. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
I got annoyed at having to use both 'virsh vol-list $pool --details' AND 'virsh vol-dumpxml $vol $pool' to learn if I had populated the volume correctly. Since two-thirds of the data present in virStorageVolGetInfo() already appears in virStorageVolGetXMLDesc(), this just adds the remaining piece of information, as: <volume type='...'> ... </volume> * docs/formatstorage.html.in: Document new <volume type=...>. * docs/schemas/storagevol.rng (vol): Add it to RelaxNG. * src/conf/storage_conf.h (virStorageVolTypeToString): Declare. * src/conf/storage_conf.c (virStorageVolTargetDefFormat): Output the metatype. (virStorageVolDefParseXML): Parse it, for unit tests. * tests/storagevolxml2xmlout/vol-*.xml: Update tests to match. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 22 11月, 2013 1 次提交
-
-
由 Eric Blake 提交于
$ touch /var/lib/libvirt/images/'a<b>c' $ virsh pool-refresh default $ virsh vol-dumpxml 'a<b>c' default | head -n2 <volume> <name>a<b>c</name> Oops. That's not valid XML. And when we fix the XML generation, it fails RelaxNG validation. I'm also tired of seeing <key>(null)</key> in the example output for volume xml; while we used NULLSTR() to avoid a NULL deref rather than relying on glibc's printf extension behavior, it's even better if we avoid the issue in the first place. But this requires being careful that we don't invalidate any storage backends that were relying on key being unassigned during virStoragVolCreateXML[From]. I would have split this into two patches (one for escaping, one for avoiding <key>(null)</key>), but since they both end up touching a lot of the same test files, I ended up merging it into one. Note that this patch allows pretty much any volume name that can appear in a directory (excluding . and .. because those are special), but does nothing to change the current (unenforced) RelaxNG claim that pool names will consist only of letters, numbers, _, -, and +. Tightening the C code to match RelaxNG patterns and/or relaxing the grammar to match the C code for pool names is a task for another day (but remember, we DID recently tighten C code for domain names to exclude a leading '.'). * src/conf/storage_conf.c (virStoragePoolSourceFormat) (virStoragePoolDefFormat, virStorageVolTargetDefFormat) (virStorageVolDefFormat): Escape user-controlled strings. (virStorageVolDefParseXML): Parse key, for use in unit tests. * src/storage/storage_driver.c (storageVolCreateXML) (storageVolCreateXMLFrom): Ensure parsed key doesn't confuse volume creation. * docs/schemas/basictypes.rng (volName): Relax definition. * tests/storagepoolxml2xmltest.c (mymain): Test it. * tests/storagevolxml2xmltest.c (mymain): Likewise. * tests/storagepoolxml2xmlin/pool-dir-naming.xml: New file. * tests/storagepoolxml2xmlout/pool-dir-naming.xml: Likewise. * tests/storagevolxml2xmlin/vol-file-naming.xml: Likewise. * tests/storagevolxml2xmlout/vol-file-naming.xml: Likewise. * tests/storagevolxml2xmlout/vol-*.xml: Fix fallout. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 21 11月, 2013 1 次提交
-
-
由 Eric Blake 提交于
Most of our code base uses space after comma but not before; fix the remaining uses before adding a syntax check. * src/conf/capabilities.c: Consistently use commas. * src/conf/domain_conf.c: Likewise. * src/conf/network_conf.c: Likewise. * src/conf/storage_conf.c: Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 26 9月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
The virStoragePoolDefParseSource method would set def->nhosts before allocating def->hosts. If the allocation failed due to OOM, the cleanup code would crash accessing out of bounds. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 16 7月, 2013 6 次提交
-
-
由 Martin Kletzander 提交于
When using logical pools, we had to trust the target->path provided. This parameter, however, can be completely ommited and we can use '/dev/<source.name>' safely and populate it to target.path. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=952973
-
由 John Ferlan 提交于
Merge virStoragePoolDefParseAuthChap and virStoragePoolDefParseAuthCephx into a common virStoragePoolDefParseAuthSecret. Change the output to be common for both by putting 'type' first followed by 'username'.
-
由 John Ferlan 提交于
Move the auth->username processing into virStoragePoolDefParseAuth save the resulting username into chap/cephx specific data
-
由 John Ferlan 提交于
The existing 'chap' XML logic was never used - just defined. Rather than try to insert a square peg into a round hole, blow it up and rewrite the logic to follow the 'ceph' format. Remove the former "chap.login" and "chap.passwd" fields and replace with "chap.username" and "chap.secret" in _virStoragePoolAuthChap. Adjust the virStoragePoolDefParseAuthChap() to process. Change the rng file to describe the new layout Update the formatstorage.html to describe the usage of the secret element to mention that the secret type "iscsi" and "ceph" can be used to storage pool too. Update the formatsecret.html to include a reference to the storage pool Update tests to handle the changes from 'login' and 'passwd' to 'username' and '<secret>' format
-
由 John Ferlan 提交于
Split processing of "<auth" into its own function
-
由 John Ferlan 提交于
Generate and use the virStoragePoolAuthTypeType{To|From}String helpers
-
- 11 7月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Convert the type of loop iterators named 'i', 'j', k', 'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or 'unsigned int', also santizing 'ii', 'jj', 'kk' to use the normal 'i', 'j', 'k' naming Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 10 7月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 03 7月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Ensure that all APIs which list storage objects filter them against the access control system. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 21 6月, 2013 1 次提交
-
-
由 Ján Tomko 提交于
Add <features> and <compat> elements to volume target XML. <compat> is a string which for qcow2 represents the QEMU version it should be compatible with. Valid values are 0.10 and 1.1. 1.1 is implicit if the <features> element is present, otherwise qemu-img default is used. 0.10 can be specified to explicitly create older images after the qemu-img default changes. <features> contains optional features, so far <lazy_refcounts/> is available, which enables caching of reference counters, improving performance for snapshots.
-
- 06 6月, 2013 1 次提交
-
-
由 Ján Tomko 提交于
-
- 31 5月, 2013 1 次提交
-
-
由 John Ferlan 提交于
Commit '6afdfc8e' adjusted the exit and error paths to go through the error and cleanup labels, but neglected to remove the return ret prior to cleanup. Also noted the 'type' xml string fetch was never checked for NULL which could lead to some interesting results.
-
- 29 5月, 2013 5 次提交
-
-
由 Osier Yang 提交于
And error out if the casted value is not same with the original one, which prevents the bug on platform(s) where uid_t/gid_t has different size with long.
-
由 Osier Yang 提交于
virStoragePoolDefParseSource: * Better error message virStoragePoolObjLoad: * Break the line line
-
由 Osier Yang 提交于
-
由 Osier Yang 提交于
Changes: * Add a new goto label "error" * Free the strings at "cleanup" * Remove the unnecessary frees
-
由 Osier Yang 提交于
Changes: * Free all the strings at "cleanup", instead of freeing them in the middle * Remove xmlFree * s/tmppath/target_path/, to make it more sensible * Add new goto label "error"
-
- 24 5月, 2013 6 次提交
-
-
由 Osier Yang 提交于
s/VIR_ERR_INTERNAL_ERROR/VIR_ERR_XML_ERROR/.
-
由 Osier Yang 提交于
Trivial, but it allows the "error message" to have more spaces.
-
由 Osier Yang 提交于
And improve the error message
-
由 Osier Yang 提交于
-
由 Osier Yang 提交于
Any string returned from virXPathString should be freed.
-
由 Osier Yang 提交于
It's for parsing "login" attribute of "auth".
-
- 23 5月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
-