Project

Profile

Help

Issue #3745

Applicability task fails if consumer is removed in the middle of the task

Added by ttereshc over 3 years ago. Updated over 2 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
2.16.2
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 38
Quarter:

Description

Applicability task fails if consumer is removed in the middle of the task.

"pulp.server.managers.consumer.applicability.regenerate_applicability_for_consumers",
    "_href"=>"/pulp/api/v2/tasks/9f3371e4-93b7-4dbf-970c-cf35bffb5e68/",
    "task_id"=>"9f3371e4-93b7-4dbf-970c-cf35bffb5e68",
    "tags"=>["pulp:action:consumer_content_applicability_regeneration"],
    "finish_time"=>"2018-05-25T08:23:04Z",
    "_ns"=>"task_status",
    "start_time"=>"2018-05-25T08:21:41Z",
    "traceback"=>
     "Traceback (most recent call last):\n  File
\"/usr/lib/python2.7/site-packages/celery/app/trace.py\", line 240, in
trace_task\n    R = retval = fun(*args, **kwargs)\n  File
\"/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py\", line 527, in
__call__\n    return super(Task, self).__call__(*args, **kwargs)\n  File
\"/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py\", line 107, in
__call__\n    return super(PulpTask, self).__call__(*args, **kwargs)\n  File
\"/usr/lib/python2.7/site-packages/celery/app/trace.py\", line 438, in
__protected_call__\n    return self.run(*args, **kwargs)\n  File
\"/usr/lib/python2.7/site-packages/pulp/server/managers/consumer/applicability.py\",
line 108, in regenerate_applicability_for_consumers\n   
manager.regenerate_applicability(profile_hash, content_type, profile_id,
repo_id)\n  File
\"/usr/lib/python2.7/site-packages/pulp/server/managers/consumer/applicability.py\",
line 251, in regenerate_applicability\n    profile =
unit_profile['profile']\nTypeError: 'NoneType' object has no attribute
'__getitem__'\n",
    "spawned_tasks"=>[],
    "progress_report"=>{},
    "queue"=>"reserved_resource_worker-2@li-lc-1578.dq",
    "state"=>"error",
    "worker_name"=>"reserved_resource_worker-2@li-lc-1578",
    "result"=>nil,
    "error"=>
     {"code"=>"PLP0000",
      "data"=>{},
      "description"=>"'NoneType' object has no attribute '__getitem__'",
      "sub_errors"=>[]},
    "_id"=>{"$oid"=>"5b07c7953270b1fb9d499d6b"}

Pulp should just ignore that profile no longer exists, and move on.
https://github.com/pulp/pulp/blob/7a90d861d6d63bd8e6f17c03ca095f768127758c/server/pulp/server/managers/consumer/applicability.py#L249-L251

Associated revisions

Revision e46c6225 View on GitHub
Added by ttereshc over 3 years ago

Ignore missing consumer profile during applicability regeneration

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

Revision 60513d78 View on GitHub
Added by ttereshc over 3 years ago

Ignore missing consumer profile during applicability regeneration

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

(cherry picked from commit e46c6225f5e3a600d75598c464a3f257ca567a5c)

History

#2 Updated by CodeHeeler over 3 years ago

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

#3 Updated by ttereshc over 3 years ago

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

#4 Updated by ttereshc over 3 years ago

  • Status changed from ASSIGNED to POST

#5 Updated by ttereshc over 3 years ago

  • Status changed from POST to MODIFIED

#6 Updated by dkliban@redhat.com over 3 years ago

  • Platform Release set to 2.16.2

#8 Updated by ipanova@redhat.com over 3 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

#9 Updated by bmbouter over 2 years ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF