restore: Don't finish_remote_restore on detached

Submitted by Radostin Stoyanov on April 24, 2018, 9:12 p.m.

Details

Message ID 20180424211248.27809-1-rstoyanov1@gmail.com
State New
Series "restore: Don't finish_remote_restore on detached"
Headers show

Commit Message

Radostin Stoyanov April 24, 2018, 9:12 p.m.
When --restore-detached is used with image-{cache, proxy} the
following errors were shown after successful restore.

Error (criu/img-remote.c:775): Error opening local connection for RESTORE_FINISH:null                                                                                   │
Error (criu/img-remote.c:836): Unable to open finish restore connection
Error (criu/cr-restore.c:2615): Finish remote restore failed.

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
---
 criu/cr-restore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/criu/cr-restore.c b/criu/cr-restore.c
index db913b2d..f9a6b044 100644
--- a/criu/cr-restore.c
+++ b/criu/cr-restore.c
@@ -2608,7 +2608,7 @@  int cr_restore_tasks(void)
 
 	ret = restore_root_task(root_item);
 
-	if (opts.remote && (finish_remote_restore() < 0)) {
+	if (opts.remote && !opts.restore_detach && (finish_remote_restore() < 0)) {
 		pr_err("Finish remote restore failed.\n");
 		goto err;
 	}

Comments

Andrey Vagin April 26, 2018, 11:26 p.m.
App

On Tue, Apr 24, 2018 at 10:12:48PM +0100, Radostin Stoyanov wrote:
> When --restore-detached is used with image-{cache, proxy} the
> following errors were shown after successful restore.
> 
> Error (criu/img-remote.c:775): Error opening local connection for RESTORE_FINISH:null                                                                                   │
> Error (criu/img-remote.c:836): Unable to open finish restore connection
> Error (criu/cr-restore.c:2615): Finish remote restore failed.

Could you give more details why this error is appeared?

> 
> Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
> ---
>  criu/cr-restore.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/criu/cr-restore.c b/criu/cr-restore.c
> index db913b2d..f9a6b044 100644
> --- a/criu/cr-restore.c
> +++ b/criu/cr-restore.c
> @@ -2608,7 +2608,7 @@ int cr_restore_tasks(void)
>  
>  	ret = restore_root_task(root_item);
>  
> -	if (opts.remote && (finish_remote_restore() < 0)) {
> +	if (opts.remote && !opts.restore_detach && (finish_remote_restore() < 0)) {

I don't understand why we should not call finish_remote_restore for
!opts.restore_detach

>  		pr_err("Finish remote restore failed.\n");
>  		goto err;
>  	}
> -- 
> 2.14.3
> 
> _______________________________________________
> CRIU mailing list
> CRIU@openvz.org
> https://lists.openvz.org/mailman/listinfo/criu