Project

Profile

Help

Test #4536

closed

Failure when attempting to use single request upload for a rpm already present in pulp

Added by bherring over 5 years ago. Updated over 5 years ago.

Status:
CLOSED - COMPLETE
Priority:
Normal
Assignee:
Sprint/Milestone:
-
Version:
Platform Release:
Tags:
Sprint:
Quarter:

Description

1 - Create a repository
2 - Upload a RPM using single request upload to the previous repo.
3 - Attempt to upload - single request, the same RPM again to the same repo.

Traceback:

("Task report /pulp/api/v3/tasks/16/ contains a error: {'code': None, "
 "'description': 'duplicate key value violates unique constraint "
 '"pulp_app_contentartifact_content_id_relative_path_c7af024d_uniq"\\nDETAIL:  '
 'Key (content_id, relative_path)=(3, '
 'b0f0bb58be244393cc565e8ee5ef0ad36884d8ba8eec74542ff47d299a34c1) already '
 "exists.\\n', 'traceback': '  File "
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/rq/worker.py", line 799, '
 'in perform_job\\n    rv = job.perform()\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/rq/job.py", line 600, in '
 'perform\\n    self._result = self._execute()\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/rq/job.py", line 606, in '
 '_execute\\n    return self.func(*self.args, **self.kwargs)\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/pulp_rpm/app/upload.py", '
 'line 31, in one_shot_upload\\n    relative_path=filename\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/models/manager.py", '
 'line 82, in manager_method\\n    return getattr(self.get_queryset(), '
 'name)(*args, **kwargs)\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/models/query.py", '
 'line 413, in create\\n    obj.save(force_insert=True, using=self.db)\\n  '
 'File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/models/base.py", '
 'line 718, in save\\n    force_update=force_update, '
 'update_fields=update_fields)\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/models/base.py", '
 'line 748, in save_base\\n    updated = self._save_table(raw, cls, '
 'force_insert, force_update, using, update_fields)\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/models/base.py", '
 'line 831, in _save_table\\n    result = self._do_insert(cls._base_manager, '
 'using, fields, update_pk, raw)\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/models/base.py", '
 'line 869, in _do_insert\\n    using=using, raw=raw)\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/models/manager.py", '
 'line 82, in manager_method\\n    return getattr(self.get_queryset(), '
 'name)(*args, **kwargs)\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/models/query.py", '
 'line 1136, in _insert\\n    return '
 'query.get_compiler(using=using).execute_sql(return_id)\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/models/sql/compiler.py", '
 'line 1289, in execute_sql\\n    cursor.execute(sql, params)\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/backends/utils.py", '
 'line 68, in execute\\n    return self._execute_with_wrappers(sql, params, '
 'many=False, executor=self._execute)\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/backends/utils.py", '
 'line 77, in _execute_with_wrappers\\n    return executor(sql, params, many, '
 'context)\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/backends/utils.py", '
 'line 85, in _execute\\n    return self.cursor.execute(sql, params)\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/utils.py", line '
 '89, in __exit__\\n    raise dj_exc_value.with_traceback(traceback) from '
 'exc_value\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/backends/utils.py", '
 "line 85, in _execute\\n    return self.cursor.execute(sql, params)\\n'}\n"
 "Full task report: {'_href': '/pulp/api/v3/tasks/16/', '_created': "
 "'2018-12-20T21:54:36.049068Z', 'job_id': "
 "'7a1e07a1-5cce-41bf-9ffd-4e71ddd2ddc3', 'state': 'failed', 'name': "
 "'pulp_rpm.app.upload.one_shot_upload', 'started_at': "
 "'2018-12-20T21:54:36.124283Z', 'finished_at': '2018-12-20T21:54:36.163181Z', "
 "'non_fatal_errors': [], 'error': {'code': None, 'description': 'duplicate "
 'key value violates unique constraint '
 '"pulp_app_contentartifact_content_id_relative_path_c7af024d_uniq"\\nDETAIL:  '
 'Key (content_id, relative_path)=(3, '
 'b0f0bb58be244393cc565e8ee5ef0ad36884d8ba8eec74542ff47d299a34c1) already '
 "exists.\\n', 'traceback': '  File "
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/rq/worker.py", line 799, '
 'in perform_job\\n    rv = job.perform()\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/rq/job.py", line 600, in '
 'perform\\n    self._result = self._execute()\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/rq/job.py", line 606, in '
 '_execute\\n    return self.func(*self.args, **self.kwargs)\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/pulp_rpm/app/upload.py", '
 'line 31, in one_shot_upload\\n    relative_path=filename\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/models/manager.py", '
 'line 82, in manager_method\\n    return getattr(self.get_queryset(), '
 'name)(*args, **kwargs)\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/models/query.py", '
 'line 413, in create\\n    obj.save(force_insert=True, using=self.db)\\n  '
 'File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/models/base.py", '
 'line 718, in save\\n    force_update=force_update, '
 'update_fields=update_fields)\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/models/base.py", '
 'line 748, in save_base\\n    updated = self._save_table(raw, cls, '
 'force_insert, force_update, using, update_fields)\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/models/base.py", '
 'line 831, in _save_table\\n    result = self._do_insert(cls._base_manager, '
 'using, fields, update_pk, raw)\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/models/base.py", '
 'line 869, in _do_insert\\n    using=using, raw=raw)\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/models/manager.py", '
 'line 82, in manager_method\\n    return getattr(self.get_queryset(), '
 'name)(*args, **kwargs)\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/models/query.py", '
 'line 1136, in _insert\\n    return '
 'query.get_compiler(using=using).execute_sql(return_id)\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/models/sql/compiler.py", '
 'line 1289, in execute_sql\\n    cursor.execute(sql, params)\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/backends/utils.py", '
 'line 68, in execute\\n    return self._execute_with_wrappers(sql, params, '
 'many=False, executor=self._execute)\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/backends/utils.py", '
 'line 77, in _execute_with_wrappers\\n    return executor(sql, params, many, '
 'context)\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/backends/utils.py", '
 'line 85, in _execute\\n    return self.cursor.execute(sql, params)\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/utils.py", line '
 '89, in __exit__\\n    raise dj_exc_value.with_traceback(traceback) from '
 'exc_value\\n  File '
 '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/backends/utils.py", '
 "line 85, in _execute\\n    return self.cursor.execute(sql, params)\\n'}, "
 "'worker': '/pulp/api/v3/workers/1/', 'parent': None, 'spawned_tasks': [], "
 "'progress_reports': [], 'created_resources': []}",
 {'_created': '2018-12-20T21:54:36.049068Z',
  '_href': '/pulp/api/v3/tasks/16/',
  'created_resources': [],
  'error': {'code': None,
            'description': 'duplicate key value violates unique constraint '
                           '"pulp_app_contentartifact_content_id_relative_path_c7af024d_uniq"\n'
                           'DETAIL:  Key (content_id, relative_path)=(3, '
                           'b0f0bb58be244393cc565e8ee5ef0ad36884d8ba8eec74542ff47d299a34c1) '
                           'already exists.\n',
            'traceback': '  File '
                         '"/usr/local/lib/pulp/lib64/python3.7/site-packages/rq/worker.py", '
                         'line 799, in perform_job\n'
                         '    rv = job.perform()\n'
                         '  File '
                         '"/usr/local/lib/pulp/lib64/python3.7/site-packages/rq/job.py", '
                         'line 600, in perform\n'
                         '    self._result = self._execute()\n'
                         '  File '
                         '"/usr/local/lib/pulp/lib64/python3.7/site-packages/rq/job.py", '
                         'line 606, in _execute\n'
                         '    return self.func(*self.args, **self.kwargs)\n'
                         '  File '
                         '"/usr/local/lib/pulp/lib64/python3.7/site-packages/pulp_rpm/app/upload.py", '
                         'line 31, in one_shot_upload\n'
                         '    relative_path=filename\n'
                         '  File '
                         '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/models/manager.py", '
                         'line 82, in manager_method\n'
                         '    return getattr(self.get_queryset(), name)(*args, '
                         '**kwargs)\n'
                         '  File '
                         '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/models/query.py", '
                         'line 413, in create\n'
                         '    obj.save(force_insert=True, using=self.db)\n'
                         '  File '
                         '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/models/base.py", '
                         'line 718, in save\n'
                         '    force_update=force_update, '
                         'update_fields=update_fields)\n'
                         '  File '
                         '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/models/base.py", '
                         'line 748, in save_base\n'
                         '    updated = self._save_table(raw, cls, '
                         'force_insert, force_update, using, update_fields)\n'
                         '  File '
                         '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/models/base.py", '
                         'line 831, in _save_table\n'
                         '    result = self._do_insert(cls._base_manager, '
                         'using, fields, update_pk, raw)\n'
                         '  File '
                         '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/models/base.py", '
                         'line 869, in _do_insert\n'
                         '    using=using, raw=raw)\n'
                         '  File '
                         '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/models/manager.py", '
                         'line 82, in manager_method\n'
                         '    return getattr(self.get_queryset(), name)(*args, '
                         '**kwargs)\n'
                         '  File '
                         '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/models/query.py", '
                         'line 1136, in _insert\n'
                         '    return '
                         'query.get_compiler(using=using).execute_sql(return_id)\n'
                         '  File '
                         '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/models/sql/compiler.py", '
                         'line 1289, in execute_sql\n'
                         '    cursor.execute(sql, params)\n'
                         '  File '
                         '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/backends/utils.py", '
                         'line 68, in execute\n'
                         '    return self._execute_with_wrappers(sql, params, '
                         'many=False, executor=self._execute)\n'
                         '  File '
                         '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/backends/utils.py", '
                         'line 77, in _execute_with_wrappers\n'
                         '    return executor(sql, params, many, context)\n'
                         '  File '
                         '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/backends/utils.py", '
                         'line 85, in _execute\n'
                         '    return self.cursor.execute(sql, params)\n'
                         '  File '
                         '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/utils.py", '
                         'line 89, in __exit__\n'
                         '    raise dj_exc_value.with_traceback(traceback) '
                         'from exc_value\n'
                         '  File '
                         '"/usr/local/lib/pulp/lib64/python3.7/site-packages/django/db/backends/utils.py", '
                         'line 85, in _execute\n'
                         '    return self.cursor.execute(sql, params)\n'},
  'finished_at': '2018-12-20T21:54:36.163181Z',
  'job_id': '7a1e07a1-5cce-41bf-9ffd-4e71ddd2ddc3',
  'name': 'pulp_rpm.app.upload.one_shot_upload',
  'non_fatal_errors': [],
  'parent': None,
  'progress_reports': [],
  'spawned_tasks': [],
  'started_at': '2018-12-20T21:54:36.124283Z',
  'state': 'failed',
  'worker': '/pulp/api/v3/workers/1/'})

Pulp 3 - Installation from source FEB/27.


Related issues

Copied from RPM Support - Issue #4485: Failure when attempting to use single request upload for a rpm already present in pulpCLOSED - CURRENTRELEASEppickaActions
Actions #1

Updated by bherring over 5 years ago

  • Copied from Issue #4485: Failure when attempting to use single request upload for a rpm already present in pulp added
Actions #2

Updated by kersom over 5 years ago

  • Assignee set to kersom
Actions #3

Updated by kersom over 5 years ago

  • Status changed from NEW to ASSIGNED
Actions #4

Updated by ppicka over 5 years ago

This is too much for error message, this should be fixed.

Added by kersom over 5 years ago

Revision 832032ae | View on GitHub

Add test for duplicate files single request upload

Add test to single request upload for file already present in Pulp.

https://pulp.plan.io/issues/4536 closes #4536

Actions #5

Updated by kersom over 5 years ago

  • Status changed from ASSIGNED to MODIFIED
Actions #6

Updated by kersom over 5 years ago

  • Status changed from MODIFIED to CLOSED - COMPLETE
Actions #7

Updated by bmbouter over 5 years ago

  • Tags deleted (Pulp 3)

Also available in: Atom PDF