- 13 12月, 2016 9 次提交
-
-
由 Nikolay Shirokovskiy 提交于
In case of 0 filesystems *info is not set while according to virDomainGetFSInfo contract user should call free on it even in case of 0 filesystems. Thus we need to properly set it. NULL will be enough as free eats NULLs ok.
-
由 John Ferlan 提交于
-
由 John Ferlan 提交于
The libvirt-domain.h documentation indicates that for a qcow2 file in a filesystem being used for a backing store should report the disk space occupied by a file; however, commit id '15fa84ac' altered the code to trust that the wr_highest_offset should be used whenever wr_highest_offset_valid was set. As it turns out this will lead to indeterminite results. For an active domain when qemu hasn't yet had the need to find the wr_highest_offset value, qemu will report 0 even though qemu-img will report the proper disk size. This causes reporting of the following XML: <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/path/to/test-1g.qcow2'/> to be as follows: Capacity: 1073741824 Allocation: 0 Physical: 1074139136 with qemu-img indicating: image: /path/to/test-1g.qcow2 file format: qcow2 virtual size: 1.0G (1073741824 bytes) disk size: 1.0G Once the backing source file is opened on the guest, then wr_highest_offset is updated, but only to the high water mark and not the size of the file. This patch will adjust the logic to check for the file backed qcow2 image and enforce setting the allocation to the returned 'physical' value, which is the 'actual-size' value from a 'query-block' operation. NB: The other consumer of the wr_highest_offset output (GetAllDomainStats) has a contract that indicates 'allocation' is the offset of the highest written sector, so it doesn't need adjustment. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Instead of having duplicated code in qemuStorageLimitsRefresh and virStorageBackendUpdateVolTargetInfo to get capacity specific data about the storage backing source or volume -- create a common API to handle the details for both. As a side effect, virStorageFileProbeFormatFromBuf returns to being a local/static helper to virstoragefile.c For the QEMU code - if the probe is done, then the format is saved so as to avoid future such probes. For the storage backend code, there is no need to deal with the probe since we cannot call the new API if target->format == NONE. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Instead of having duplicated code in qemuStorageLimitsRefresh and virStorageBackendUpdateVolTargetInfoFD to fill in the storage backing source or volume allocation, capacity, and physical values - create a common API that will handle the details for both. The common API will fill in "default" capacity values as well - although those more than likely will be overridden by subsequent code. Having just one place to make the determination of what the values should be will make things be more consistent. For the QEMU code - the data filled in will be for inactive domains for the GetBlockInfo and DomainGetStatsOneBlock API's. For the storage backend code - the data will be filled in during the volume updates. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Commit id '8dc27259' introduced virStorageSourceUpdateBlockPhysicalSize in order to retrieve the physical size for a block backed source device for an active domain since commit id '15fa84ac' changed to use the qemuMonitorGetAllBlockStatsInfo and qemuMonitorBlockStatsUpdateCapacity API's to (essentially) retrieve the "actual-size" from a 'query-block' operation for the source device. However, the code only was made functional for a BLOCK backing type and it neglected to use qemuOpenFile, instead using just open. After the open the block lseek would find the end of the block and set the physical value, close the fd and return. Since the code would return 0 immediately if the source device wasn't a BLOCK backed device, the physical would be displayed incorrectly, such as follows in domblkinfo for a file backed source device: Capacity: 1073741824 Allocation: 0 Physical: 0 This patch will modify the algorithm to get the physical size for other backing types and it will make use of the qemuDomainStorageOpenStat helper in order to open/stat the source file depending on its type. The qemuDomainGetStatsOneBlock will no longer inhibit printing errors, but it will still ignore them leaving the physical value set to 0. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Currently just a shim to call virStorageSourceUpdateBlockPhysicalSize Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Split out the opening of the file and fetch of the stat buffer into a helper qemuDomainStorageOpenStat. This will handle either opening the local or remote storage. Additionally split out the cleanup of that into a separate helper qemuDomainStorageCloseStat which will either close the file or call the virStorageFileDeinit function. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Originally added by commit id '89646e69' prior to commit id '15fa84ac' and '71d2c172' which ensured that qemuStorageLimitsRefresh was only called for inactive domains. Adjust the comment describing the need for FIXME and move all the text to the function description. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 12 12月, 2016 2 次提交
- 11 12月, 2016 2 次提交
-
-
由 John Ferlan 提交于
Looks like the <timestamps> and <encryption> were put in the wrong place... They're not <pool> elements, rather they are <volume> elements
-
由 John Ferlan 提交于
Lost during merge of commit id '8546adf8' and '585ad00b'
-
- 09 12月, 2016 15 次提交
-
-
由 Peter Krempa 提交于
1ec22be5 added code that detects the maximum cpu count according to domain capabilities. The code fell back to the old command only if the API was not supported. If the API fails for other reasons the command would fail. There's no point in not trying the old API in such case. https://bugzilla.redhat.com/show_bug.cgi?id=1402690
-
由 Pavel Glushchak 提交于
This flag is used in Virtuozzo backend implicitly, thus we need to support it and don't fail if it's set. Signed-off-by: NPavel Glushchak <pglushchak@virtuozzo.com>
-
由 Pavel Glushchak 提交于
This flag tells backend not to create instance disks making behavior the same as in qemu driver. Disk files have to be created beforehand on target host manually or by upper management layer i.e. OpenStack Nova. Signed-off-by: NPavel Glushchak <pglushchak@virtuozzo.com>
-
由 Nikolay Shirokovskiy 提交于
When save/migrate a domain and we autogenerated a port, then if we print the inactive domain config, write out a -1 for the socket value; otherwise, it's possible that the subsequent start will fail if the autogenerated websocket used conflicts with an existing running config that also used autogenerated websockets. Examples: == A. Can not restore domain with autoconfigured websocket. domain 1 and 2 have autoconfigured websocket. 1. domain 1 is started then, saved 2. domain 2 is started 3. domain 1 restoration is failed: error: internal error: qemu unexpectedly closed the monitor: 2016-11-21T10:23:11.356687Z qemu-kvm: -vnc 0.0.0.0:2,websocket=5700: Failed to start VNC server on `(null)': Failed to bind socket: Address already in use == B. Can not migrate domain with autoconfigured websocket. domain 1 on host A, domain 2 on host B, both have autoconfigured websocket 1. domain 1 started, domain 2 started 2. domain 1 migration to host B is failed with the above error.
-
由 Nikolay Shirokovskiy 提交于
We need extra state variable to distinguish between autogenerated and user defined cases after auto generation is done.
-
由 Nikolay Shirokovskiy 提交于
Use switch for enums rather than if/else conditions.
-
由 Michal Privoznik 提交于
Some arguments in vshErrorHandler, vshReadlineCompletion and cmdSelfTest functions are not used. Mark them as such. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
The variable may be used uninitialized in this function. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Mehdi Abaakouk 提交于
This is just a code move of virstat.c to virnetdevtap.c
-
由 Mehdi Abaakouk 提交于
In preparation to the code move to virnetdevtap.c, this change: * renames virNetInterfaceStats to virNetDevTapInterfaceStats * changes 'path' to 'ifname', to use the same vocable as other method in virnetdevtap.c. * Add the attributes checker
-
由 Mehdi Abaakouk 提交于
When vhostuser interfaces are used, the interface statistics are not available in /proc/net/dev. This change looks at the openvswitch interfaces statistics tables to provide this information for vhostuser interface. Note that in openvswitch world drop/error doesn't always make sense for some interface type. When these informations are not available we set them to 0 on the virDomainInterfaceStats. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
If the 'nleases < 0' on return, then the subsequent call to findLeaseInJSON will not produce the expected results (passed in as a size_t, but nleases is a ssize_t). So check if the returned value < 0 and if so, goto cleanup. Found by Coverity as a NEGATIVE_RETURNS event
-
由 John Ferlan 提交于
If the allocation fails in DO_TEST_FLUSH_PROLOGUE, then 'mgr == NULL', but the code continues on - which won't be good. So modify the macro to cause an immediate failure and jump to a cleanup label. Found by Coverity as FORWARD_NULL event.
-
由 John Ferlan 提交于
-
由 Peter Krempa 提交于
There's nothing to compress if the requested snapshot memory format is set to 'raw' explicitly. After commit 9e14689e libvirt would try to run /sbin/raw to process the memory stream if the qemu.conf option snapshot_image_format is set. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1402726
-
- 08 12月, 2016 7 次提交
-
-
由 Cédric Bosdonnat 提交于
If the monitor doesn't hold a reference to the domain object the object may be destroyed before the monitor actually stops.
-
由 Michal Privoznik 提交于
Since its introduction in 2012 this internal API did nothing. Moreover we have the same API that does exactly the same: virSecurityManagerDomainSetPathLabel. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
If you've ever tried running a huge page backed guest under different user than in qemu.conf, you probably failed. Problem is even though we have corresponding APIs in the security drivers, there's no implementation and thus we don't relabel the huge page path. But even if we did, so far all of the domains share the same path: /hugepageMount/libvirt/qemu Our only option there would be to set 0777 mode on the qemu dir which is totally unsafe. Therefore, we can create dir on per-domain basis, i.e.: /hugepageMount/libvirt/qemu/domainName and chown domainName dir to the user that domain is configured to run under. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
So far this function takes virDomainObjPtr which: 1) is an overkill, 2) might be not available in all the places we will use it. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Martin Kletzander 提交于
Since the great rework of how we store vcpu- and iothread-related data, we have overly complex part of code that is trying to format the scheduler tuning data in as less lines as possible by grouping settings for multiple threads. That was designed as an input syntax sugar for users, but we don't need to also use that when formatting the XML. Switching to simple enumeration makes the code nicer, shorter and more welcoming to future changes. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Michal Privoznik 提交于
In 22f7ceb6 I've introduced another NSS module but forgot to package it in libvirt-nss.rpm. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Daniel P. Berrange 提交于
When redoing the website we deleted the libvirtLogo.png file not remembering that the test driver screenshot API impl relied on it. Rather than having the test driver use the logo as a side effect, give it its own dedicated image to use. This is installed in /usr/share/libvirt/test-screenshot.png and is taken from a NeXT Cube running WorldWideWeb[1]. The very first web browser in existance, running on the hardware it was originally written on. [1] https://en.wikipedia.org/wiki/WorldWideWebSigned-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 07 12月, 2016 5 次提交
-
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
The *header_name* cannot be quoted, otherwise it is not translated to the passed argument. Without this fix the generated configure contains *ac_cv_header_header_name*, but there should be for example *ac_cv_header_sals_sasl_h* for "sasl/sasl.h". Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
This check is not required because all i386 and x86_64 cpus have the cpuid instruction. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Commit a99bfb4b moved openwsman to its own file but forget to remove those few lines. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Peter Krempa 提交于
Qemu 2.8.0+ changes arguments structure for blockdev-add in the effort to make it finally stable. Since libvirt recently added the detection of gluster debug support relying on the old syntax we need to add the new as well.
-