Skip to content

Conversation

@herheliuk
Copy link
Member

Specify the reason for a dump fail (No dumps dir).

Signed-off-by: Andrii Herheliuk andrii@herheliuk.com

Specify the reason for a dump fail (No dumps dir).

Signed-off-by: Andrii Herheliuk <andrii@herheliuk.com>
@herheliuk herheliuk changed the title pycriu: better dump errors pycriu: better dump errors Oct 23, 2025
@herheliuk herheliuk marked this pull request as ready for review October 23, 2025 20:57
s += "Bad options"

elif self.typ == rpc.DUMP and self.errno == errno.ENOENT:
s += "Dump folder not found. Please create it first."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be a workdir and any other file patch. I think it is better to add cr_errmsg into the error message.

Copy link
Member Author

@herheliuk herheliuk Oct 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how to find and send pr_perror's value back...

But it would make sense indeed. (Currently pycriu receives "Unknown" most of the time)

As far as this commit goes though, I believe the change in cr-service.c
and python check is enough to nail down this specific error.

Copy link
Member Author

@herheliuk herheliuk Oct 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cr-sercice.c lines 137-142

static void set_resp_err(CriuResp *resp)
{
	resp->cr_errno = get_cr_errno();
	resp->has_cr_errno = resp->cr_errno ? true : false;
	resp->cr_errmsg = log_first_err();
}

cr_errmsg is here, but pycriu doesn't seem to receive/process this value

Copy link
Member Author

@herheliuk herheliuk Oct 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

log_first_err() is returning NULL #2805

Edited: when using use_binary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants