Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1374723 - [Improvement] prevent running pulp-manage-db when pulp workers are up
[Improvement] prevent running pulp-manage-db when pulp workers are up
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Pulp (Show other bugs)
6.2.0
All Linux
high Severity high (vote)
: 6.2.8
: Unused
Assigned To: satellite6-bugs
Bruno Rocha
: Improvement, PrioBumpGSS, Triaged
: 1371677 (view as bug list)
Depends On:
Blocks: CEE_Sat6_Top_BZs/GSS_Sat6_Top_Bugs 1417079
  Show dependency treegraph
 
Reported: 2016-09-09 09:21 EDT by Pavel Moravec
Modified: 2018-09-19 11:12 EDT (History)
16 users (show)

See Also:
Fixed In Version: pulp-2.8.7.6-1
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 1417079 (view as bug list)
Environment:
Last Closed: 2017-03-06 03:28:20 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2534911 None None None 2016-09-09 09:22 EDT
Red Hat Knowledge Base (Solution) 2607261 None None None 2016-09-09 09:26 EDT
Red Hat Knowledge Base (Solution) 2608761 None None None 2016-09-09 09:26 EDT
Pulp Redmine 2186 Normal CLOSED - CURRENTRELEASE As a user, pulp-manage-db refuses to run if other pulp processes are running 2017-02-01 16:01 EST
Red Hat Product Errata RHBA-2017:0447 normal SHIPPED_LIVE Satellite 6.2.8 Async Bug Release 2017-03-06 08:23:41 EST

  None (edit)
Description Pavel Moravec 2016-09-09 09:21:02 EDT
Description of problem:
If pulp-manage-db is executed (due to whatever user/doc error) when pulp workers are running, various collections in mongo can violate their unique indices. Removing the duplicates is quite challenging, esp. because there is no relation model of pulp_database so one does not simply know where all could references to the duplicates be hidden.

This situation is not rare, it happened to 3 customers at least.

Please add to pulp-manage-db a test checking if some worker is running, and if so, stop the tool (or require human confirmation to continue).

See https://pulp.plan.io/issues/2186 raised in upstream.


Version-Release number of selected component (if applicable):
pulp-server-2.8.3.4-1.el7sat.noarch


How reproducible:
100%


Steps to Reproduce:
1. for i in pulp_resource_manager pulp_workers pulp_celerybeat; do service $i start; done
2. pulp-manage-db


Actual results:
2. is executed without a warning or so


Expected results:
2. should be stopped with an error that pulp workers are running, or the tool should require user confirmation to proceed.


Additional info:
Comment 2 pulp-infra@redhat.com 2016-10-05 11:01:31 EDT
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.
Comment 3 pulp-infra@redhat.com 2016-10-05 11:01:35 EDT
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.
Comment 4 pulp-infra@redhat.com 2016-10-07 15:31:13 EDT
The Pulp upstream bug status is at POST. Updating the external tracker on this bug.
Comment 5 pulp-infra@redhat.com 2016-10-11 13:01:20 EDT
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.
Comment 6 pulp-infra@redhat.com 2016-10-26 01:01:41 EDT
The Pulp upstream bug status is at ON_QA. Updating the external tracker on this bug.
Comment 8 Brian Bouterse 2016-11-21 13:20:34 EST
*** Bug 1371677 has been marked as a duplicate of this bug. ***
Comment 9 pulp-infra@redhat.com 2016-11-21 16:00:58 EST
All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.
Comment 10 pulp-infra@redhat.com 2016-12-07 16:01:27 EST
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.
Comment 11 pulp-infra@redhat.com 2016-12-07 16:31:21 EST
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.
Comment 12 pulp-infra@redhat.com 2016-12-19 09:31:50 EST
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.
Comment 13 pulp-infra@redhat.com 2016-12-30 17:31:53 EST
The Pulp upstream bug status is at POST. Updating the external tracker on this bug.
Comment 14 pulp-infra@redhat.com 2017-01-04 17:02:10 EST
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.
Comment 15 pulp-infra@redhat.com 2017-01-04 17:32:01 EST
All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.
Comment 16 pulp-infra@redhat.com 2017-01-17 19:02:21 EST
The Pulp upstream bug status is at ON_QA. Updating the external tracker on this bug.
Comment 17 pulp-infra@redhat.com 2017-02-01 16:01:54 EST
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.
Comment 18 Bruno Rocha 2017-02-15 15:48:08 EST
Verified in:

satellite-6.2.8-1.0.el7sat.noarch

Results:

[root@fqdn.com ~]# for i in pulp_resource_manager pulp_workers pulp_celerybeat; do service $i start; done
Redirecting to /bin/systemctl start  pulp_resource_manager.service
Redirecting to /bin/systemctl start  pulp_workers.service
Redirecting to /bin/systemctl start  pulp_celerybeat.service

[root@fqdn.com ~]# sudo -u apache pulp-manage-db
Attempting to connect to localhost:27017
Attempting to connect to localhost:27017
Write concern for Mongo connection: {}

The following processes might still be running:
	scheduler@fqdn.com
	resource_manager@fqdn.com
	reserved_resource_worker-0@fqdn.com
	reserved_resource_worker-1@fqdn.com
	reserved_resource_worker-3@fqdn.com
	reserved_resource_worker-2@fqdn.com
Please wait 1 seconds while Pulp confirms this.  

The following processes are still running, please stop the running workers before retrying the pulp-manage-db command.
 	scheduler@fqdn.com
	resource_manager@fqdn.com
	reserved_resource_worker-0@fqdn.com
	reserved_resource_worker-1@fqdn.com
	reserved_resource_worker-3@fqdn.com
	reserved_resource_worker-2@fqdn.com
Comment 20 errata-xmlrpc 2017-03-06 03:28:20 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:0447

Note You need to log in before you can comment on or make changes to this bug.