- 26 7月, 2018 11 次提交
-
-
由 Cole Robinson 提交于
Some tests use the same VM state multiple times in a row. But if we failed loading the VM XML, subsequent tests crash on the NULL def pointer Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
- Convert to 'cleanup' label naming - Use more than one 'tmp' string and do all freeing at the end - Make the code easier to follow Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Handles parse virtType, os.type, bootloader bits, arch, machine, emulator Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Han Han 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1607825 Introduced by commit d48813e8. Signed-off-by: NHan Han <hhan@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1599973 Commit id fca9afa0 changed the @req->ifname to use @req->binding->portdevname fillingin the @req->binding in a similar way that @req->ifname would have been filled in during virNWFilterDHCPSnoopReq processing. However, in doing so it did not take into account some code paths where the @req->binding should be checked instead of @req->binding->portdevname. These checks led to SEGVs in some cases during libvirtd reload processing in virNWFilterSnoopRemAllReqIter (for stop during nwfilterStateCleanup processing) and virNWFilterSnoopReqLeaseDel (for start during nwfilterStateInitialize processing). In particular, when reading the nwfilter.leases file a new @req is created, but the @req->binding is not filled in. That's left to virNWFilterDHCPSnoopReq processing which checks if the @req already exists in the @virNWFilterSnoopState.snoopReqs hash table after adding a virNWFilterSnoopState.ifnameToKey entry for the @req->binding->portdevname by a @ref->ikey value. NB: virNWFilterSnoopIPLeaseInstallRule and virNWFilterDHCPSnoopThread do not need the req->binding check since they can only be called after the filter->binding is created/assigned. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
The config object is refed but unrefed only on error which leaves refcount unbalanced on successful return. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Michal Privoznik 提交于
The individual strings are freed, but the array is never freed. 8 bytes in 1 blocks are definitely lost in loss record 28 of 1,098 at 0x4C2CE3F: malloc (vg_replace_malloc.c:298) by 0x4C2F1BF: realloc (vg_replace_malloc.c:785) by 0x52C9C92: virReallocN (viralloc.c:245) by 0x52C9D88: virExpandN (viralloc.c:294) by 0x23414D99: virLXCProcessSetupInterfaces (lxc_process.c:552) by 0x23417457: virLXCProcessStart (lxc_process.c:1356) by 0x2341F71C: lxcDomainCreateWithFiles (lxc_driver.c:1088) by 0x2341F805: lxcDomainCreate (lxc_driver.c:1123) by 0x55917EB: virDomainCreate (libvirt-domain.c:6534) by 0x1367D1: remoteDispatchDomainCreate (remote_daemon_dispatch_stubs.h:4434) by 0x1366EA: remoteDispatchDomainCreateHelper (remote_daemon_dispatch_stubs.h:4410) by 0x546FDF1: virNetServerProgramDispatchCall (virnetserverprogram.c:437) Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Michal Privoznik 提交于
So we originally disabled LXC driver when libvirtd is running under valgrind back in 05436ab7 (which dates to beginning of 2009) as it was causing valgrind to crash. It's not the case anymore. Valgrind works with LXC happily. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Michal Privoznik 提交于
There are two places where we report supported sizes of huge pages: /capabilities/host/cpu/pages /capabilities/host/topology/cells/cell/pages The former aggregates sizes over all NUMA nodes while the latter reports supported sizes only for given node. While we are reporting per NUMA node sizes we are not reporting the aggregated sizes. I've noticed this when wondering why doesn't allocpages completer work. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Michal Privoznik 提交于
While not as critical as in qemu driver, there are still some runtime information we report in capabilities XML that might change throughout time. For instance, onlined CPUs (which affects reported L3 cache sizes). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1600468 If we are unable to read leases file (no matter what the reason is), we return 0 - just like if there were no leases. However, because we use virFileReadAll() an error is printed into the log. Note that not all networks have leases file - only those for which we start dnsmasq. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 25 7月, 2018 19 次提交
-
-
由 Daniel P. Berrangé 提交于
Consider creating a listener socket from a hostname that resolves to multiple addresses. It might be the case that the hostname resolves to both an IPv4 and IPv6 address because it is reachable over both protocols, but the IPv6 connectivity is provided off-host. In such a case no local NIC will have IPv6 and so bind() would fail with the EADDRNOTAVAIL errno. Thus it should be treated as non-fatal as long as at least one socket was succesfully bound. Reviewed-by: NJiri Denemark <jdenemar@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
When reporting socket/bind failures we want to ensure any fatal error reported is as accurate as possible. We'll prefer reporting a bind() errno over a socket() errno, because if socket() works but bind() fails that is a more significant event. Reviewed-by: NJiri Denemark <jdenemar@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1559867 When attaching a device to the domain we need to be sure to use the correct domain definition (vm->def or vm->newDef) when calling virDomainDeviceDefParse because the post parse processing algorithms that may assign an address for the device will use whatever domain definition was passed in. Additionally, some devices (SCSI hostdev and SCSI disk) use algorithms that rely on knowing what already exists of the other type when generating the new device's address. Using the wrong VM definition could result in duplicated addresses. In the case of the bz, two hostdev's with no domain address provided were added to the running domain's config only. However, the parsing algorithm used the live domain in order to figure out the host device address resulting in the same address being used and a subsequent start failing due to duplicate address. Fix this by separating the checks/code into CONFIG and LIVE processing using the correct definition for each block and performing cleanup for both options as necessary. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Shi Lei 提交于
With 'switch' we can utilize the compile time enum checks which we can't rely on with plain 'if' conditions. Signed-off-by: NShi Lei <shilei.massclouds@gmx.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Marcos Paulo de Souza 提交于
Commit 77298458 changed the esx storage adapter from busLogic to lsilogic, introducing a typo. Changing it back to lsiLogic (with capital L) solves the issue. With this change, libvirt can now create volumes in ESX again. Thanks to Jaroslav Suchanek who figured out what was the issue in the first place. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1571759Signed-off-by: NMarcos Paulo de Souza <marcos.souza.org@gmail.com>
-
由 Andrea Bolognani 提交于
Despite being standardized in POSIX.1-2008, the 'm' sscanf() modifier is currently not available on FreeBSD. Reimplement parsing without sscanf() to work around the issue. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Han Han 提交于
Signed-off-by: NHan Han <hhan@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1589115 When doing a memory snapshot qemuOpenFile() is used. This means that the file where memory is saved is firstly attempted to be created under root:root (because that's what libvirtd is running under) and if this fails the second attempt is done under domain's uid:gid. This does not make much sense - qemu is given opened FD so it does not need to access the file. Moreover, if dynamicOwnership is set in qemu.conf and the file lives on a squashed NFS this is deadly combination and very likely to fail. The fix consists of using: qemuOpenFileAs(fallback_uid = cfg->user, fallback_gid = cfg->group, dynamicOwnership = false) In other words, dynamicOwnership is turned off for memory snapshot (chown() will still be attempted if the file does not live on NFS) and instead of using domain DAC label, configured user:group is set as fallback. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Extend this existing test so that a case when IQN is provided is tested too. Since a special iSCSI interface is created and its name is randomly generated at runtime we need to link with virrandommock to have predictable names. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
Some tests will want to pass their own callback data into the testIscsiadmCbData callback. Introduce testIscsiadmCbData struct to give this some form and order. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
This struct has nothing to do with testIscsiadmCb() rather than testISCSIGetSession(). Move it closer to the latter. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
Introduce one basic test that tests the simplest case: logging into portal without any IQN. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
The documentation to virCommandWait() function states that if @exitstatus is NULL and command finished with error -1 is returned. In other words, if @dryRunCallback is set and returns an error (by setting its @status argument to a nonzero value) we must propagate this error properly honouring the documentation (and also regular run). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
After a new iSCSI interface is successfully set up, we issue a sendtargets command. However, after 56057900 we don't update the host config which in turn makes login fail because iscsiadm is unable to find any matching record for the interface. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
When scanning for targets, iSCSI might give different results depending on the interface used. This is basically just name of config file under /etc/iscsi/ifaces to use. The file contains initiator IQN thus different results claim. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
Firstly, we can utilize virCommandSetOutputBuffer() API which will collect the command output for us. Secondly, sscanf()-ing through each line is easier to understand (and more robust) than jumping over a string with strchr(). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
This is in fact 'cleanup' label and it should be named as such. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
Perform some method clean-up to follow more accepted coding standards: * Initialize @ret to error value and prove otherwise. * Initialize *ifacename to NULL Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Cole Robinson 提交于
It wasn't updated when libvirtd was moved from daemon/ to src/ Reviewed-by: NJiri Denemark <jdenemar@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 24 7月, 2018 4 次提交
-
-
由 Michal Privoznik 提交于
After my change to the original patch that resulted in commit 8ed874b3 it was brought to my attention that all three defines are the same: FICLONE = BTRFS_IOC_CLONE = XFS_IOC_CLONE (as documented in ioctl_ficlone(2)). Therefore we should prefer generic FICLONE over 'specific' defines for btrfs/xfs. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Peter Krempa 提交于
If we'd fail to enter or exit the monitor the saved error would be leaked. Introduced in 8498a1e2 . Pointed out by coverity. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Marc Hartmayer 提交于
Signed-off-by: NMarc Hartmayer <mhartmay@linux.ibm.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Marc Hartmayer 提交于
Update the length @remote_params_len only if the related @remote_params_val has also been set. Signed-off-by: NMarc Hartmayer <mhartmay@linux.ibm.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 23 7月, 2018 6 次提交
-
-
由 Ján Tomko 提交于
qemuagenttest also depends on JSON object key ordering: Invalid value of argument 'vcpus' of command 'guest-set-vcpus': expected '[{"logical-id":1,"online":false}]' got '[{"online":false,"logical-id":1}]' Skip it as well. Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
'disk-network-source-auth' and 'disk-network-tlsx509' 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 提交于
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 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-