Project

Profile

Help

Issue #2837

The systemd file for pulp_workers will not start the workers if they have been killed without using the pulp_workers unit

Added by dalley over 4 years ago. Updated almost 3 years ago.

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

Description

sudo systemctl start pulp_workers                 # Start pulp_workers with systemd (you can verify they run with ps -awfux | grep celery)
sudo pkill -9 -f reserved_resource_worker         # Stop the workers outside of systemd (or stop each worker individually with systemctl)
sudo systemctl start pulp_workers                # Start the workers again with systemd
ps -awfux | grep celery                          # Note that no workers are running

This is an issue with how we chain-load the workers.

The relevant contents of the pulp_workers.service file are the following.

[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/usr/bin/python -m  pulp.server.async.manage_workers start
ExecStop=/usr/bin/python -m  pulp.server.async.manage_workers stop

When started and stopped, this service will execute a call a Python utility with a command line option of "start" or "stop", respectively. This utility, located in pulp/server/pulp/server/async/manage_workers.py, will start or stop the workers by writing out the individual worker unit files to /run/systemd/system/ and using Popen to start/stop them all via systemctl. The utility then exits.

Because "RemainAfterExit" is set to "True", the pulp_workers.service unit will always have an "active" status after being started, regardless of what happens to the workers thereafter. "systemctl start" does not do anything if the unit is already active, hence our problem.

The way to work around this would be to use systemctl stop pulp_workers prior to starting them, or else to use systemctl restart pulp_workers.

History

#1 Updated by dalley over 4 years ago

  • Description updated (diff)

#2 Updated by ttereshc over 4 years ago

  • Severity changed from 2. Medium to 1. Low
  • Triaged changed from No to Yes

#4 Updated by bmbouter almost 3 years ago

  • Status changed from NEW to CLOSED - WONTFIX

#5 Updated by bmbouter almost 3 years ago

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

#6 Updated by bmbouter almost 3 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF