Katello error uploading file into a file repo

Problem:
When I try to upload a file in a file repo in Katello, it gives the following errors:

Error during upload: Task 134f140a-832e-4996-92e7-f8d56e18d4e3: Katello::Errors::Pulp3Error: {‘non_field_errors’: [ErrorDetail(string=‘The sha256 checksum did not match.’, code=‘invalid’)]}; Katello::Errors::Pulp3Error: [Errno 39] Directory not empty: ‘/var/lib/pulp/tmp/1214@hs-fm-gen-001/b126c5ab-7d6f-47b0-bad3-6464799aa415’

I have removed the directory that is mentioned, but it creates new one and comes up with the same error.
The file I want to upload, is a zip file of around 350KB. I tried to upload different files, with the same result. Except for one test, I uploaded a very small text file, and that uploaded correctly.
Expected outcome:

Foreman and Proxy versions:
Katello 3.15, installed from scratch.
Foreman Proxy 2.0.1

Distribution and version:
CentOS 7.8

@roosterloo thanks for letting us know, sorry you are experiencing some issues!

@iballou any thoughts here? Seems pulp3 related.

@John_Mitsch I ended up uploading files using ‘hammer repository upload-content’. That worked without problems.

1 Like

I was able to reproduce the issue and created an issue here for it: Bug #30462: 'The sha256 checksum did not match.' error when uploading larger files to Pulp 3 file repo through the UI - Katello - Foreman

1 Like

I don’t know but something strange I think its spell mistake some where maye be , If I try to upload file it create one folder name upload and uploads folder already there (I have two instances with same configuration , one is fresh never tried to upload any file)

two folder one is upload and other is uploads
and “upload” only come after I trying to upload some files.

ls -la -la /var/lib/pulp/
total 12
drwxrwxr-x. 11 pulp pulp 186 Oct 15 12:20 .
drwxr-xr-x. 42 root root 4096 Oct 10 17:14 …
-rw-r–r–. 1 apache apache 2 Oct 10 17:00 0005_puppet_module_name_change.txt
drwxr-xr-x. 6 pulp pulp 78 Oct 10 16:59 assets
drwxrwxr-x. 3 pulp pulp 22 Oct 11 19:36 docroot
drwxr-xr-x. 2 foreman foreman 6 Oct 10 17:00 katello-export
drwxr-xr-x. 2 apache apache 6 Oct 10 16:59 packages
drwxrwxr-x. 5 apache pulp 45 Oct 10 16:47 published
drwxrwxr-x. 2 apache pulp 25 Oct 10 16:59 static
drwxrwxr-x. 15 pulp pulp 4096 Oct 23 18:15 tmp
drwxr-xr-x 2 pulp pulp 94 Oct 15 12:21 upload (it created only after I try to upload file manually)
drwxrwxr-x. 2 apache pulp 6 Jul 13 15:23 uploads

Error during upload: Task 8ae65e73-04b7-4151-a723-664cf12c2b22: Katello::Errors::Pulp3Error: {‘non_field_errors’: [ErrorDetail(string=‘The sha256 checksum did not match.’, code=‘invalid’)]}

I think file is uploading properly this

File "/usr/lib/python3.6/site-packages/pulpcore/app/tasks/upload.py

is checking and verifying the file in wrong folder

@iballou

/var/lib/pulp/

[root@fountain2 pulp]# ls -lh upload

total 66M

-rw-r–r-- 1 pulp pulp 26M Oct 23 20:21 12a93c10-f90e-42d0-8be7-be079229e064

-rw-r–r-- 1 pulp pulp 34M Oct 23 20:12 d7b1ce54-6568-4fe8-95da-494aee7273de

[root@fountain2 pulp]#

file properly uploaded in “/varlib/pulp/upload” folder but not in “/var/lib/pulp/uploads” folder.

Output:

{“pulp_tasks”=>
[{“pulp_href”=>"/pulp/api/v3/tasks/d5ca854b-8457-4616-8cc6-e162d83b6199/",
“pulp_created”=>“2020-07-21T15:11:42.069+00:00”,
“state”=>“failed”,
“name”=>“pulpcore.app.tasks.upload.commit”,
“started_at”=>“2020-07-21T15:11:42.147+00:00”,
“finished_at”=>“2020-07-21T15:11:43.106+00:00”,
“error”=>
{“traceback”=>
" File “/usr/lib/python3.6/site-packages/rq/worker.py”, line 822, in perform_job\n" +
" rv = job.perform()\n" +
" File “/usr/lib/python3.6/site-packages/rq/job.py”, line 605, in perform\n" +
" self._result = self._execute()\n" +
" File “/usr/lib/python3.6/site-packages/rq/job.py”, line 611, in _execute\n" +
" return self.func(*self.args, **self.kwargs)\n" +
" File “/usr/lib/python3.6/site-packages/pulpcore/app/tasks/upload.py”, line 28, in commit\n" +
" serializer.is_valid(raise_exception=True)\n" +
" File “/usr/lib/python3.6/site-packages/rest_framework/serializers.py”, line 243, in is_valid\n" +
" raise ValidationError(self.errors)\n",
“description”=>
“{‘non_field_errors’: [ErrorDetail(string=‘The sha256 checksum did not match.’, code=‘invalid’)]}”},
“worker”=>"/pulp/api/v3/workers/417d1b8a-307d-4a43-9b27-addeb2f1b08c/",
“progress_reports”=>,
“created_resources”=>,
“reserved_resources_record”=>

["/pulp/api/v3/uploads/0f7e4b65-419d-4459-b810-1719acbd50b8/"]}],

It should be upload ?

“poll_attempts”=>{“total”=>2, “failed”=>1}}