Project

Profile

Help

Issue #4373

Applicability Exception: Repository matching query does not exist.

Added by ttereshc 10 months ago. Updated 7 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Severity:
2. Medium
Version:
2.16.4
Platform Release:
2.19.0
Blocks Release:
OS:
Backwards Incompatible:
No
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 48

Description

If a repository no longer exists, but applicability has been triggered for it before it's been removed, the following exception occurs:

Jan 31 21:07:48 pulp2.dev pulp[26536]: pulp.server.async.tasks:INFO: [112d2ca7] Task failed : [112d2ca7-5ec8-4ffb-83a3-1c7bf5f58884]
Jan 31 21:07:48 pulp2.dev pulp[26536]: celery.app.trace:ERROR: [112d2ca7] (26536-85536) Task pulp.server.managers.consumer.applicability.regenerate_applicability_for_consumers[112d2ca7-5ec8-4ffb-83a3-1c7bf5f58884] raised unexpected: DoesNotExist('Repository matching query does not exist.',)
Jan 31 21:07:48 pulp2.dev pulp[26536]: celery.app.trace:ERROR: [112d2ca7] (26536-85536) Traceback (most recent call last):
Jan 31 21:07:48 pulp2.dev pulp[26536]: celery.app.trace:ERROR: [112d2ca7] (26536-85536)   File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 367, in trace_task
Jan 31 21:07:48 pulp2.dev pulp[26536]: celery.app.trace:ERROR: [112d2ca7] (26536-85536)     R = retval = fun(*args, **kwargs)
Jan 31 21:07:48 pulp2.dev pulp[26536]: celery.app.trace:ERROR: [112d2ca7] (26536-85536)   File "/home/vagrant/devel/pulp/server/pulp/server/async/tasks.py", line 529, in __call__
Jan 31 21:07:48 pulp2.dev pulp[26536]: celery.app.trace:ERROR: [112d2ca7] (26536-85536)     return super(Task, self).__call__(*args, **kwargs)
Jan 31 21:07:48 pulp2.dev pulp[26536]: celery.app.trace:ERROR: [112d2ca7] (26536-85536)   File "/home/vagrant/devel/pulp/server/pulp/server/async/tasks.py", line 107, in __call__
Jan 31 21:07:48 pulp2.dev pulp[26536]: celery.app.trace:ERROR: [112d2ca7] (26536-85536)     return super(PulpTask, self).__call__(*args, **kwargs)
Jan 31 21:07:48 pulp2.dev pulp[26536]: celery.app.trace:ERROR: [112d2ca7] (26536-85536)   File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 622, in __protected_call__
Jan 31 21:07:48 pulp2.dev pulp[26536]: celery.app.trace:ERROR: [112d2ca7] (26536-85536)     return self.run(*args, **kwargs)
Jan 31 21:07:48 pulp2.dev pulp[26536]: celery.app.trace:ERROR: [112d2ca7] (26536-85536)   File "/home/vagrant/devel/pulp/server/pulp/server/managers/consumer/applicability.py", line 108, in regenerate_applicability_for_consumers
Jan 31 21:07:48 pulp2.dev pulp[26536]: celery.app.trace:ERROR: [112d2ca7] (26536-85536)     manager.regenerate_applicability(profile_hash, content_type, profile_id, repo_id)
Jan 31 21:07:48 pulp2.dev pulp[26536]: celery.app.trace:ERROR: [112d2ca7] (26536-85536)   File "/home/vagrant/devel/pulp/server/pulp/server/managers/consumer/applicability.py", line 241, in regenerate_applicability
Jan 31 21:07:48 pulp2.dev pulp[26536]: celery.app.trace:ERROR: [112d2ca7] (26536-85536)     bound_repo_id)
Jan 31 21:07:48 pulp2.dev pulp[26536]: celery.app.trace:ERROR: [112d2ca7] (26536-85536)   File "/home/vagrant/devel/pulp/server/pulp/server/managers/consumer/applicability.py", line 298, in _get_existing_repo_content_types
Jan 31 21:07:48 pulp2.dev pulp[26536]: celery.app.trace:ERROR: [112d2ca7] (26536-85536)     repo_obj = model.Repository.objects.get(repo_id=repo_id)
Jan 31 21:07:48 pulp2.dev pulp[26536]: celery.app.trace:ERROR: [112d2ca7] (26536-85536)   File "/usr/lib/python2.7/site-packages/mongoengine/queryset/base.py", line 276, in get
Jan 31 21:07:48 pulp2.dev pulp[26536]: celery.app.trace:ERROR: [112d2ca7] (26536-85536)     raise queryset._document.DoesNotExist(msg)
Jan 31 21:07:48 pulp2.dev pulp[26536]: celery.app.trace:ERROR: [112d2ca7] (26536-85536) Exception: Repository matching query does not exist.

Associated revisions

Revision 6c23b290 View on GitHub
Added by ttereshc 9 months ago

Handle non-existent repo case when checking types for applicability

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

History

#2 Updated by ttereshc 10 months ago

  • Status changed from NEW to POST
  • Assignee set to ttereshc

#4 Updated by CodeHeeler 10 months ago

  • Triaged changed from No to Yes
  • Sprint set to Sprint 48

#5 Updated by ttereshc 9 months ago

  • Status changed from POST to MODIFIED

#7 Updated by ttereshc 8 months ago

  • Platform Release set to 2.19.0

#8 Updated by ttereshc 8 months ago

  • Sprint/Milestone set to 2.19.0

#9 Updated by ttereshc 8 months ago

  • Status changed from MODIFIED to ON_QA

#10 Updated by kersom 8 months ago

Attempt to recreate this by using Pulp-Smash, but not being able to create the race condition.

No regression was introduced after the merge of this one. test_content_applicability

#11 Updated by ttereshc 8 months ago

  • Status changed from ON_QA to CLOSED - CURRENTRELEASE

#12 Updated by bmbouter 7 months ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF