Re: [PATCH v4 0/4] yank: Add chardev tests and fixes

2021-03-26 Thread Lukas Straub
.new_yank = > (_new_yank),\ > + .fail = true }, > \ > + char_change_test); > > total: 1 errors, 0 warnings, 215 lines checked This is expected. It needs to be this way so the

[PATCH v4 3/4] chardev: Fix yank with the chardev-change case

2021-03-26 Thread Lukas Straub
stance as they are initialized via chardev_new() qemu_char_open() cc->open() (qmp_chardev_open_socket()). Signed-off-by: Lukas Straub Tested-by: Li Zhang --- chardev/char-socket.c | 20 +--- chardev/char.c | 35 --- include/chardev/char.h | 3 +++

[PATCH v4 4/4] tests: Add tests for yank with the chardev-change case

2021-03-26 Thread Lukas Straub
Add tests for yank with the chardev-change case. Signed-off-by: Lukas Straub --- MAINTAINERS| 1 + tests/unit/meson.build | 3 +- tests/unit/test-yank.c | 199 + 3 files changed, 202 insertions(+), 1 deletion(-) create mode 100644 tests

[PATCH v4 1/4] chardev/char.c: Move object_property_try_add_child out of chardev_new

2021-03-26 Thread Lukas Straub
Move object_property_try_add_child out of chardev_new into it's callers. This is a preparation for the next patches to fix yank with the chardev-change case. Signed-off-by: Lukas Straub Reviewed-by: Marc-André Lureau Tested-by: Li Zhang --- chardev/char.c | 42

[PATCH v4 2/4] chardev/char.c: Always pass id to chardev_new

2021-03-26 Thread Lukas Straub
to register a yank instance. This in turn tries to dereference the NULL-pointer. Signed-off-by: Lukas Straub Reviewed-by: Marc-André Lureau Tested-by: Li Zhang --- chardev/char.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chardev/char.c b/chardev/char.c index 48f321b3e1

[PATCH v4 0/4] yank: Add chardev tests and fixes

2021-03-26 Thread Lukas Straub
Hello Everyone, These patches increase test coverage for yank, add tests and fix bugs and crashes in yank in combination with chardev-change. Please Review. Regards, Lukas Straub Changes: -v4: -test: fix CharChangeTestConfig structs on stack going out of scope -test: move after bugfixes -v3

Re: [PATCH v3 1/4] tests: Add tests for yank with the chardev-change case

2021-03-25 Thread Lukas Straub
On Fri, 26 Mar 2021 00:36:45 +0400 Marc-André Lureau wrote: > Hi > > On Tue, Mar 23, 2021 at 9:57 PM Lukas Straub wrote: > > > Add tests for yank with the chardev-change case. > > > > Signed-off-by: Lukas Straub > > --- > > MAINTAINERS

Re: [PATCH v3 0/4] yank: Add chardev tests and fixes

2021-03-25 Thread Lukas Straub
On Tue, 23 Mar 2021 18:57:32 +0100 Lukas Straub wrote: > Hello Everyone, > These patches increase test coverage for yank, add tests and fix bugs and > crashes in yank in combination with chardev-change. > Please Review. > > Regards, > Lukas Straub > > Changes: > -

Re: [PATCH 0/2] yank: Always link full yank code

2021-03-24 Thread Lukas Straub
On Wed, 24 Mar 2021 11:36:13 + Daniel P. Berrangé wrote: > On Wed, Mar 24, 2021 at 12:22:42PM +0100, Lukas Straub wrote: > > On Tue, 23 Mar 2021 19:09:15 + > > Daniel P. Berrangé wrote: > > > > > On Tue, Mar 23, 2021 at 06:52:19PM +0100, Lukas Straub w

Re: [PATCH 0/2] yank: Always link full yank code

2021-03-24 Thread Lukas Straub
On Tue, 23 Mar 2021 19:09:15 + Daniel P. Berrangé wrote: > On Tue, Mar 23, 2021 at 06:52:19PM +0100, Lukas Straub wrote: > > Hello Everyone, > > These patches remove yank's dependency on qiochannel and always link it in. > > Please Review. > > It would be

[PATCH v3 4/4] chardev: Fix yank with the chardev-change case

2021-03-23 Thread Lukas Straub
stance as they are initialized via chardev_new() qemu_char_open() cc->open() (qmp_chardev_open_socket()). Signed-off-by: Lukas Straub Tested-by: Li Zhang --- chardev/char-socket.c | 20 +--- chardev/char.c | 35 --- include/chardev/char.h | 3 +++

[PATCH v3 3/4] chardev/char.c: Always pass id to chardev_new

2021-03-23 Thread Lukas Straub
to register a yank instance. This in turn tries to dereference the NULL-pointer. Signed-off-by: Lukas Straub Reviewed-by: Marc-André Lureau Tested-by: Li Zhang --- chardev/char.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chardev/char.c b/chardev/char.c index 48f321b3e1

[PATCH v3 0/4] yank: Add chardev tests and fixes

2021-03-23 Thread Lukas Straub
Hello Everyone, These patches increase test coverage for yank, add tests and fix bugs and crashes in yank in combination with chardev-change. Please Review. Regards, Lukas Straub Changes: -v3: -Base on ([PATCH 0/2] yank: Always link full yank code) -Drop patch 1 (tests: Use the normal yank

[PATCH v3 2/4] chardev/char.c: Move object_property_try_add_child out of chardev_new

2021-03-23 Thread Lukas Straub
Move object_property_try_add_child out of chardev_new into it's callers. This is a preparation for the next patches to fix yank with the chardev-change case. Signed-off-by: Lukas Straub Reviewed-by: Marc-André Lureau Tested-by: Li Zhang --- chardev/char.c | 42

[PATCH 0/2] yank: Always link full yank code

2021-03-23 Thread Lukas Straub
Hello Everyone, These patches remove yank's dependency on qiochannel and always link it in. Please Review. Regards, Lukas Straub Lukas Straub (2): yank: Remove dependency on qiochannel yank: Always link full yank code MAINTAINERS | 2 +- chardev/char-socket.c

[PATCH v3 1/4] tests: Add tests for yank with the chardev-change case

2021-03-23 Thread Lukas Straub
Add tests for yank with the chardev-change case. Signed-off-by: Lukas Straub --- MAINTAINERS| 1 + tests/unit/meson.build | 3 +- tests/unit/test-yank.c | 201 + 3 files changed, 204 insertions(+), 1 deletion(-) create mode 100644 tests

[PATCH 2/2] yank: Always link full yank code

2021-03-23 Thread Lukas Straub
Yank now only depends on util and can be always linked in. Also remove the stubs as they are not needed anymore. Signed-off-by: Lukas Straub --- MAINTAINERS | 1 - stubs/meson.build | 1 - stubs/yank.c | 23 --- util/meson.build | 2 +- 4 files changed, 1

[PATCH 1/2] yank: Remove dependency on qiochannel

2021-03-23 Thread Lukas Straub
Remove dependency on qiochannel by removing yank_generic_iochannel and letting migration and chardev use their own yank function for iochannel. Signed-off-by: Lukas Straub --- MAINTAINERS | 1 + chardev/char-socket.c | 21 ++--- include/qemu/yank.h

Re: [PATCH 1/5] tests: Use the normal yank code instead of stubs in relevant tests

2021-03-23 Thread Lukas Straub
On Tue, 23 Mar 2021 05:46:24 +0100 Thomas Huth wrote: > On 22/03/2021 18.48, Lukas Straub wrote: > > On Mon, 22 Mar 2021 17:00:23 +0100 > > Thomas Huth wrote: > > > >> On 22/03/2021 08.35, Lukas Straub wrote: > >>> On Mon, 22 Mar 20

Re: [PATCH 1/5] tests: Use the normal yank code instead of stubs in relevant tests

2021-03-22 Thread Lukas Straub
On Mon, 22 Mar 2021 17:00:23 +0100 Thomas Huth wrote: > On 22/03/2021 08.35, Lukas Straub wrote: > > On Mon, 22 Mar 2021 06:20:50 +0100 > > Thomas Huth wrote: > > > >> On 22/03/2021 00.31, Lukas Straub wrote: > >>> Use the normal ya

[PATCH v2 3/5] chardev/char.c: Move object_property_try_add_child out of chardev_new

2021-03-22 Thread Lukas Straub
Move object_property_try_add_child out of chardev_new into it's callers. This is a preparation for the next patches to fix yank with the chardev-change case. Signed-off-by: Lukas Straub Reviewed-by: Marc-André Lureau Tested-by: Li Zhang --- chardev/char.c | 42

[PATCH v2 2/5] tests: Add tests for yank with the chardev-change case

2021-03-22 Thread Lukas Straub
Add tests for yank with the chardev-change case. Signed-off-by: Lukas Straub --- MAINTAINERS| 1 + tests/unit/meson.build | 3 +- tests/unit/test-yank.c | 201 + 3 files changed, 204 insertions(+), 1 deletion(-) create mode 100644 tests

[PATCH v2 4/5] chardev/char.c: Always pass id to chardev_new

2021-03-22 Thread Lukas Straub
to register a yank instance. This in turn tries to dereference the NULL-pointer. Signed-off-by: Lukas Straub Reviewed-by: Marc-André Lureau Tested-by: Li Zhang --- chardev/char.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chardev/char.c b/chardev/char.c index 1584865027

[PATCH v2 1/5] tests: Use the normal yank code instead of stubs in relevant tests

2021-03-22 Thread Lukas Straub
Use the normal yank code instead of stubs in relevant tests to increase coverage and to ensure that registering and unregistering of yank instances and functions is done correctly. Signed-off-by: Lukas Straub --- tests/qtest/meson.build | 6 +++--- tests/unit/meson.build | 4 ++-- 2 files

[PATCH v2 5/5] chardev: Fix yank with the chardev-change case

2021-03-22 Thread Lukas Straub
stance as they are initialized via chardev_new() qemu_char_open() cc->open() (qmp_chardev_open_socket()). Signed-off-by: Lukas Straub Tested-by: Li Zhang --- chardev/char-socket.c | 20 +--- chardev/char.c | 35 --- include/chardev/char.h | 3 +++

[PATCH v2 0/5] yank: Add chardev tests and fixes

2021-03-22 Thread Lukas Straub
Hello Everyone, These patches increase test coverage for yank, add tests and fix bugs and crashes in yank in combination with chardev-change. Regards, Lukas Straub Changes: -v2: -test: add license -test: factorize testcases to a single function -test: test chardev_change with initialization

Re: [PATCH 1/5] tests: Use the normal yank code instead of stubs in relevant tests

2021-03-22 Thread Lukas Straub
On Mon, 22 Mar 2021 06:20:50 +0100 Thomas Huth wrote: > On 22/03/2021 00.31, Lukas Straub wrote: > > Use the normal yank code instead of stubs in relevant tests to > > increase coverage and to ensure that registering and unregistering > > of yank instances and functi

[PATCH 3/5] chardev/char.c: Move object_property_try_add_child out of chardev_new

2021-03-21 Thread Lukas Straub
Move object_property_try_add_child out of chardev_new into it's callers. This is a preparation for the next patches to fix yank with the chardev-change case. Signed-off-by: Lukas Straub --- chardev/char.c | 42 -- 1 file changed, 24 insertions(+), 18

[PATCH 4/5] chardev/char.c: Always pass id to chardev_new

2021-03-21 Thread Lukas Straub
to register a yank instance. This in turn tries to dereference the NULL-pointer. Signed-off-by: Lukas Straub --- chardev/char.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chardev/char.c b/chardev/char.c index 1584865027..ad416c0714 100644 --- a/chardev/char.c +++ b/chardev

[PATCH 1/5] tests: Use the normal yank code instead of stubs in relevant tests

2021-03-21 Thread Lukas Straub
Use the normal yank code instead of stubs in relevant tests to increase coverage and to ensure that registering and unregistering of yank instances and functions is done correctly. Signed-off-by: Lukas Straub --- tests/qtest/meson.build | 6 +++--- tests/unit/meson.build | 4 ++-- 2 files

[PATCH 5/5] chardev: Fix yank with the chardev-change case

2021-03-21 Thread Lukas Straub
->registered_yank is always true here, as chardev-change only works on user-visible chardevs and those are guraranteed to register a yank instance as they are initialized via chardev_new() qemu_char_open() cc->open() (qmp_chardev_open_socket()). Signed-off-by: Lukas Straub --- chardev/char-socket.c

[PATCH 2/5] tests: Add tests for yank with the chardev-change

2021-03-21 Thread Lukas Straub
Add tests for yank with the chardev-change case. Signed-off-by: Lukas Straub --- MAINTAINERS| 1 + tests/unit/meson.build | 3 +- tests/unit/test-yank.c | 240 + 3 files changed, 243 insertions(+), 1 deletion(-) create mode 100644 tests

[PATCH 0/5] yank: Add chardev tests and fixes

2021-03-21 Thread Lukas Straub
Hello Everyone, These patches increase test coverage for yank, add tests and fix bugs and crashes in yank in combination with chardev-change. Regards, Lukas Straub Based-on: <20210316135907.3646901-1-arm...@redhat.com> ([PATCH] yank: Avoid linking into executables that don'

Re: [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packet

2021-03-17 Thread Lukas Straub
Hi, This hasn't been merged yet. Regards, Lukas Straub On Mon, 16 Nov 2020 07:32:22 + "Zhang, Chen" wrote: > Queued this series to COLO tree. > > Thanks > Chen > > > -Original Message- > > From: Lukas Straub > > Sent: Sunday, November

Re: [PATCH V2 6/7] net/colo-compare: Add passthrough list to CompareState

2021-03-17 Thread Lukas Straub
bypass->dst_ip.s_addr == key.dst.s_addr) { > +packet_destroy(pkt, NULL); > +pkt = NULL; > +return -1; > +} > + } &

Re: [PATCH 1/2] Fix the segment fault when calling yank_register_instance

2021-03-17 Thread Lukas Straub
qemu_char_open -> > cc->open -> > qmp_chardev_open_socket -> > yank_register_instance Oh, I didn't consider the chardev-change case. I'll look into it. Regards, Lukas Straub -- pgpTi79S8Go4I.pgp Description: OpenPGP digital signature

Re: [PATCH] yank: Avoid linking into executables that don't want it

2021-03-17 Thread Lukas Straub
; diff --git a/util/yank.c b/monitor/yank.c > similarity index 100% > rename from util/yank.c > rename to monitor/yank.c > diff --git a/MAINTAINERS b/MAINTAINERS > index 5ca3c9f851..d3174c0bb0 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -2799,7 +2799,7 @@ F: tests/u

Re: [PATCH 00/10] Fixed some bugs and optimized some codes for COLO

2021-02-14 Thread Lukas Straub
to me. Can you address my comments and send v2? I'll then run my test-suite over it and give you Reviewed-by for the whole series. Also, you should split this into two patch series: One for network and one for migration, so the respective maintainers can take it trough their trees. Regard

Re: [PATCH 02/10] Fix the qemu crash when guest shutdown during checkpoint

2021-02-14 Thread Lukas Straub
heckpoint_transaction will call vm_start() again, which does 'shutdown' -> 'running' and (rightfully) crashes. So I think it is better to crash here too. > By the way. Do you have any comments about other patches? > Thanks, > Lei. > > -Original Message- > From: Lukas

Re: [PATCH 07/10] Disable auto-coverge before entering COLO mode.

2021-02-14 Thread Lukas Straub
On Wed, 13 Jan 2021 10:46:32 +0800 leirao wrote: > From: "Rao, Lei" > > If we don't disable the feature of auto-converge for live migration > before entering COLO mode, it will continue to run with COLO running, > and eventually the system will hang due to the CPU throttle reaching >

[PATCH v4 6/6] MAINTAINERS: Add myself as maintainer for COLO resource agent

2021-02-07 Thread Lukas Straub
Signed-off-by: Lukas Straub --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8d8b0bf966..d04567aa4d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2773,6 +2773,12 @@ F: net/colo* F: net/filter-rewriter.c F: net/filter-mirror.c +COLO

[PATCH v4 3/6] colo: Introduce resource agent

2021-02-07 Thread Lukas Straub
Introduce a resource agent which can be used to manage qemu COLO in a pacemaker cluster. Signed-off-by: Lukas Straub --- scripts/colo-resource-agent/colo | 1527 ++ 1 file changed, 1527 insertions(+) create mode 100755 scripts/colo-resource-agent/colo diff --git

[PATCH v4 4/6] colo: Introduce high-level test suite

2021-02-07 Thread Lukas Straub
Add high-level test relying on the colo resource-agent to test all failover cases while checking guest network connectivity. Signed-off-by: Lukas Straub --- scripts/colo-resource-agent/crm_master | 44 ++ scripts/colo-resource-agent/crm_resource | 12 + tests/acceptance/colo.py

[PATCH v4 2/6] boot_linux.py: Use pick_qemu_util

2021-02-07 Thread Lukas Straub
Replace duplicate code with pick_qemu_util. Signed-off-by: Lukas Straub --- tests/acceptance/boot_linux.py | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/tests/acceptance/boot_linux.py b/tests/acceptance/boot_linux.py index 1da4a53d6a..38029f8c70 100644

[PATCH v4 5/6] configure,Makefile: Install colo resource-agent

2021-02-07 Thread Lukas Straub
Optionally install the resouce-agent so it gets picked up by pacemaker. Signed-off-by: Lukas Straub --- configure | 7 +++ meson.build | 5 + meson_options.txt | 2 ++ 3 files changed, 14 insertions(+) diff --git a/configure b/configure index a34f91171d..54fc7e533f 100755

[PATCH v4 1/6] avocado_qemu: Introduce pick_qemu_util to pick qemu utility binaries

2021-02-07 Thread Lukas Straub
This introduces a generic function to pick qemu utility binaries from the build dir, system or via test parameter. Signed-off-by: Lukas Straub --- tests/acceptance/avocado_qemu/__init__.py | 15 +++ 1 file changed, 15 insertions(+) diff --git a/tests/acceptance/avocado_qemu

[PATCH v4 0/6] colo: Introduce resource agent and test suite/CI

2021-02-07 Thread Lukas Straub
Hello Everyone, So here is v4. Regards, Lukas Straub Changes: v4: -use new yank api that finally has been merged -cleanup the test a bit by using numbers instead of "hosta" and "hostb" -resource-agent: Don't set master-score to 0 on invalid configuration v3: -r

Re: [PATCH 02/10] Fix the qemu crash when guest shutdown during checkpoint

2021-01-27 Thread Lukas Straub
FINISH_MIGRATE)) { > runstate_set(RUN_STATE_POSTMIGRATE); > > I will send the patch to community after more test. > > Thanks, > Lei. > > -Original Message- > From: Lukas Straub > Sent: Thursday, January 21, 2021

Re: [PATCH 05/10] Optimize the function of packet_new

2021-01-20 Thread Lukas Straub
-by: Lei Rao Looks good to me, Reviewed-by: Lukas Straub > --- > net/colo-compare.c| 7 +-- > net/colo.c| 4 ++-- > net/colo.h| 2 +- > net/filter-rewriter.c | 1 - > 4 files changed, 8 insertions(+), 6 deletions(-) > > diff --git a/net/colo-

Re: [PATCH 04/10] Remove migrate_set_block_enabled in checkpoint

2021-01-20 Thread Lukas Straub
. > > Signed-off-by: Lei Rao > Signed-off-by: Zhang Chen Looks good to me, Reviewed-by: Lukas Straub > --- > migration/colo.c | 6 -- > migration/migration.c | 4 > 2 files changed, 4 insertions(+), 6 deletions(-) > > diff --git a/migration/colo.

Re: [PATCH 03/10] Optimize the function of filter_send

2021-01-20 Thread Lukas Straub
On Wed, 13 Jan 2021 10:46:28 +0800 leirao wrote: > From: "Rao, Lei" > > The iov_size has been calculated in filter_send(). we can directly > return the size.In this way, this is no need to repeat calculations > in filter_redirector_receive_iov(); > > Signed-off-by: Lei Rao > --- >

Re: [PATCH 02/10] Fix the qemu crash when guest shutdown during checkpoint

2021-01-20 Thread Lukas Straub
On Wed, 13 Jan 2021 10:46:27 +0800 leirao wrote: > From: "Rao, Lei" > > This patch fixes the following: > qemu-system-x86_64: invalid runstate transition: 'colo' ->'shutdown' > Aborted (core dumped) > > Signed-off-by: Lei Rao I wonder how that is possible, since the VM is stopped

Re: [PATCH 01/10] Remove some duplicate trace code.

2021-01-20 Thread Lukas Straub
On Wed, 13 Jan 2021 10:46:26 +0800 leirao wrote: > From: "Rao, Lei" > > There is the same trace code in the colo_compare_packet_payload. > > Signed-off-by: Lei Rao Looks good to me, Reviewed-by: Lukas Straub > --- > net/colo-compare.c | 13 -

Re: [PATCH 3/3] net/colo-compare: Add handler for passthrough connection

2021-01-15 Thread Lukas Straub
On Fri, 15 Jan 2021 09:07:47 + "Zhang, Chen" wrote: > > -Original Message- > > From: Lukas Straub > > Sent: Thursday, January 14, 2021 9:45 PM > > To: Zhang, Chen > > Cc: Jason Wang ; qemu-dev > de...@nongnu.org>; Eric Blake ; Dr

Re: [PATCH 3/3] net/colo-compare: Add handler for passthrough connection

2021-01-14 Thread Lukas Straub
On Thu, 24 Dec 2020 09:09:18 +0800 Zhang Chen wrote: > From: Zhang Chen > > Currently, we just use guest's TCP/UDP source port as the key > to bypass certain network traffic. > > Signed-off-by: Zhang Chen > --- > net/colo-compare.c | 49 ++ >

Re: [PATCH 3/3] net/colo-compare: Add handler for passthrough connection

2021-01-14 Thread Lukas Straub
On Thu, 24 Dec 2020 09:09:18 +0800 Zhang Chen wrote: > From: Zhang Chen > > Currently, we just use guest's TCP/UDP source port as the key > to bypass certain network traffic. > > Signed-off-by: Zhang Chen > --- > net/colo-compare.c | 49 ++ >

[PATCH] Fix build with new yank feature by adding stubs

2021-01-14 Thread Lukas Straub
Signed-off-by: Lukas Straub --- stubs/meson.build | 1 + stubs/yank.c | 29 + 2 files changed, 30 insertions(+) create mode 100644 stubs/yank.c diff --git a/stubs/meson.build b/stubs/meson.build index 80b1d81a31..1a656cd070 100644 --- a/stubs/meson.build +++ b

Re: [PULL 0/7] Yank patches patches for 2021-01-13

2021-01-14 Thread Lukas Straub
gt;>> for you to fetch changes up to 91d48e520a4a4f72e97aeb333029694f5d57cc93: > >>> > >>> tests/test-char.c: Wait for the chardev to connect in > >>> char_socket_client_dupid_test (2021-01-13 10:21:17 +0100) > >>> > >>>

Re: [PULL 0/7] Yank patches patches for 2021-01-13

2021-01-13 Thread Lukas Straub
> >> char_socket_client_dupid_test (2021-01-13 10:21:17 +0100) > >> > >> ---- > >> Yank patches patches for 2021-01-13 > >> > >> ---

Re: [PATCH v14 0/7] Introduce 'yank' oob qmp command to recover from hanging qemu

2021-01-13 Thread Lukas Straub
On Tue, 12 Jan 2021 17:20:54 +0100 Markus Armbruster wrote: > Queued. Thanks for persevering! > Great, Thanks! Regards, Lukas Straub -- pgp2UZF6HO_i7.pgp Description: OpenPGP digital signature

[PATCH v14 6/7] io: Document qmp oob suitability of qio_channel_shutdown and io_shutdown

2020-12-28 Thread Lukas Straub
Migration and yank code assume that qio_channel_shutdown is thread -safe and can be called from qmp oob handler. Document this after checking the code. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Reviewed-by: Daniel P. Berrangé --- include/io/channel.h | 5 - 1 file changed, 4

[PATCH v14 5/7] io/channel-tls.c: make qio_channel_tls_shutdown thread-safe

2020-12-28 Thread Lukas Straub
Make qio_channel_tls_shutdown thread-safe by using atomics when accessing tioc->shutdown. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Reviewed-by: Daniel P. Berrangé --- io/channel-tls.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/io/channel-tls.c b

[PATCH v14 7/7] tests/test-char.c: Wait for the chardev to connect in char_socket_client_dupid_test

2020-12-28 Thread Lukas Straub
yank_register_instance will abort, because the yank instance is already/still registered. Signed-off-by: Lukas Straub Reviewed-by: Daniel P. Berrangé --- tests/test-char.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test-char.c b/tests/test-char.c index 953e0d1c1f..41a76410d8 100644 --- a/tests

[PATCH v14 0/7] Introduce 'yank' oob qmp command to recover from hanging qemu

2020-12-28 Thread Lukas Straub
and qmp command to recover from these kinds of hangs. The different subsystems register callbacks which get executed with the yank command. For example the callback can shutdown() a socket. This is intended for the colo use-case, but it can be used for other things too of course. Regards, Lukas

[PATCH v14 3/7] chardev/char-socket.c: Add yank feature

2020-12-28 Thread Lukas Straub
Register a yank function to shutdown the socket on yank. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi --- chardev/char-socket.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/chardev/char-socket.c b/chardev/char-socket.c index 213a4c8dd0

[PATCH v14 4/7] migration: Add yank feature

2020-12-28 Thread Lukas Straub
Register yank functions on sockets to shut them down. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Acked-by: Dr. David Alan Gilbert --- migration/channel.c | 13 + migration/migration.c | 22 ++ migration/multifd.c | 10

[PATCH v14 1/7] Introduce yank feature

2020-12-28 Thread Lukas Straub
be queried by a 'query-yank' oob command. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Reviewed-by: Markus Armbruster --- MAINTAINERS | 7 ++ include/qemu/yank.h | 97 qapi/meson.build | 1 + qapi/qapi-schema.json | 1 + qapi/yank.json

[PATCH v14 2/7] block/nbd.c: Add yank feature

2020-12-28 Thread Lukas Straub
Register a yank function which shuts down the socket and sets s->state = NBD_CLIENT_QUIT. This is the same behaviour as if an error occured. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Reviewed-by: Eric Blake --- block/nbd.c |

[PATCH v13 7/7] tests/test-char.c: Wait for the chardev to connect in char_socket_client_dupid_test

2020-12-28 Thread Lukas Straub
yank_register_instance will abort, because the yank instance is already/still registered. Signed-off-by: Lukas Straub Reviewed-by: Daniel P. Berrangé --- tests/test-char.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test-char.c b/tests/test-char.c index 953e0d1c1f..41a76410d8 100644 --- a/tests

[PATCH v13 5/7] io/channel-tls.c: make qio_channel_tls_shutdown thread-safe

2020-12-28 Thread Lukas Straub
Make qio_channel_tls_shutdown thread-safe by using atomics when accessing tioc->shutdown. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Reviewed-by: Daniel P. Berrangé --- io/channel-tls.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/io/channel-tls.c b

[PATCH v13 6/7] io: Document qmp oob suitability of qio_channel_shutdown and io_shutdown

2020-12-28 Thread Lukas Straub
Migration and yank code assume that qio_channel_shutdown is thread -safe and can be called from qmp oob handler. Document this after checking the code. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Reviewed-by: Daniel P. Berrangé --- include/io/channel.h | 5 - 1 file changed, 4

[PATCH v13 1/7] Introduce yank feature

2020-12-28 Thread Lukas Straub
be queried by a 'query-yank' oob command. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Reviewed-by: Markus Armbruster --- MAINTAINERS | 7 ++ include/qemu/yank.h | 97 qapi/meson.build | 1 + qapi/qapi-schema.json | 1 + qapi/yank.json

[PATCH v13 4/7] migration: Add yank feature

2020-12-28 Thread Lukas Straub
Register yank functions on sockets to shut them down. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Acked-by: Dr. David Alan Gilbert --- migration/channel.c | 13 + migration/migration.c | 22 ++ migration/multifd.c | 10

[PATCH v13 3/7] chardev/char-socket.c: Add yank feature

2020-12-28 Thread Lukas Straub
Register a yank function to shutdown the socket on yank. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi --- chardev/char-socket.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/chardev/char-socket.c b/chardev/char-socket.c index 213a4c8dd0

[PATCH v13 2/7] block/nbd.c: Add yank feature

2020-12-28 Thread Lukas Straub
Register a yank function which shuts down the socket and sets s->state = NBD_CLIENT_QUIT. This is the same behaviour as if an error occured. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Reviewed-by: Eric Blake --- block/nbd.c |

[PATCH v13 0/7] Introduce 'yank' oob qmp command to recover from hanging qemu

2020-12-28 Thread Lukas Straub
er from these kinds of hangs. The different subsystems register callbacks which get executed with the yank command. For example the callback can shutdown() a socket. This is intended for the colo use-case, but it can be used for other things too of course. Regards, Lukas Straub Lukas Straub (7): Int

Re: [PATCH v12 1/7] Introduce yank feature

2020-12-28 Thread Lukas Straub
On Tue, 22 Dec 2020 12:00:29 +0400 Marc-André Lureau wrote: > On Sun, Dec 13, 2020 at 3:48 PM Lukas Straub wrote: > > > The yank feature allows to recover from hanging qemu by "yanking" > > at various parts. Other qemu systems can register themselves and > >

[PATCH v12 7/7] tests/test-char.c: Wait for the chardev to connect in char_socket_client_dupid_test

2020-12-13 Thread Lukas Straub
yank_register_instance will abort, because the yank instance is already/still registered. Signed-off-by: Lukas Straub Reviewed-by: Daniel P. Berrangé --- tests/test-char.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test-char.c b/tests/test-char.c index 953e0d1c1f..41a76410d8 100644 --- a/tests

[PATCH v12 5/7] io/channel-tls.c: make qio_channel_tls_shutdown thread-safe

2020-12-13 Thread Lukas Straub
Make qio_channel_tls_shutdown thread-safe by using atomics when accessing tioc->shutdown. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Reviewed-by: Daniel P. Berrangé --- io/channel-tls.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/io/channel-tls.c b

[PATCH v12 6/7] io: Document qmp oob suitability of qio_channel_shutdown and io_shutdown

2020-12-13 Thread Lukas Straub
Migration and yank code assume that qio_channel_shutdown is thread -safe and can be called from qmp oob handler. Document this after checking the code. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Reviewed-by: Daniel P. Berrangé --- include/io/channel.h | 5 - 1 file changed, 4

[PATCH v12 4/7] migration: Add yank feature

2020-12-13 Thread Lukas Straub
Register yank functions on sockets to shut them down. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Acked-by: Dr. David Alan Gilbert --- migration/channel.c | 13 + migration/migration.c | 24 migration/multifd.c | 10

[PATCH v12 3/7] chardev/char-socket.c: Add yank feature

2020-12-13 Thread Lukas Straub
Register a yank function to shutdown the socket on yank. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi --- chardev/char-socket.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/chardev/char-socket.c b/chardev/char-socket.c index 213a4c8dd0

[PATCH v12 0/7] Introduce 'yank' oob qmp command to recover from hanging qemu

2020-12-13 Thread Lukas Straub
atches introduce the new 'yank' out-of-band qmp command to recover from these kinds of hangs. The different subsystems register callbacks which get executed with the yank command. For example the callback can shutdown() a socket. This is intended for the colo use-case, but it can be used for other t

[PATCH v12 2/7] block/nbd.c: Add yank feature

2020-12-13 Thread Lukas Straub
Register a yank function which shuts down the socket and sets s->state = NBD_CLIENT_QUIT. This is the same behaviour as if an error occured. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Reviewed-by: Eric Blake --- block/nbd.c |

[PATCH v12 1/7] Introduce yank feature

2020-12-13 Thread Lukas Straub
be queried by a 'query-yank' oob command. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Reviewed-by: Markus Armbruster --- MAINTAINERS | 7 ++ include/qemu/yank.h | 95 +++ qapi/meson.build | 1 + qapi/qapi-schema.json | 1 + qapi/yank.json

Re: [PATCH v11 2/7] block/nbd.c: Add yank feature

2020-12-02 Thread Lukas Straub
On Wed, 2 Dec 2020 15:18:48 +0300 Vladimir Sementsov-Ogievskiy wrote: > 15.11.2020 14:36, Lukas Straub wrote: > > Register a yank function which shuts down the socket and sets > > s->state = NBD_CLIENT_QUIT. This is the same behaviour as if an > > error occured. >

[PATCH v11 7/7] tests/test-char.c: Wait for the chardev to connect in char_socket_client_dupid_test

2020-11-15 Thread Lukas Straub
yank_register_instance will abort, because the yank instance is already/still registered. Signed-off-by: Lukas Straub Reviewed-by: Daniel P. Berrangé --- tests/test-char.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test-char.c b/tests/test-char.c index 9196e566e9..aedb5c9eda 100644 --- a/tests

[PATCH v11 5/7] io/channel-tls.c: make qio_channel_tls_shutdown thread-safe

2020-11-15 Thread Lukas Straub
Make qio_channel_tls_shutdown thread-safe by using atomics when accessing tioc->shutdown. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Reviewed-by: Daniel P. Berrangé --- io/channel-tls.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/io/channel-tls.c b

[PATCH v11 6/7] io: Document qmp oob suitability of qio_channel_shutdown and io_shutdown

2020-11-15 Thread Lukas Straub
Migration and yank code assume that qio_channel_shutdown is thread -safe and can be called from qmp oob handler. Document this after checking the code. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Reviewed-by: Daniel P. Berrangé --- include/io/channel.h | 5 - 1 file changed, 4

[PATCH v11 4/7] migration: Add yank feature

2020-11-15 Thread Lukas Straub
Register yank functions on sockets to shut them down. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Acked-by: Dr. David Alan Gilbert --- migration/channel.c | 13 + migration/migration.c | 25 + migration/multifd.c | 10

[PATCH v11 1/7] Introduce yank feature

2020-11-15 Thread Lukas Straub
be queried by a 'query-yank' oob command. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Reviewed-by: Markus Armbruster --- MAINTAINERS | 7 ++ include/qemu/yank.h | 95 +++ qapi/meson.build | 1 + qapi/qapi-schema.json | 1 + qapi/yank.json

[PATCH v11 3/7] chardev/char-socket.c: Add yank feature

2020-11-15 Thread Lukas Straub
Register a yank function to shutdown the socket on yank. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi --- chardev/char-socket.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/chardev/char-socket.c b/chardev/char-socket.c index 213a4c8dd0

[PATCH v11 2/7] block/nbd.c: Add yank feature

2020-11-15 Thread Lukas Straub
Register a yank function which shuts down the socket and sets s->state = NBD_CLIENT_QUIT. This is the same behaviour as if an error occured. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi --- block/nbd.c | 154 +++- 1 file changed,

[PATCH v11 0/7] Introduce 'yank' oob qmp command to recover from hanging qemu

2020-11-15 Thread Lukas Straub
which get executed with the yank command. For example the callback can shutdown() a socket. This is intended for the colo use-case, but it can be used for other things too of course. Regards, Lukas Straub Lukas Straub (7): Introduce yank feature block/nbd.c: Add yank feature chardev/char-socke

[PATCH 2/2] net/colo-compare.c: Optimize removal of secondary packet

2020-11-15 Thread Lukas Straub
g_queue_remove needs to look up the list entry first, but we already have it as result and can remove it directly with g_queue_delete_link. Signed-off-by: Lukas Straub --- net/colo-compare.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/colo-compare.c b/net/colo

[PATCH 1/2] net/colo-compare.c: Fix memory leak for non-tcp packet

2020-11-15 Thread Lukas Straub
Additional to removing the packet from the secondary queue, we also need to free it. Signed-off-by: Lukas Straub --- net/colo-compare.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/colo-compare.c b/net/colo-compare.c index 337025b44f..eed0fbb27b 100644 --- a/net/colo-compare.c +++ b

[PATCH 0/2] colo-compare: Fix memory leak for non-tcp packet

2020-11-15 Thread Lukas Straub
Hello Everyone, This fixes a memory leak for non-tcp packets and optimizes the removal from the queue. Lukas Straub (2): net/colo-compare.c: Fix memory leak for non-tcp packet net/colo-compare.c: Optimize removal of secondary packet net/colo-compare.c | 3 ++- 1 file changed, 2 insertions

Re: [PATCH v10 7/8] MAINTAINERS: Add myself as maintainer for yank feature

2020-11-15 Thread Lukas Straub
On Mon, 02 Nov 2020 07:33:54 +0100 Markus Armbruster wrote: > Lukas Straub writes: > > > I'll maintain this for now as the colo usecase is the first user > > of this functionality. > > > > Signed-off-by: Lukas Straub > > Acked-by: Stefan Hajnoczi > &g

Re: [PATCH v10 1/8] Introduce yank feature

2020-11-15 Thread Lukas Straub
On Mon, 02 Nov 2020 07:32:55 +0100 Markus Armbruster wrote: > Lukas Straub writes: > > > The yank feature allows to recover from hanging qemu by "yanking" > > at various parts. Other qemu systems can register themselves and > > multiple yank functions. Th

[PATCH v10 8/8] tests/test-char.c: Wait for the chardev to connect in char_socket_client_dupid_test

2020-10-30 Thread Lukas Straub
yank_register_instance will abort, because the yank instance is already/still registered. Signed-off-by: Lukas Straub Reviewed-by: Daniel P. Berrangé --- tests/test-char.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test-char.c b/tests/test-char.c index 9196e566e9..aedb5c9eda 100644 --- a/tests

<    1   2   3   4   5   6   7   >