- 03 9月, 2015 1 次提交
-
-
由 Michal Privoznik 提交于
Caller is responsible for freeing the result of virStringJoin() when no longer needed: ==10701== 1 bytes in 1 blocks are definitely lost in loss record 1 of 806 ==10701== at 0x4C29F80: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==10701== by 0xAADB679: strdup (in /lib64/libc-2.20.so) ==10701== by 0x4F18655: virStrdup (virstring.c:726) ==10701== by 0x4F175AF: virStringJoin (virstring.c:165) ==10701== by 0x131D4D: vshReadlineInit (vsh.c:2572) ==10701== by 0x1322DF: vshInit (vsh.c:2736) ==10701== by 0x1347C1: main (virsh.c:907) Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 02 9月, 2015 1 次提交
-
-
由 Jonathan Toppins 提交于
Adds a new interface type using UDP sockets, this seems only applicable to QEMU but have edited tree-wide to support the new interface type. The interface type required the addition of a "localaddr" (local address), this then maps into the following xml and qemu call. <interface type='udp'> <mac address='52:54:00:5c:67:56'/> <source address='127.0.0.1' port='11112'> <local address='127.0.0.1' port='22222'/> </source> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </interface> QEMU call: -net socket,udp=127.0.0.1:11112,localaddr=127.0.0.1:22222 Notice the xml "local" entry becomes the "localaddr" for the qemu call. reference: http://lists.gnu.org/archive/html/qemu-devel/2011-11/msg00629.htmlSigned-off-by: NJonathan Toppins <jtoppins@cumulusnetworks.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 18 8月, 2015 2 次提交
-
-
由 Luyao Huang 提交于
When looking up a domain, we try to look up by ID, UUID and NAME consequently while not really caring which of those lookups succeeds. The problem is that if any of them fails, we dispatch the error from the driver and that means setting both threadlocal and global error. Let's say the last lookup (by NAME) succeeds and resets the threadlocal error as any other API does, however leaving the global error unchanged. If the underlying virsh command does not succeed afterwards, our cleanup routine in vshCommandRun ensures that no libvirt error will be forgotten and that's exactly where this global error comes in incorrectly. # virsh domif-setlink 123 vnet1 up error: interface (target: vnet1) not found error: Domain not found: no domain with matching id 123 This patch also resets the global error which would otherwise cause some minor confusion in reported error messages. https://bugzilla.redhat.com/show_bug.cgi?id=1254152Signed-off-by: NLuyao Huang <lhuang@redhat.com> Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Luyao Huang 提交于
Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-
- 15 8月, 2015 1 次提交
-
-
由 Moshe Levi 提交于
This patch removes the static keyword from the vshReadline which was introduced in commit 834c5720. With readline the vshReadline function is not static but when compiling without readline it was defined as static which caused compilation error.
-
- 14 8月, 2015 3 次提交
-
-
由 Erik Skultety 提交于
In order to share as much virsh' logic as possible with upcomming virt-admin client we need to split virsh logic into virsh specific and client generic features. Since majority of virsh methods should be generic enough to be used by other clients, it's much easier to rename virsh specific data to virshX than doing this vice versa. It moved generic virsh commands (including info and opts structures) to generic module vsh.c. Besides renaming methods and structures, this patch also involves introduction of a client specific control structure being referenced as private data in the original control structure, introduction of a new global vsh Initializer, which currently doesn't do much, but there is a potential for added functionality in the future. Lastly it introduced client hooks which are especially necessary during client connecting phase.
-
由 Tomas Meszaros 提交于
This should be emitted whenever a domain is renamed. Signed-off-by: NTomas Meszaros <exo@tty.sk>
-
由 Tomas Meszaros 提交于
This patch implements new virsh command, domrename. Using domrename, it will be possible to rename domain from the virsh shell by calling virRenameDomain API. It takes two arguments, current domain name and new domain name. Example: virsh # list --all Id Name State ---------------------------------------------------- - bar shut off virsh # domrename bar foo Domain successfully renamed virsh # list --all Id Name State ---------------------------------------------------- - foo shut off virsh # Signed-off-by: NTomas Meszaros <exo@tty.sk>
-
- 12 8月, 2015 2 次提交
-
-
由 Michal Privoznik 提交于
In my previous commit d7f5c889 I tried to introduce support for inbound.floor. But the code change was incomplete. This is the change needed to fully enable the feature. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Commit 6983d6d2 tried to improve parseRateStr but broke the build instead for compilers that were not able to properly introspect the for loop indexed by the enum resulting into the following error: virsh-domain.c: In function 'parseRateStr': virsh-domain.c:916:13: error: 'field_name' may be used uninitialized in this function [-Werror=maybe-uninitialized] vshError(ctl, _("malformed %s field"), field_name); ^ virsh-domain.c:915:13: error: 'tmp' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (virStrToLong_ullp(token, NULL, 10, tmp) < 0) { ^ Rather than trying to fix the code, refactor the function again by reusing virStringSplit.
-
- 11 8月, 2015 2 次提交
-
-
由 Michal Privoznik 提交于
We have a function parseRateStr() that parses --inbound and --outbound arguments to both attach-interface and domiftune. Now that we have all virTypedParams macros needed for QoS, lets parse even floor attribute. The extended format for the arguments looks like this then: --inbound average[,peak[,burst[,floor]]] Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
The function is used to parse a tuple delimited by commas into virNetDevBandwidth structure. So far only three out of fore fields are supported: average, peak and burst. The single missing field is floor. Well, the parsing works, but I think we can do better. Especially when we will need to parse floor too in very close future. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 05 8月, 2015 1 次提交
-
-
由 Luyao Huang 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1250287 When run domfsinfo in quiet mode, we cannot get any useful information (just get \n), this is because we didn't use vshPrint to print useful information. Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-
- 21 7月, 2015 12 次提交
-
-
由 Peter Krempa 提交于
Similarly to the refactor of cmdBlockCommit in a previous commit this does the same change for cmdBlockCopy.
-
由 Peter Krempa 提交于
Reuse the vshBlockJobWait infrastructure to refactor cmdBlockCommit to use the common code. This additionally fixes a bug when working with new qemus, where when doing an active commit with --pivot the pivoting would fail, since qemu reaches 100% completion but the job doesn't switch to synchronized phase right away.
-
由 Peter Krempa 提交于
Introduce helper function that will provide logic for waiting for block job completion so the 3 open coded places can be unified and improved. This patch introduces the whole logic and uses it to fix cmdBlockJobPull. The vshBlockJobWait function provides common logic for block job waiting that should be robust enough to work across all previous versions of libvirt. Since virsh allows passing user-provided strings as paths of block devices we can't reliably use block job events for detection of block job states so the function contains a great deal of fallback logic.
-
由 Peter Krempa 提交于
Put all argument parsing together and refactor the argument checking code.
-
由 Peter Krempa 提交于
Put all argument parsing together and refactor the argument checking code.
-
由 Peter Krempa 提交于
Use the VSH_EXCLUSIVE_OPTIONS to exclude combinations of --pivot and --keep-overlay and refactor the enforcing of the --wait option and other flags that imply --wait.
-
由 Peter Krempa 提交于
Final cleanup to get rid of the hub function.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
Use the VSH_EXCLUSIVE_OPTIONS_VAR to interlock incompatible options. Since a variable named 'abort' would conflict with older compilers use VSH_EXCLUSIVE_OPTIONS for the --abort option.
-
由 Peter Krempa 提交于
cmdBlockJob will be converted to a hub that will call into the individual executor functions.
-
- 16 7月, 2015 1 次提交
-
-
由 Martin Kletzander 提交于
Commit ed8155ea documented that mhz field in virNodeInfo might be 0 if the frequency is unknown. Modify virsh to know about that. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 15 7月, 2015 2 次提交
-
-
由 Michal Privoznik 提交于
Some drivers don't expose available huge page sizes in the capabilities XML. For instance, LXC driver is one of those. This has a downside that when virsh is trying to get aggregated info on free pages per all NUMA nodes, it fails. The problem is that the virNodeGetFreePages() API expects caller to pass an array of page sizes he is interested in. In virsh, this array is filled from the capabilities from '/capabilities/host/cpu/pages' XPath. As said, in LXC there's no such XPath and therefore virsh fails currently. But hey, we can fallback: the page sizes are exposed under '/capabilities/host/topology/cells/cell/pages'. The page size can be collected from there, and voilà the command works again. But now we must make sure that there are no duplicates in the array passed to the public API. Otherwise we won't get as beautiful output as we are getting now. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
There's this condition: flags & VIR_DOMAIN_AFFECT_CURRENT && virDomainIsActive(dom) which can never be true since VIR_DOMAIN_AFFECT_CURRENT has hardcoded value of zero. Therefore virDomainIsActive() is a dead code. However, the condition could make sense if it is rewritten as the following: !(flags & VIR_DOMAIN_AFFECT_CONFIG) && virDomainIsActive(dom) Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 02 7月, 2015 1 次提交
-
-
由 Luyao Huang 提交于
Commit id '81dd81e4' caused a regression when attempting to print a specific vcpuid that is out of the range of the maximum vcpus for the guest, such as: $ virsh vcpupin $dom 1000 VCPU: CPU Affinity ---------------------------------- $ Rather than just recover the old message, let's adjust the message based on what would be displayed for a similar failure in the set path, such as: $ virsh vcpupin $dom 1000 error: vcpu 1000 is out of range of persistent cpu count 2 $ virsh vcpupin $dom 1000 --live error: vcpu 1000 is out of range of live cpu count 2 $ Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-
- 24 6月, 2015 1 次提交
-
-
由 Boris Fiuczynski 提交于
This patch provides support for a new watchdog action "inject-nmi" which allows to define an inject of a non-maskable interrupt into a guest. Signed-off-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Reviewed-by: NDaniel Hansel <daniel.hansel@linux.vnet.ibm.com> Reviewed-by: NStefan Zimmermann <stzi@linux.vnet.ibm.com> Reviewed-by: NTony Krowiak <akrowiak@linux.vnet.ibm.com>
-
- 23 6月, 2015 3 次提交
-
-
由 Eric Farman 提交于
The SCSI Architecture Model defines a logical unit address as 64-bits in length, so change the field accordingly so that the entire value could be stored. Signed-off-by: NEric Farman <farman@linux.vnet.ibm.com>
-
由 Eric Farman 提交于
The address elements are all unsigned integers, so we should use the appropriate print directive when printing it. Signed-off-by: NEric Farman <farman@linux.vnet.ibm.com>
-
由 Eric Farman 提交于
The SCSI address element attributes bus, target, and unit are expected to be positive values, so make sure no one provides a negative value since the value is stored as an unsigned. Signed-off-by: NEric Farman <farman@linux.vnet.ibm.com>
-
- 22 6月, 2015 1 次提交
-
-
由 Peter Krempa 提交于
When the block job would fail while watching it using the "--wait" option for blockcopy, virsh would rather unhelpfully report: $ virsh blockcopy vm hdc /tmp/raw.img --granularity 4096 --verbose --wait Now in mirroring phase Add a special case when the block job vanishes while waiting for it to finish to improve the message: $ virsh blockcopy vm hdc /tmp/raw.img --granularity 8192 --verbose --wait error: Block Copy unexpectedly failed
-
- 18 6月, 2015 1 次提交
-
-
由 Pavel Boldin 提交于
Add `virsh migrate' option `--migrate-disks' that allows CLI user to explicitly specify block devices to migrate. Signed-off-by: NPavel Boldin <pboldin@mirantis.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 16 6月, 2015 2 次提交
-
-
由 Martin Kletzander 提交于
This reverts commit 4e7ccf87. I mistakenly pushed it along with the Admin API series.
-
由 Martin Kletzander 提交于
You had only one job. That's what you can say about this example binary. In future, parts of virsh that are usable for this binary should be split into separate shell-utils and virt-admin should gain all the cool features of virsh without too much code addition. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 15 6月, 2015 1 次提交
-
-
由 Ján Tomko 提交于
The --xml option is mandatory if an XML description is used. Otherwise the third parameter is treated as the destination. https://bugzilla.redhat.com/show_bug.cgi?id=1206406#c3
-
- 12 6月, 2015 2 次提交
-
-
由 Michal Privoznik 提交于
When reviewing some network patches, I've noticed we don't have those switches to the 'net-list' command. We should. They are merely copied over from 'list' command. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Instead of sticking to old code pattern use the one laid out by cmdList. Use FILTER() macro instead of series of boolean variables. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-