Project

Profile

Help

Story #2659

As a User I would like Pulp3 to not show me offline workers in the status api

Added by bizhang over 2 years ago. Updated 8 months ago.

Status:
MODIFIED
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Platform Release:
Blocks Release:
Backwards Incompatible:
No
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Functional Test
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 28

Description

Assumption: Pulp workers that are missing should not be shown in the status API.

In Pulp3, the Worker model has an 'online' boolean which is meant to allow Pulp to store records about workers even after they have gone offline. Additionally workers should be considered offline if their heartbeat time is older than 30 seconds. We need to filter for both cases because of the following failure scenario:

1) a working Pulp system with exactly 1 worker that has pid 1234
2) kill -9 1234

In this case, the DB record will show 'online' without the 30 second part of the filter.

To resolve this we should:

1) add a method called online_workers to the TaskManager which returns a queryset with the two filters applied as described above
2) refactor the get_unreserved_worker method to use online_workers instead. This will cause us to stay DRY w.r.t. this filtering.
3) Have the ViewSet of the /status/ API only return workers from the online_workers queryset.
4) Update the docstrings so that those updates will flow to the docs


Checklist

Associated revisions

Revision f96d5b7f View on GitHub
Added by dalley about 2 years ago

Show only the online workers in the status API

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

Revision f96d5b7f View on GitHub
Added by dalley about 2 years ago

Show only the online workers in the status API

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

History

#1 Updated by bizhang over 2 years ago

  • Subject changed from Stale worker documents present in the db for Pulp3 to As a User I would like Pulp3 to not show me stale worker in the status api

#2 Updated by bizhang over 2 years ago

  • Tracker changed from Issue to Story
  • Subject changed from As a User I would like Pulp3 to not show me stale worker in the status api to As a User I would like Pulp3 to not show me stale workers in the status api
  • % Done set to 0

#3 Updated by bmbouter about 2 years ago

  • Subject changed from As a User I would like Pulp3 to not show me stale workers in the status api to As a User I would like Pulp3 to not show me offline workers in the status api
  • Description updated (diff)
  • Sprint Candidate changed from No to Yes

#4 Updated by bmbouter about 2 years ago

  • Description updated (diff)

#5 Updated by mhrivnak about 2 years ago

  • Groomed changed from No to Yes

It may be helpful in the future to somehow represent workers that have gone "offline", but we need to answer more questions about that state. For example, we'd probably want to differentiate between workers that went offline gracefully vs. unexpectedly.

So for now, only showing online workers is I think the best move.

#6 Updated by mhrivnak about 2 years ago

  • Sprint/Milestone set to 47

#7 Updated by dalley about 2 years ago

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

#8 Updated by dalley about 2 years ago

  • Status changed from ASSIGNED to POST

#9 Updated by dalley about 2 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#10 Updated by daviddavis almost 2 years ago

  • Smash Test set to 877

#11 Updated by bmbouter almost 2 years ago

  • Sprint set to Sprint 28

#12 Updated by bmbouter almost 2 years ago

  • Sprint/Milestone deleted (47)

#13 Updated by kersom about 1 year ago

  • Tags Functional Test added
  • Tags deleted (Pulp 3)

#14 Updated by dkliban@redhat.com about 1 year ago

  • Tags Pulp 3 added

#15 Updated by daviddavis 8 months ago

  • Sprint/Milestone set to 3.0

#16 Updated by bmbouter 8 months ago

  • Tags deleted (Pulp 3)

Please register to edit this issue

Also available in: Atom PDF