Project

Profile

Help

Issue #2776

closed

pulp-manage-db requires pulp services to be shut down even in dry run mode

Added by gmbnomis almost 7 years ago. Updated about 5 years ago.

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

Description

In our automation scripts, we run pulp-manage-db in dry-run mode in order to check whether we need to apply migrations (pulp-manage-db returns a specific error code in that case). This may happen in two situations:

1. We actually did a Pulp upgrade (in that case Pulp services are not activated when the check is run)
2. Something went very wrong and there are migrations to be applied although Pulp is running

With Pulp 2.13 (and maybe earlier, we ran 2.10 before), we cannot use pulp-manage-db for the second case anymore since it refuses to run in dry run mode when Pulp services are running. Of course, we don't want to stop/start services just to check for a case that is not supposed to happen. (Nevertheless, we think this check delivers an important signal if it triggers)

How to reproduce:

Run sudo -u apache pulp-manage-db --dry-run on a running Pulp server. pulp-manage-db will wait for 90 seconds and exit with an error, i.e. not doing any checks.

The expected behavior is to actually do the DB checks in dry run mode instead.

Also available in: Atom PDF