Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't use --force in gzip decompress #4691

Merged
merged 1 commit into from
Apr 26, 2022

Conversation

lindig
Copy link
Contributor

@lindig lindig commented Apr 22, 2022

Normally gzip stops reading input when it has reached its own end-of
input marker even when that is before the end of input. This is
overridden by --force for decompression and it is creating a problem for
us because suspend images on disk are represented as devices that are
larger than the actual content - so --force kept reading beyond the
actual input and this in turn was not accepted by the code taking the
uncompressed output.

Signed-off-by: Christian Lindig christian.lindig@citrix.com

Normally gzip stops reading input when it has reached its own end-of
input marker even when that is before the end of input. This is
overridden by --force for decompression and it is creating a problem for
us because suspend images on disk are represented as devices that are
larger than the actual content - so --force kept reading beyond the
actual input and this in turn was not accepted by the code taking the
uncompressed output.

Signed-off-by: Christian Lindig <christian.lindig@citrix.com>
@lindig lindig marked this pull request as ready for review April 22, 2022 12:05
@lindig lindig requested review from robhoes and psafont April 22, 2022 12:05
@robhoes
Copy link
Member

robhoes commented Apr 22, 2022

Did you test that this works for export/import?

@lindig
Copy link
Contributor Author

lindig commented Apr 22, 2022

I ran BVT/BST - assuming that this would test it

@robhoes
Copy link
Member

robhoes commented Apr 22, 2022

I don't think so. It's better to test it directly to be sure.

@lindig
Copy link
Contributor Author

lindig commented Apr 22, 2022

I could also introduce a force flag to retain the existing behavior. Will do some manual testing, too.

@lindig
Copy link
Contributor Author

lindig commented Apr 22, 2022

I've run a xe vm-export compress=true with a subsequent import. This uses gzip compression and it worked.

@lindig
Copy link
Contributor Author

lindig commented Apr 22, 2022

Don't merge yet. There is one failed sub test on the BST which I will re-run

@lindig
Copy link
Contributor Author

lindig commented Apr 25, 2022

The previously failed test has passed in the re-run. So this should be save to merge.

@lindig lindig merged commit af4fc08 into xapi-project:master Apr 26, 2022
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.

3 participants