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
Division by zero during Pulp import #4777
Comments
We'll also want to expand our tests to cover this |
Does this mean that we can provide a toc file that makes a non-chunked import look like one with a single chunk, only the specified chunk-size is wrong? |
Thank you for working to address this! We started seeing this on our team about 3 weeks ago on our Pulp 3 servers. We haven't been able to import content to an air-gapped Pulp 3 server since upgrading past 3.36.0. We export the content non-chunked. |
And clean up vestigial code closes pulp#4777
And clean up vestigial code closes pulp#4777
And clean up vestigial code closes #4777
And clean up vestigial code closes pulp#4777
Version
3.36.0+
Describe the bug
During a Katello test run, the following exception was encountered
I'm not 100% certain, but I suspect the cause here is that if chunks aren't used during the export, chunk_size is set to 0:
https://github.com/pulp/pulpcore/blob/main/pulpcore/app/tasks/export.py#L456C31-L456C31
and ChunkedFile reads that value here:
https://github.com/pulp/pulpcore/blob/main/pulpcore/app/tasks/importer.py#L79
and we're using ChunkedFile even in the non-chunked case so long as a TOC file was provided.
https://github.com/pulp/pulpcore/blob/main/pulpcore/app/tasks/importer.py#L335-L336
To Reproduce
I would expect it to be reproducible if performing a non-chunked export, and providing a TOC path for the import.
Expected behavior
We should never see an integer division by zero error.
Additional context
The text was updated successfully, but these errors were encountered: