Re: Re: [PATCHv3 3/3] lxc: fix a memory leak

2020-12-18 Thread Shi Lei
On 2020-12-18 at 22:01, John Ferlan wrote: > >Coverity reminds us of the ancient software engineering proverb related >to being stuck with ownership because you touched the code last :-) - I >know this patch didn't cause the problem, but because the code was >touched Coverity decided to look

Re: live migration is not using secondary interface

2020-12-18 Thread Martin Kletzander
On Fri, Dec 18, 2020 at 10:42:16PM +0100, Olaf Hering wrote: Am Fri, 18 Dec 2020 21:09:45 +0100 schrieb Martin Kletzander : I am guessing you want to `--migrateuri`, possibly with `--listen-address`. Not sure if I really _want_ all these extra knobs. The intent is clear and obvious, the

Re: live migration is not using secondary interface

2020-12-18 Thread Olaf Hering
Am Fri, 18 Dec 2020 21:09:45 +0100 schrieb Martin Kletzander : > I am guessing you want to `--migrateuri`, possibly with `--listen-address`. Not sure if I really _want_ all these extra knobs. The intent is clear and obvious, the connection needs to go to the specified host and/or IP address.

Re: RFC PATCH: Issue 90 (Test Clarification)

2020-12-18 Thread Ryan Gahagan
On Thu, Dec 17, 2020 at 8:00 AM Peter Krempa wrote: > Also note that the upstream test-suite run in the CI does actually > provide the expected output. Obviously you can't use the ENV variable to > automatically overwrite your files, but you certainly can copy out the > diffs from the CI. Just

Re: live migration is not using secondary interface

2020-12-18 Thread Martin Kletzander
On Wed, Dec 16, 2020 at 08:34:29PM +0100, Olaf Hering wrote: A naive 'virsh migrate --live domU xen+tcp://cross-over-ip' uses the ordinary uplink instead of the requested IP address. According to the documentation an additional option has to be specified to really use the other network

Re: [libvirt PATCH 00/29] Refactor scripts in tests/cputestdata

2020-12-18 Thread Michal Prívozník
On 12/15/20 5:24 PM, Tim Wiederhake wrote: This series refactors the various scripts found in tests/cputestdata and adds support for CORE_CAPABILITY MSR, as found on e.g. SnowRidge. Acquiring test data on a new system is a two step process. "cpu-gather.sh" gathers information on the target

Re: [libvirt PATCH 07/29] cpu-gather: Move msr decoding to new script

2020-12-18 Thread Michal Prívozník
On 12/15/20 5:24 PM, Tim Wiederhake wrote: Fixes the leaking file descriptors. Does not silently ignore errors (e.g. permission denied on /dev/cpu/0/msr if run as non-root) and always attempt to read from /dev/kvm if /dev/cpu/0/msr failed. 'gather_msr()' returns a dictionary of values, as a

Re: [libvirt PATCH 02/29] cpu-gather: Create python wrapper for shell script

2020-12-18 Thread Michal Prívozník
On 12/15/20 5:24 PM, Tim Wiederhake wrote: This changes the invocation from ./cpu-gather.sh | ./cpu-parse.sh to ./cpu-gather.py | ./cpu-parse.sh Signed-off-by: Tim Wiederhake --- tests/cputestdata/cpu-gather.py | 13 + tests/cputestdata/cpu-gather.sh | 5 + 2 files

Re: [libvirt PATCH 0/2] Schema fixes for virsh [hypervisor-]cpu-compare

2020-12-18 Thread Michal Prívozník
On 12/15/20 1:16 PM, Tim Wiederhake wrote: See individual commit messages for more details. Tim Wiederhake (2): schemas: Deduplicate cpuTopology in cputypes.rng schema: Allow counter element in host cpu definition docs/schemas/cputypes.rng | 15 +-- 1 file changed, 9

[PATCH 03/10] virlease: Rework virLeaseReadCustomLeaseFile()

2020-12-18 Thread Michal Privoznik
There are some variables which are used only inside the single loop the function has. Let's declare them inside the loop body to make that obvious. Also, fix indendation. Signed-off-by: Michal Privoznik --- src/util/virlease.c | 15 --- 1 file changed, 8 insertions(+), 7

[PATCH 05/10] virlease: Allow infinite lease expiry time

2020-12-18 Thread Michal Privoznik
When adding a new lease by our leaseshelper then virLeaseNew() is called. Here, we check for DNSMASQ_LEASE_EXPIRES environment variable which is the expiration time for the lease. For infinite lease time the value is zero. However, our code is not prepared for that and adds "expiry-time" into the

[PATCH 10/10] nss: handle leases with infinite expiry time

2020-12-18 Thread Michal Privoznik
After v6.3.0-rc1~64 a lease can have infinite expiry time. This means that the expiration time will appear as a value of zero. Do the expiration check only if the expiration time is not zero. Fixes: 97a0aa246799c97d0a9ca9ecd6b4fd932ae4756c Signed-off-by: Michal Privoznik ---

[PATCH 08/10] network: Rework networkGetDHCPLeases()

2020-12-18 Thread Michal Privoznik
Firstly, bring variables that are used only within loops into their respective loops. Secondly, drop 'error' label which is redundant since we have @rv which holds the return value. Thirdly, fix indendation in one case, the rest is indented properly. Signed-off-by: Michal Privoznik ---

[PATCH 02/10] leaseshelper: Report errors on failure

2020-12-18 Thread Michal Privoznik
If leasehelper fails all that we are left with is a simple error message produced by dnsmasq: lease-init script returned exit code 1 This is because the leasehelper did not write any message to stderr. According to dnsmasq's manpage, whenever it's invoking leasehelper the stderr is kept open:

[PATCH 01/10] docs: Document ability to configure lease time

2020-12-18 Thread Michal Privoznik
In v6.3.0-rc1~64 we've introduced ability to configure lease time, but forgot to document the feature. Let's fix that. Fixes: 97a0aa246799c97d0a9ca9ecd6b4fd932ae4756c Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1908631 Signed-off-by: Michal Privoznik --- docs/formatnetwork.html.in |

[PATCH 09/10] networkGetDHCPLeases: Handle leases with infinite expiry time

2020-12-18 Thread Michal Privoznik
After v6.3.0-rc1~64 a lease can have infinite expiry time. This means that the expiration time will appear as a value of zero. Do the expiration check only if the expiration time is not zero. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1908053 Fixes:

[PATCH 07/10] networkGetDHCPLeases: Use VIR_APPEND_ELEMENT() instead of VIR_INSERT_ELEMENT()

2020-12-18 Thread Michal Privoznik
This function is misusing VIR_INSERT_ELEMENT() to behave like VIR_APPEND_ELEMENT(). Use the latter to make it explicit what we are trying to achieve. Signed-off-by: Michal Privoznik --- src/network/bridge_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 04/10] virlease: Use virTrimSpaces() instead of open coded alternative

2020-12-18 Thread Michal Privoznik
In virLeaseNew() we are trying to remove trailing space (per comment it may happen that older versions of dnsmasq put it into an env variable). Well, instead of open coding it, we can use virTrimSpaces(). Signed-off-by: Michal Privoznik --- src/util/virlease.c | 3 +-- 1 file changed, 1

[PATCH 06/10] network: Drop @custom_lease_file_len variable from networkGetDHCPLeases()

2020-12-18 Thread Michal Privoznik
We don't need to track the lease file size. Instead, we can simply check if the file was empty by comparing the buffer the file was read into with an empty string. Signed-off-by: Michal Privoznik --- src/network/bridge_driver.c | 34 ++ 1 file changed, 18

[PATCH 00/10] Fix NSS plugin and net-dhcp-get-leases wrt to infinite leases

2020-12-18 Thread Michal Privoznik
Some things are broken when using leases that don't expire. We don't store "expiry-time" in corresponding $brname.status file which sets off a spiral and we get errors from other places which expect it to be there always. These patches make sure that the attribute is always there. I've also

Re: [PATCHv3 3/3] lxc: fix a memory leak

2020-12-18 Thread John Ferlan
Coverity reminds us of the ancient software engineering proverb related to being stuck with ownership because you touched the code last :-) - I know this patch didn't cause the problem, but because the code was touched Coverity decided to look harder and found another leak. On 12/16/20 1:01 AM,

[PATCH v3 3/4] qemu: adopt to VIR_DRV_SUPPORTS_FEATURE return -1

2020-12-18 Thread Nikolay Shirokovskiy
Otherwise in some places we can mistakenly report 'unsupported' error instead of root cause. So let's handle root cause explicitly from the macro. Signed-off-by: Nikolay Shirokovskiy --- src/qemu/qemu_migration.c | 33 ++--- 1 file changed, 22 insertions(+), 11

[PATCH v3 1/4] src: adopt to VIR_DRV_SUPPORTS_FEATURE return -1

2020-12-18 Thread Nikolay Shirokovskiy
Otherwise in some places we can mistakenly report 'unsupported' error instead of root cause. So let's handle root cause explicitly from the macro. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 511 ++- src/libvirt-host.c | 18

[PATCH v3 2/4] libxl: adopt to VIR_DRV_SUPPORTS_FEATURE return -1

2020-12-18 Thread Nikolay Shirokovskiy
Otherwise in some places we can mistakenly report 'unsupported' error instead of root cause. So let's handle root cause explicitly from the macro. Signed-off-by: Nikolay Shirokovskiy --- src/libxl/libxl_migration.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git

[PATCH v3 4/4] src: don't hide error in VIR_DRV_SUPPORTS_FEATURE

2020-12-18 Thread Nikolay Shirokovskiy
Otherwise we can get misleading error messages. One example is when connection is broken we got "this function is not supported by the connection driver: virDomainMigrate3" from virDomainMigrate3. Signed-off-by: Nikolay Shirokovskiy --- src/driver.h | 9 +++-- 1 file changed, 3

[PATCH v3 0/4] handle error in feature testing

2020-12-18 Thread Nikolay Shirokovskiy
Justification is in the last patch. Diff to v2 [1]: - instead of RFC where fix was applied only to virMigrate3 now all the places where VIR_DRV_SUPPORTS_FEATURE is used patched to handle errors [1] [RFC PATCH v2] fix error message in virMigrate3 if connection is broken

Re: Ping: [PATCH] Qemu: migration: Not bind RAM info with active migration status

2020-12-18 Thread Keqian Zhu
Hi Daniel and Jiri, On 2020/12/8 18:31, Jiri Denemark wrote: > On Tue, Dec 08, 2020 at 09:27:39 +, Daniel P. Berrangé wrote: >> On Tue, Dec 08, 2020 at 10:06:25AM +0800, zhukeqian wrote: >>> >>> On 2020/12/7 18:38, Daniel P. Berrangé wrote: On Mon, Dec 07, 2020 at 09:55:53AM +0800,