- 14 6月, 2014 1 次提交
-
-
由 Giuseppe Scrivano 提交于
Report VIR_ERR_NO_STORAGE_VOL instead of a system error when lstat fails because the file doesn't exist. Fixes this problem in virt-install: https://bugzilla.redhat.com/show_bug.cgi?id=1108922Signed-off-by: NGiuseppe Scrivano <gscrivan@redhat.com>
-
- 13 6月, 2014 5 次提交
-
-
由 Roman Bogorodskiy 提交于
Automatically allocate PCI addresses for devices instead of hardcoding them in the driver code. The current allocation schema is to dedicate an entire slot for each devices. Also, allow having arbitrary number of devices.
-
由 Michal Privoznik 提交于
The kernel's more broken than one would think. Various drivers report various (usually spurious) values if the interface is in other state than 'up' . While on some we experience -EINVAL when read()-ing the speed sysfs file, with other drivers we might get anything from 0 to UINT_MAX. If that's the case it's better to not report link speed. Well, the interface is not up anyway. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
When the test is failing but the debug output isn't enabled the resulting line would look ugly like and would not contain the actual difference. TEST: virstoragetest .................chain member 1!chain member 1!chain member 1! Store the member index in the actual checked string to hide this problem
-
由 Eric Blake 提交于
A future patch will add two-phase block commit jobs; as the mechanism for managing them is similar to managing a block copy job, existing errors should be made generic enough to occur for either job type. * src/conf/domain_conf.c (virDomainHasDiskMirror): Update comment. * src/qemu/qemu_driver.c (qemuDomainDefineXML) (qemuDomainSnapshotCreateXML, qemuDomainRevertToSnapshot) (qemuDomainBlockJobImpl, qemuDomainBlockCopy): Update error message. * src/qemu/qemu_hotplug.c (qemuDomainDetachDiskDevice): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Peter's review of an early version of my addition of active block commit pointed out some issues that I was copying from the block copy code; fix them up now before perpetuating them. For virsh commands that manage a single API call, it's nice to have a 1:1 mapping of options to flags, so that we can test that lower-layer software handles flag combinations correctly. But where virsh is introducing syntactic sugar to combine multiple API calls into a single user interface, we might as well make that interface compact. That is, we should allow the shorter command-line of 'blockcopy $dom $disk --pivot' without having to explicitly specify --wait, because this isn't directly a flag passed to a single underlying API call. Also, my use of embedded ?: ternaries bordered on unreadable. * tools/virsh-domain.c (cmdBlockCopy): Make --pivot, --finish, and --timeout imply --wait. Drop excess ?: operators. * tools/virsh.pod (blockcopy): Update documentation. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 12 6月, 2014 18 次提交
-
-
由 Michal Privoznik 提交于
With one of my recent patches (1c702778) libvirt's capable of reporting NUMA node locality for PCI devices. The node ID is stored in pci_dev.numa_node variable. However, since zero is valid NUMA node ID, the default is -1 as it is in kernel too. So, if the PCI device is not tied to any specific NUMA node, the default is then NOT printed into XML. Therefore, when parsing node device XML, the <node/> element is optional. But currently, if it's not there, we must set sane default, otherwise after parsing in the memory representation doesn't match the XML. We are already doing this in other place: udevProcessPCI(). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Eric Blake 提交于
Commit f5869657 accidentally changed the semantics of the virDomainBlockCommit command; where it previously looked for an explicit top argument from the top of the chain, it now starts from the backing file of the top. Of course, until we allow active commits, the only difference it makes is in the quality of the error message, but with code for active commit coming soon, we need to support an explicit mention of the active layer. * src/qemu/qemu_driver.c (qemuDomainBlockCommit): Start looking from top of chain. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Jincheng Miao 提交于
The vcpupin command allowed specifying a negative number for the --vcpu argument. This would the overflow when the underlying virDomainPinVcpu API was called. $ virsh vcpupin r7 -1 0 error: numerical overflow: input too large: 4294967295 Switch the vCPU variable to a unsigned int and parse it using the corresponding function. Also improve the vcpupin test to cover all the defects. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1101059Signed-off-by: NJincheng Miao <jmiao@redhat.com> Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
To follow the new semantics of the vshCommandOptToU* functions convert this one to reject negative numbers too. To allow using -1 for "maximum" semantics for the vol-*load two bandwidth functions that use this helper introduce vshCommandOptULongLongWrap.
-
由 Peter Krempa 提交于
To follow the new semantics of the vshCommandOptToU* functions convert this one to reject negative numbers too. To allow using -1 for "maximum" semantics for the two bandwidth functions that use this helper introduce vshCommandOptULWrap. Although currently the migrate-setspeed function for the qemu driver will reject -1 as maximum.
-
由 Peter Krempa 提交于
Use virStrToLong_uip instead of virStrToLong_ui to reject negative numbers in the helper. None of the callers expects the wraparound "feature" for negative numbers. Also add a function that allows wrapping of negative numbers as it might be used in the future and be explicit about the new semantics in the function docs.
-
由 Ján Tomko 提交于
qemuDomainGetImageIds did not check if there was a label in the seclabel, thus crashing on <seclabel type='none' model='dac'/> https://bugzilla.redhat.com/show_bug.cgi?id=1108590
-
由 John Ferlan 提交于
Clean up some Coverity warnings from commit id '4dc5d8f1'
-
由 John Ferlan 提交于
Clean up code to resolve Coverity RESOURCE_LEAK's from commit id's '632b9600' and 'b739f807'.
-
由 Peter Krempa 提交于
A network disk might actually be backed by local storage. Also the path iterator actually handles networked disks well now so remove the code that skips the labelling in dac and selinux security driver.
-
由 Peter Krempa 提交于
Add a helper to do all the lookup steps and remove a ton of duplicated code.
-
由 Peter Krempa 提交于
Most of the APIs now don't reach the cleanup section when the pool object wasn't found and thus don't need to check before unlocking it.
-
由 Peter Krempa 提交于
Rework internal pool lookup code to avoid printing the raw UUID buffer in the case a storage pool can't be found: $ virsh pool-name e012ace0-0460-5810-39ef-1bce5fa5a4dd error: failed to get pool 'e012ace0-0460-5810-39ef-1bce5fa5a4dd' error: Storage pool not found: no storage pool with matching uuid à¬à`X9ï_¥¤Ý The rework is mostly done by switching the lookup code to the newly introduced helper virStoragePoolObjFromStoragePool Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1104993
-
由 Ján Tomko 提交于
Try -fstack-protector-strong first on Linux. If that fails, fall back to -fstack-protector-all.
-
由 Ján Tomko 提交于
This option only makes sense for -fstack-protector. With -fstack-protector-all or -fstack-protector-strong, functions are protected regardless of buffer size. https://bugzilla.redhat.com/show_bug.cgi?id=1105456
-
由 Ján Tomko 提交于
These warnings have already been added to $dontwarn.
-
由 John Ferlan 提交于
Resolve two Coverity issues introduced by commit id '9b8d6e1e' Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Roman Bogorodskiy 提交于
Add 'Bhyve' in hypervisor list reported by 'virsh -V' if it's compiled it.
-
- 11 6月, 2014 14 次提交
-
-
由 Pavel Hrdina 提交于
Commit baafe668 introduced new leaseshelper with a crash of freeing env string. Calling 'getenv()' inside 'virGetEnvAllowSUID()' may return a static string and we definitely should not free it. The author probably want to free the copy of that string. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Eric Blake 提交于
Roman Bogorodskiy reported a syntax-check failure when using FreeBSD; complaining that: prohibit_empty_first_line tools/libvirt_win_icon_16x16.ico:1: tools/libvirt_win_icon_32x32.ico:1: tools/libvirt_win_icon_48x48.ico:1: tools/libvirt_win_icon_64x64.ico:1: maint.mk: Prohibited empty first line In reality, the first 'line' of that file is NOT empty; but since it is a binary file, awk is not required to handle it gracefully. The simplest solution is to exempt all image files from syntax checks in the first place - after all, we only store them in git because they are inconvenient to regenerate, but they are not our preferred format for making modifications, and syntax check should only cover files that we are likely to modify. * cfg.mk (VC_LIST_ALWAYS_EXCLUDE_REGEX): Exempt images. (exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF): Simplify. (exclude_file_name_regexp--sc_trailing_blank): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Shivaprasad G Bhat 提交于
When saving domain with relabel=no, the file that gets created must have the context set anyway. That way restore can be successful without the need of relabelling the file. Signed-off-by: NShivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
-
由 Jean-Baptiste Rouault 提交于
Since commit d69415d4, vmware version is parsed from both stdout and stderr. This patch makes version parsing work even if there is garbage (libvirt debug messages for example) in the command output. Add test data for this case.
-
由 Michal Privoznik 提交于
If we're compiling on non-Linux platform, the virNetDevGetLinkInfo() is a dummy function which barely logs debug message that getting link info is not supported. However, while the debug message was prepared for printing the interface name too, I actually forgot to pass the variable which resulted in build error on platforms like mingw or FreeBSD. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
While exposing the info under <interface/> in previous patch works, it may work only in cases where interface is configured on the host. However, orchestrating application may want to know the link state and speed even in that case. That's why we ought to expose this in nodedev XML too: virsh # nodedev-dumpxml net_eth0_f0_de_f1_2b_1b_f3 <device> <name>net_eth0_f0_de_f1_2b_1b_f3</name> <path>/sys/devices/pci0000:00/0000:00:19.0/net/eth0</path> <parent>pci_0000_00_19_0</parent> <capability type='net'> <interface>eth0</interface> <address>f0:de:f1:2b:1b:f3</address> <link speed='1000' state='up'/> <capability type='80203'/> </capability> </device> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
In the previous commit the helper function was prepared, so now we can wire it up and benefit from it. The Makefile change is required because we're including virnedev,h which includes virnetlink.h which tries to include netlink/msg.h. However this file is not under /usr/include directly but is dependent on libnl used. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
The purpose of this function is to fetch link state and link speed for given NIC name from the SYSFS. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Currently it is not possible to determine the speed of an interface and whether a link is actually detected from the API. Orchestrating platforms want to be able to determine when the link has failed and where multiple speeds may be available which one the interface is actually connected at. This commit introduces an extension to our interface XML (without implementation to interface driver backends): <interface type='ethernet' name='eth0'> <start mode='none'/> <mac address='aa:bb:cc:dd:ee:ff'/> <link speed='1000' state='up'/> <mtu size='1492'/> ... </interface> Where @speed is negotiated link speed in Mbits per second, and state is the current NIC state (can be one of the following: "unknown", "notpresent", "down", "lowerlayerdown","testing", "dormant", "up"). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Eric Blake 提交于
Commit 8ba0a58f introduced a compiler warning that I hit during a run of ./autobuild.sh: ../../src/nodeinfo.c: In function 'nodeCapsInitNUMA': ../../src/nodeinfo.c:1853:43: error: 'nsiblings' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (virCapabilitiesAddHostNUMACell(caps, n, memory, ^ Sure enough, nsiblings starts uninitialized, and is set by a call to virNodeCapsGetSiblingInfo, but that function fails to assign through the pointer if virNumaGetDistances fails. * src/nodeinfo.c (nodeCapsInitNUMA): Initialize nsiblings. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Jim Fehlig reported a regression found by libvirt-TCK tests: > ~ # perl /usr/share/libvirt-tck/tests/qemu/100-disk-encryption.t ... > ok 4 - defined persistent domain config > # Starting inactive domain config > libvirt error code: 1, message: internal error: unable to execute QEMU command > 'cont': 'drive-ide0-0-1' > (/var/cache/libvirt-tck/300-disk-encryption/demo.qcow2) is encrypted Commit 2279d560 converted a boolean into a pointer with the intent of transferring that pointer out of a temporary object into the caller's data structure. The temporary structure meant that meta->encryption was always NULL on entry, so we could get away with blindly allocating the pointer when the header said so. But later, commit 8823272d tweaked things to do backing chain detection in-place, rather than via a temporary object; this has the net result that meta->encryption can be non-NULL on entry. Not only did this turn the latent behavior into a memory leak, it is also a behavior regression: blindly allocating a new pointer wipes out what secrets we already knew about the chain, making it impossible to restart the domain. Of course, no one in their right mind should be relying on qcow2 encryption - it is fundamentally flawed. And sadly, the TCK tests don't get run often enough, and this shows that our virstoragetest does not exercise encrypted images at all. Otherwise, we could have avoided a release containing this regression. * src/util/virstoragefile.c (virStorageFileGetMetadataInternal): Don't nuke an already-existing encryption. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Roman Bogorodskiy 提交于
clang complains about possibly uninitialized variable: vbox/vbox_snapshot_conf.c:1355:9: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (!(xPathContext = xmlXPathNewContext(xml))) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ So init 'ret' with NULL.
-
由 Chen Fan 提交于
the 'migration_host' description may be a bit difficult to understand for some users, so enhance the manual Signed-off-by: NChen Fan <chen.fan.fnst@cn.fujitsu.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Now that qemu 2.0 allows commit of the active layer, people are attempting to use virsh blockcommit and getting into a stuck state, because libvirt is unprepared to handle the two-phase commit required by qemu. Stepping back a bit, there are two valid semantics for a commit operation: 1. Maintain a 'golden' base, and a transient overlay. Make changes in the overlay, and if everything appears to work, commit those changes into the base, but still keep the overlay for the next round of changes; repeat the cycle as desired. 2. Create an external snapshot, then back up the stable state in the backing file. Once the backup is complete, commit the overlay back into the base, and delete the temporary snapshot. Since qemu doesn't know up front which of the two styles is preferred, a block commit of the active layer merely gets the job into a synchronized state, and sends an event; then the user must either cancel (case 1) or complete (case 2), where qemu then sends a second event that actually ends the job. However, until commit e6bcbcd3, libvirt was blindly assuming the semantics that apply to a commit of an intermediate image, where there is only one sane conclusion (the job automatically ends with fewer elements in the chain); and getting stuck because it wasn't prepared for qemu to enter a second phase of the job. This patch adds a flag to the libvirt API that a user MUST supply in order to acknowledge that they will be using two-phase semantics. It might be possible to have a mode where if the flag is omitted, we automatically do the case 2 semantics on the user's behalf; but before that happens, I must do additional patches to track the fact that we are doing an active commit in the domain XML. Later patches will add support of the flag, and once 2-phase semantics are working, we can then decide whether to relax things to allow an omitted flag to cause an automatic pivot. * include/libvirt/libvirt.h.in (VIR_DOMAIN_BLOCK_COMMIT_ACTIVE) (VIR_DOMAIN_BLOCK_JOB_TYPE_ACTIVE_COMMIT): New enums. * src/libvirt.c (virDomainBlockCommit): Document two-phase job when committing active layer, through new flag. (virDomainBlockJobAbort): Document that pivot also occurs after active commit. * tools/virsh-domain.c (vshDomainBlockJob): Cover new job. * src/qemu/qemu_driver.c (qemuDomainBlockCommit): Explicitly reject active copy; later patches will add it in. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 10 6月, 2014 2 次提交
-
-
由 Wangrui (K) 提交于
Signed-off-by: NWang Rui <moon.wangrui@huawei.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Yohan BELLEGUIC 提交于
All snapshots information will be deleted from the vbox XML, but differencing disks will be kept so the user will be able to redefine the snapshot.
-