- 20 2月, 2018 1 次提交
-
-
由 Michal Privoznik 提交于
This function returns nothing but zero. Therefore it makes no sense to have it returning an integer. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 14 2月, 2018 2 次提交
-
-
由 Peter Krempa 提交于
We can't really detect all the authentication data in a sane manner for disk backing chains. Since the old RBD parser parses it in some cases as the argv->XML convertor requires it, we can't just drop it. Instead clear any detected authentication data in the code paths related to disk backing chain lookup and fix the tests to cope with the change. https://bugzilla.redhat.com/show_bug.cgi?id=1544659Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
The documentation for the JSON/qapi type 'UnixSocketAddress' states that the unix socket path field is named 'path'. Unfortunately qemu uses 'socket' in case of the gluster driver (despite documented otherwise). Add logic which will format the correct fields while keeping support of the old spelling. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1544325Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
- 09 2月, 2018 1 次提交
-
-
由 Daniel P. Berrangé 提交于
The QEMU driver loadable module needs to be able to resolve all ELF symbols it references against libvirt.so. Some of its symbols can only be resolved against the storage_driver.so loadable module which creates a hard dependancy between them. By moving the storage file backend framework into the util directory, this gets included directly in the libvirt.so library. The actual backend implementations are still done as loadable modules, so this doesn't re-add deps on gluster libraries. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 31 1月, 2018 1 次提交
-
-
由 Peter Krempa 提交于
While the QEMU QAPI schema describes 'lun' as a number, the code dealing with JSON strings does not strictly adhere to this schema and thus formats the number back as a string. Use the new helper to retrieve both possibilities. Note that the formatting code is okay and qemu will accept it as an int. Tweak also one of the test strings to verify that both formats work with libvirt. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1540290
-
- 14 12月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
This will be the first private piece of data that will need to be stored in the XML for some drivers. Add helpers which will do it.
-
- 24 11月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
Some drive backends allow output of debugging information which can be configured using properties of the image. Add fields to virStorageSource which will allow configuring them.
-
- 08 11月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
Split on the last colon and avoid parsing port if the split remainder contains the closing square bracket, so that IPv6 addresses are interpreted correctly.
-
- 07 11月, 2017 2 次提交
-
-
由 Peter Krempa 提交于
Similarly to how we store gluster names, split the name into a pool and image portions when paring the XML and store them separately.
-
由 Peter Krempa 提交于
Libvirt historically stores storage source path including the volume as one string in the XML, but that is not really flexible enough when dealing with the fields in the code. Previously we'd store the slash separating the two as part of the image name. This was fine for gluster but it's not necessary and does not scale well when converting other protocols. Don't store the slash as part of the path. The resulting change from absolute to relative path within the gluster driver should be okay, as the root directory is the default when accessing gluster.
-
- 20 10月, 2017 2 次提交
-
-
由 John Ferlan 提交于
Since the virStorageAuthDefPtr auth; is a member of _virStorageSource it really should be allowed to be a subelement of the disk <source> for the RBD and iSCSI prototcols. That way we can set up to allow the <auth> element to be formatted within the disk source. Since we've allowed the <auth> to be a child of <disk>, we'll need to keep track of how it was read so that when writing out we'll know whether to format as child of <disk> or <source>. For the argv2xml parsing, let's format under <source> as a preference. Do not allow <auth> to be both a child of <disk> and <source>. Modify the qemuxml2argvtest to add a parse failure when there is an <auth> as a child of <disk> *and* an <auth> as a child of <source>. Add tests to validate that if the <auth> was found in <source>, then the resulting xml2xml and xml2arg works just fine. The two new .args file are exact copies of the non "-source" version of the file. The virschematest will read the new test files and validate from a RNG viewpoint things are fine Update the virstoragefile, virstoragetest, and args2xml file to show the "preference" to place <auth> as a child of <source>.
-
由 John Ferlan 提交于
Introduce the bare necessities to add privateData to _virStorageSource. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
- 18 10月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
When formatting an inactive or migratable XML we will need to suppress backing chain members which were detected from the disk to keep semantics straight. This means we need to record, whether a virStorageSource originates from autodetection.
-
- 17 10月, 2017 5 次提交
-
-
由 Peter Krempa 提交于
Express a properly terminated backing chain by putting a virStorageSource of type VIR_STORAGE_TYPE_NONE in the chain. The newly used helpers simplify this greatly. The change fixes a bug as formatting an incomplete backing chain and parsing it back would end up in expressing a terminated chain since src->backingStoreRaw was not populated. By relying on the terminator object this can be now processed appropriately.
-
由 Peter Krempa 提交于
Add helpers that will simplify checking if a backing file is valid or whether it has backing store. The helper virStorageSourceIsBacking returns true if the given virStorageSource is a valid backing store member. virStorageSourceHasBacking returns true if the virStorageSource has a backing store child. Adding these functions creates a central points for further refactors.
-
由 Peter Krempa 提交于
chain->path may be NULL e.g. for NBD drives, so the check needs to avoid dereferencing the path in such case
-
由 Peter Krempa 提交于
We can now use the backing store ID directly rather than counting the number of images seen while looking up images.
-
由 Peter Krempa 提交于
The backing store indexes were not bound to the storage sources in any way. To allow us to bind a given alias to a given storage source we need to save the index in virStorageSource. The backing store ids are now generated when detecting the backing chain. Since we don't re-detect the backing chain after snapshots, the numbering needs to be fixed there.
-
- 16 10月, 2017 1 次提交
-
-
由 Daniel P. Berrange 提交于
This adds a rule to require https links for the libvirt, qemu and kvm websites. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 28 9月, 2017 2 次提交
-
-
由 John Ferlan 提交于
Introduce a function to setup any TLS needs for a disk source. If there's a configuration or other error setting up the disk source for TLS, then cause the domain startup to fail. For VxHS, follow the chardevTLS model where if the src->haveTLS hasn't been configured, then take the system/global cfg->haveTLS setting for the storage source *and* mark that we've done so via the tlsFromConfig setting in storage source. Next, if we are using TLS, then generate an alias into a virStorageSource 'tlsAlias' field that will be used to create the TLS object and added to the disk object in order to link the two together for QEMU. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Ashish Mittal 提交于
Add an optional virTristateBool haveTLS to virStorageSource to manage whether a storage source will be using TLS. Sample XML for a VxHS disk: <disk type='network' device='disk'> <driver name='qemu' type='raw' cache='none'/> <source protocol='vxhs' name='eb90327c-8302-4725-9e1b-4e85ed4dc251' tls='yes'> <host name='192.168.0.1' port='9999'/> </source> <target dev='vda' bus='virtio'/> </disk> Additionally add a tlsFromConfig boolean to control whether the TLS setting was due to domain configuration or qemu.conf global setting in order to decide whether to Format the haveTLS setting for either a live or saved domain configuration file. Update the qemuxml2xmltest in order to add a test to show the proper parsing. Also update the docs to describe the tls attribute. Signed-off-by: NAshish Mittal <Ashish.Mittal@veritas.com> Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 27 9月, 2017 3 次提交
-
-
由 Ján Tomko 提交于
Calling fallocate on the new (smaller) capacity ensures that the whole file is allocated, but it does not reduce the file size. Also call ftruncate after fallocate. https://bugzilla.redhat.com/show_bug.cgi?id=1366446
-
由 Ján Tomko 提交于
We have been trying to implement the ALLOCATE flag to mean "the volume should be fully allocated after the resize". Since commit b0579ed9 we do not allocate from the existing capacity, but from the existing allocation value. However this value is a total of all the allocated bytes, not an offset. For a sparsely allocated file: $ perl -e 'print "x"x8192;' > vol1 $ fallocate -p -o 0 -l 4096 vol1 $ virsh vol-info vol1 default Capacity: 8.00 KiB Allocation: 4.00 KiB Treating allocation as an offset would result in an incompletely allocated file: $ virsh vol-resize vol1 --pool default 16384 --allocate Capacity: 16.00 KiB Allocation: 12.00 KiB Call fallocate from zero on the whole requested capacity to fully allocate the file. After that, the volume is fully allocated after the resize: $ virsh vol-resize vol1 --pool default 16384 --allocate $ virsh vol-info vol1 default Capacity: 16.00 KiB Allocation: 16.00 KiB
-
由 Ján Tomko 提交于
Introduce a new function virFileAllocate that will call the non-destructive variants of safezero, essentially reverting my commit 1390c268 safezero: fall back to writing zeroes even when resizing back to the state as of commit 18f03166 virstoragefile: Have virStorageFileResize use safezero This means that _ALLOCATE flag will no longer work on platforms without the allocate syscalls, but it will not overwrite data either.
-
- 22 9月, 2017 1 次提交
-
-
由 John Ferlan 提交于
Commit id '5604c056' used the wrong API to generate the <secret type='%s'..." field. The previous code used the correct API as was done in commit id '6887af39'. The data is actually a usage type not an auth type even though the result is the same.
-
- 20 9月, 2017 2 次提交
-
-
由 Ashish Mittal 提交于
Add the backing parse and a test case to verify parsing of VxHS backing storage. Signed-off-by: NAshish Mittal <Ashish.Mittal@veritas.com> Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Ashish Mittal 提交于
Add a new virStorageNetProtocol for Veritas HyperScale (VxHS) disks Signed-off-by: NAshish Mittal <Ashish.Mittal@veritas.com> Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 12 9月, 2017 1 次提交
-
-
由 Guido Günther 提交于
-
- 27 7月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
Make it less confusing by naming the field which refers to the storage object as 'nodestorage'. Reviewed-by: NEric Blake <eblake@redhat.com>
-
- 24 7月, 2017 2 次提交
-
-
由 Peter Krempa 提交于
Currently, @port is type of string. Well, that's overkill and waste of memory. Port is always an integer. Use it as such. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Similarly to when parsing XML we need to fill in default ports for the backing chain. This was missed in commit 5bda8354
-
- 14 7月, 2017 3 次提交
-
-
由 Peter Krempa 提交于
Fill them in right away rather than having to figure out at runtime whether they are necessary or not. virStorageSourceNetworkDefaultPort does not need to be exported any more.
-
由 Peter Krempa 提交于
Our documentation provides them, so the helper should return them.
-
由 Peter Krempa 提交于
Make the stuff hardcoded in qemu a global helper so that other parts of the code can determine the default port too.
-
- 11 7月, 2017 3 次提交
-
-
由 Peter Krempa 提交于
Now that the JSON deflattener is working sanely we can always attempt the deflattening so that we can then parse the tree as expected.
-
由 Peter Krempa 提交于
Currently the function would deflatten the object by dropping the 'file' prefix from the attributes. This does not really scale well or adhere to the documentation. Until we refactor the worker to properly deflatten everything we at least simulate it by adding the "file" wrapper object back.
-
由 Peter Krempa 提交于
The code will become more universal so it makes more sense for it to live with the rest of the JSON functions.
-
- 24 6月, 2017 1 次提交
-
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1371892 As it turns out the volume create, build, and refresh path was not peeking at the meta data, so immediately after a create operation the value displayed for capacity was still incorrect. However, if a pool refresh was done the correct value was fetched as a result of a meta data peek. The reason is it seems historically if the file type is RAW then peeking at the file just took the physical value for the capacity. However, since we know if it's an encrypted file, then peeking at the meta data will be required in order to get a true capacity value. So check for encryption in the source and if present, use the meta data in order to fill in the capacity value and set the payload_offset.
-
- 20 6月, 2017 2 次提交
-
-
由 Peter Krempa 提交于
Some callers don't need to know the backing format. Make the argument optional by using a dummy int if NULL is passed.
-
由 Peter Krempa 提交于
-