- 24 8月, 2018 6 次提交
-
-
由 Lubomir Rintel 提交于
They're ARM specific. Signed-off-by: NLubomir Rintel <lkundrak@v3.sk> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Simon Kobyda 提交于
For now, there are 9 test cases - testVshTableNew: Creating table with empty header - testVshTableHeader: Printing table with/without header - testVshTableRowAppend: Appending row with various number of cells. Only row with same number of cells as in header is accepted. - testUnicode: Printing table with unicode characters. Checking correct alignment. - testUnicodeArabic: test opposite (right to left) writing - testUnicodeZeroWidthChar - testUnicodeCombiningChar - testUnicodeNonPrintableChar, - testNTables: Create and print varios types of tables - one column, one row table, table without content, standart table... Signed-off-by: NSimon Kobyda <skobyda@redhat.com>
-
由 Simon Kobyda 提交于
Instead of printing it straight in virsh, it creates table struct which is filled with header and rows(domains). It allows us to know more about table before printing to calculate alignment right. Signed-off-by: NSimon Kobyda <skobyda@redhat.com>
-
由 Simon Kobyda 提交于
It solves problems with alignment of columns. Width of each column is calculated by its biggest cell. Should solve unicode bug. In future, it may be implemented in virsh, virt-admin... This API has 5 public functions: - vshTableNew - adds new table and defines its header - vshTableRowAppend - appends new row (for same number of columns as in header) - vshTablePrintToStdout - vshTablePrintToString - vshTableFree https://bugzilla.redhat.com/show_bug.cgi?id=1574624 https://bugzilla.redhat.com/show_bug.cgi?id=1584630Signed-off-by: NSimon Kobyda <skobyda@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Andrea Bolognani 提交于
With the current implementation, adding a new architecture and not updating preferredMachines accordingly will not cause a build failure, making it very likely that subtle bugs will be introduced in the process. Rework the code so that such issues will be caught by the compiler. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Shivaprasad G Bhat 提交于
The vol-dumpxml shows the volume target format type as raw for encrypted volumes. The error message when attempting to resize with prealloc is confusing here. Signed-off-by: NShivaprasad G Bhat <sbhat@linux.vnet.ibm.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 23 8月, 2018 1 次提交
-
-
由 Eric Blake 提交于
Minor copy-and-paste bug present since commit 462c74c3, in Apr 2010. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 22 8月, 2018 4 次提交
-
-
由 Peter Krempa 提交于
We should compare the alias/qdev id only when it was provided by the caller and when it was found in the reply. Otherwise we could dereference a NULL pointer. STRNEQ_NULLABLE is not appropriate since it would return 'true' if the string was not present in the JSON output. Found by Coverity. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Peter Krempa 提交于
qemuDomainDiskGetBackendAlias allocates a copy of the nodename string so we need to free it at the end. Found by Coverity. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Peter Krempa 提交于
qemuDomainDetachControllerDevice contained code which implied that alias might be NULL when detaching the disk and tried to generate it. This is no longer possible so we can remove the code. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Dan Kenigsberg 提交于
The former documentation was an unhelpful tautology. The suggested doc borrows the wording from virDomainSetAutostart. Signed-off-by: NDan Kenigsberg <danken@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 21 8月, 2018 29 次提交
-
-
由 Christian Ehrhardt 提交于
In cases where virProcessKillPainfully already reailizes that SIGTERM wasn't enough we are partially on a bad path already. Maybe the system is overloaded or having serious trouble to free and reap resources in time. In those case give the SIGKILL that was sent after 10 seconds some more time to take effect if force was set (only then we are falling back to SIGKILL anyway). Signed-off-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Christian Ehrhardt 提交于
It was found that in cases with host devices virProcessKillPainfully might be able to send signal zero to the target PID for quite a while with the process already being gone from /proc/<PID>. That is due to cleanup and reset of devices which might include a secondary bus reset that on top of the actions taken has a 1s delay to let the bus settle. Due to that guests with plenty of Host devices could easily exceed the default timeouts. To solve that, this adds an extra delay of 2s per hostdev that is associated to a VM. Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com>
-
由 Peter Krempa 提交于
Add code paths which call into the new functions to gather the data on a per-node-name basis and tweak the aliases used for extracting the data. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Use the 'qdev' instead of the disk alias to lookup the stats and transfer the capacity from the appropriate node name so that the function works with -blockdev. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Switch to using the QOM/qdev handles in all calls to qemuMonitorGetBlockInfo when using -blockdev. The callers also need to make sure to use the correct handle afterwards to extract the data. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
With -blockdev qemu will not report any useful "device" for the data returned by 'query-block'. We need to start using the 'qdev' field to do so in cases when "device" is empty or it does not match the entry name. This patch adds data for the 'qdev' field into the returned data structure. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Data relevant for the storage of a backing chain member will need to be reported separately when switching to blockdev. Prepare a function that extracts the appropriate data. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
When reporting stats for the backing chain some of them make sense only for the topmost entry as they are actually tied to the frontend device. We unfortunately can't change that fact, but we can stop reporting all zero stats for the backing chain members where they don't make any sense. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
While we report the read and written byte stats for every single layer of the backing chain, qemu in fact reports them only for the frontend. Split out the relevant stats into a separate function so that we can later fix this bug and stop reporting it for backing chain entries where they don't make sense. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Split out the header so that the loop can be refactored later. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Split out the code which converts the stats gathered in qemuDomainGetStatsBlock into typed parameters so that it will look less ugly when extending it. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
In cases when -blockdev is used we need to use 'query-named-block-nodes' instead of 'query-block'. This means that we can extract the write-threshold variable right away. To keep compatibility with old VMs modify the code which was extracting the value previously so that it updates the stats structure and a single code path then can be used to extract the data. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Allow reuse of qemuDomainGetStatsOneBlock to work with nodenames by removing the code that looks up the stats data to the caller. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Disk image size data are not contained in the reply of query-blockstats but need to be gathered from query-block. For use with -blockdev we really need to call 'query-named-block-nodes' and process it to retrieve the correct data. This patch introduces qemuMonitorBlockStatsUpdateCapacityBlockdev which updates the capacity data by nodename rather than device name. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
For use with -blockdev we need to be able to retrieve the stats by 'qdev' for the frontend device stats since 'device' will be empty. Note that for non-blockdev case qdev and 'device' with 'drive-' skipped would be the same. Additionally so that we can report the highest written offset we need to also be able to access them by node-name for backing chain purposes. In cases when 'device' is empty it does not make sense to gather them. Allow arranging the stats simultaneously in all the above dimensions. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Rather than totalling every entry from 'query-block' for stats provided by qemuDomainBlocksStatsGather total only stats for known disks. This will allow to return data for nodenames and qdevs in the same hash so that we can use them with -blockdev. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The string is not modified so it does not make sense to have a copy. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Use the new APIs which allow to manipulate the tray and media separately and also allow using a nodename to refer to a media to implement media changing. With the new approach we don't have to call eject twice as the media is removed by calling qemuMonitorBlockdevMediumRemove. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
With blockdev we can use the full range of commands to manipulate the tray and the medium separately. Implement monitor code for this. Schema testing done in the qemumonitorjsontest allows us to verify that we generate the commands correctly. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Initialize data for the whole backing chain when plugging in or removing disks when a machine supports -blockdev. Similarly to startup we need to prepare the structures for the whole backing chain and take care of the copy-on-read feature. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Use the 'node-name' provided in the event if 'device' is empty to look up the disk. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Add handling of the 'id' field in the event which corresponds to the QDEV id of the device. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Allow looking up also via QOM id and rename the function accordingly. Also add documentation of the specifics. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Use the nodename to resize the device rather than the drive alias. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
With -blockdev the drive alias can't be used any more so we need to switch to the QOM name. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The proper way to do this would be to use the 'throttle' driver but unfortunately it can't change the 'throttle_group' so we can't provide feature parity. This hack uses the block_set_io_throttle command to do so until we can properly replace it. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Add a helper which will use a collection of other helpers to determine whether a disk requires throttling to be enabled. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Format the backing chain onto the commandline using the 'json' syntax with -blockdev. The command line formatter needs only minor tweaks to add the new entries but we now need to initialize the structures that are used for every layer of the backing chain. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-