Re: [PATCH v3 2/2] migration: Support fd-based socket address in cpr_transfer_input

2025-06-11 Thread JAEHOON KIM
On 6/11/2025 7:28 AM, Steven Sistare wrote: On 6/10/2025 6:33 PM, Jaehoon Kim wrote: Extend cpr_transfer_input to handle SOCKET_ADDRESS_TYPE_FD alongside SOCKET_ADDRESS_TYPE_UNIX. This change supports the use of pre-listened socket file descriptors for cpr migration channels. This change is

[PATCH v4 1/2] tests/migration: Setup pre-listened cpr.sock to remove race-condition.

2025-06-11 Thread Jaehoon Kim
vance, and passes the pre-listened FD directly. This avoids timing issues and improves the reliability of CPR tests. Reviewed-by: Jason J. Herne Signed-off-by: Jaehoon Kim --- tests/qtest/migration/cpr-tests.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/t

[PATCH v4 0/2] migration: Support socket fd for CPR and fix

2025-06-11 Thread Jaehoon Kim
Hello, This is v4 of the patch series. Changes since v3: - [Patch 1/2]: Applid review feedback from Steve Sistare - now using '%d' in g_strdup_printf - [Patch 2/2]: No changes; Kept as-is with Reviewed-by from Steve Sistare. Jaehoon Kim (2): tests/migration: Setup pre-listene

[PATCH v4 2/2] migration: Support fd-based socket address in cpr_transfer_input

2025-06-11 Thread Jaehoon Kim
passed via fd. Reviewed-by: Jason J. Herne Reviewed-by: Steve Sistare Signed-off-by: Jaehoon Kim --- migration/cpr-transfer.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/migration/cpr-transfer.c b/migration/cpr-transfer.c index e1f140359c..00371d17c3 100644 --- a

[PATCH v3 2/2] migration: Support fd-based socket address in cpr_transfer_input

2025-06-10 Thread Jaehoon Kim
passed via fd. Reviewed-by: Jason J. Herne Signed-off-by: Jaehoon Kim --- migration/cpr-transfer.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/migration/cpr-transfer.c b/migration/cpr-transfer.c index e1f140359c..00371d17c3 100644 --- a/migration/cpr-transfer.c

[PATCH v3 1/2] tests/migration: Setup pre-listened cpr.sock to remove race-condition.

2025-06-10 Thread Jaehoon Kim
vance, and passes the pre-listened FD directly. This avoids timing issues and improves the reliability of CPR tests. Reviewed-by: Jason J. Herne Signed-off-by: Jaehoon Kim --- tests/qtest/migration/cpr-tests.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/t

Re: [PATCH v2] migration: Setup pre-listened cpr.sock to remove race-condition.

2025-06-10 Thread JAEHOON KIM
On 6/10/2025 12:05 PM, Daniel P. Berrangé wrote: On Tue, Jun 10, 2025 at 10:08:49AM -0500, Jaehoon Kim wrote: When the source VM attempts to connect to the destination VM's Unix domain socket (cpr.sock) during a cpr-transfer test, race conditions can occur if the socket file isn't r

Re: [PATCH v2] migration: Setup pre-listened cpr.sock to remove race-condition.

2025-06-10 Thread JAEHOON KIM
On 6/10/2025 11:02 AM, Peter Xu wrote: On Tue, Jun 10, 2025 at 10:08:49AM -0500, Jaehoon Kim wrote: When the source VM attempts to connect to the destination VM's Unix domain socket (cpr.sock) during a cpr-transfer test, race conditions can occur if the socket file isn't ready. Thi

Re: [PATCH v2] migration: Setup pre-listened cpr.sock to remove race-condition.

2025-06-10 Thread JAEHOON KIM
On 6/10/2025 12:09 PM, Daniel P. Berrangé wrote: On Tue, Jun 10, 2025 at 10:08:49AM -0500, Jaehoon Kim wrote: When the source VM attempts to connect to the destination VM's Unix domain socket (cpr.sock) during a cpr-transfer test, race conditions can occur if the socket file isn't r

Re: [PATCH v2] migration: Setup pre-listened cpr.sock to remove race-condition.

2025-06-10 Thread JAEHOON KIM
On 6/10/2025 11:57 AM, Steven Sistare wrote: On 6/10/2025 11:08 AM, Jaehoon Kim wrote: When the source VM attempts to connect to the destination VM's Unix domain socket (cpr.sock) during a cpr-transfer test, race conditions can occur if the socket file isn't ready. This can lead to

[PATCH v2] migration: Setup pre-listened cpr.sock to remove race-condition.

2025-06-10 Thread Jaehoon Kim
vance, and passes the pre-listened FD directly. This avoids timing issues and improves the reliability of CPR tests. Reviewed-by: Jason J. Herne Signed-off-by: Jaehoon Kim --- Changes since v1: - In v1, the patch added a wait loop to poll the existence of the socket file (cpr_validate_s

Re: [PATCH v1] migration: Wait for cpr.sock file to appear before connecting

2025-06-09 Thread JAEHOON KIM
On 6/9/2025 9:57 AM, Daniel P. Berrangé wrote: On Mon, Jun 09, 2025 at 09:54:02AM -0500, JAEHOON KIM wrote: On 6/9/2025 8:50 AM, Daniel P. Berrangé wrote: On Mon, Jun 09, 2025 at 09:39:48AM -0400, Steven Sistare wrote: On 6/9/2025 9:20 AM, Daniel P. Berrangé wrote: On Mon, Jun 09, 2025 at

Re: [PATCH v1] migration: Wait for cpr.sock file to appear before connecting

2025-06-09 Thread JAEHOON KIM
{kill(pid,0)} - might be the most efficient way to handle this. I checked and found that the QTestState structure already has a "pid_t qemu_pid" field, so it should be straightforward to check the target's PID. From your experience, which approach do you consider the most effective to solve the current race condition issue? I would appreciate your thoughts. - Jaehoon Kim

Re: [PATCH v1] migration: Wait for cpr.sock file to appear before connecting

2025-06-09 Thread JAEHOON KIM
On 6/9/2025 8:39 AM, Steven Sistare wrote: On 6/9/2025 9:20 AM, Daniel P. Berrangé wrote: On Mon, Jun 09, 2025 at 09:12:27AM -0400, Steven Sistare wrote: On 6/9/2025 4:06 AM, Daniel P. Berrangé wrote: On Fri, Jun 06, 2025 at 03:37:56PM -0400, Steven Sistare wrote: The easiest solution, with

Re: [PATCH v1] migration: Wait for cpr.sock file to appear before connecting

2025-06-08 Thread JAEHOON KIM
On 6/6/2025 2:37 PM, Steven Sistare wrote: On 6/6/2025 2:06 PM, JAEHOON KIM wrote: On 6/6/2025 12:04 PM, Steven Sistare wrote: On 6/6/2025 12:06 PM, Daniel P. Berrangé wrote: On Fri, Jun 06, 2025 at 11:50:10AM -0400, Steven Sistare wrote: On 6/6/2025 11:43 AM, Daniel P. Berrangé wrote: On

Re: [PATCH v1] migration: Wait for cpr.sock file to appear before connecting

2025-06-06 Thread JAEHOON KIM
On 6/6/2025 12:04 PM, Steven Sistare wrote: On 6/6/2025 12:06 PM, Daniel P. Berrangé wrote: On Fri, Jun 06, 2025 at 11:50:10AM -0400, Steven Sistare wrote: On 6/6/2025 11:43 AM, Daniel P. Berrangé wrote: On Fri, Jun 06, 2025 at 10:37:28AM -0500, JAEHOON KIM wrote: On 6/6/2025 10:12 AM

Re: [PATCH v1] migration: Wait for cpr.sock file to appear before connecting

2025-06-06 Thread JAEHOON KIM
On 6/6/2025 10:12 AM, Steven Sistare wrote: On 6/6/2025 11:06 AM, JAEHOON KIM wrote: On 6/6/2025 9:14 AM, Steven Sistare wrote: On 6/6/2025 9:53 AM, Daniel P. Berrangé wrote: On Thu, Jun 05, 2025 at 06:08:08PM -0500, Jaehoon Kim wrote: When the source VM attempts to connect to the

Re: [PATCH v1] migration: Wait for cpr.sock file to appear before connecting

2025-06-06 Thread JAEHOON KIM
On 6/6/2025 9:14 AM, Steven Sistare wrote: On 6/6/2025 9:53 AM, Daniel P. Berrangé wrote: On Thu, Jun 05, 2025 at 06:08:08PM -0500, Jaehoon Kim wrote: When the source VM attempts to connect to the destination VM's Unix domain socket(cpr.sock) during CPR transfer, the socket file migh

Re: [PATCH v1] migration: Wait for cpr.sock file to appear before connecting

2025-06-06 Thread JAEHOON KIM
On 6/6/2025 8:40 AM, Fabiano Rosas wrote: Jaehoon Kim writes: When the source VM attempts to connect to the destination VM's Unix domain socket(cpr.sock) during CPR transfer, the socket file might not yet be exist if the destination side hasn't completed the bind operation. This c

[PATCH v1] migration: Wait for cpr.sock file to appear before connecting

2025-06-05 Thread Jaehoon Kim
ework. To address this, add cpr_validate_socket_path(), which wait for the socket file to appear. This avoids intermittent qtest failures caused by early connection attempts. Signed-off-by: Jaehoon Kim Reviewed-by: Jason J. Herne --- include/migration/cpr.h | 1 + migration/cpr-trans