Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1110854

Summary: pulp_* services may fail to startup if mongo is not fully started
Product: Red Hat Satellite Reporter: Justin Sherrill <jsherril>
Component: OtherAssignee: Jason Montleon <jmontleo>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.3CC: aupadhye, bbuckingham, bkearney, cwelton, mmccune, xdmoon
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1110818 Environment:
Last Closed: 2014-09-11 12:28:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1110818    
Bug Blocks: 950743    

Description Justin Sherrill 2014-06-18 15:31:06 UTC
+++ This bug was initially created as a clone of Bug #1110818 +++

Description of problem:

It appears that on system reboot, mongo starts just before the pulp_* services (celerybeat, workers, resource_manager) but may not be initialized when the pulp services start.

The result is that the server starts up and none of those pulp_* services are running.

In the logs you'll see:


Jun 17 20:00:01 box pulp: celery.beat:CRITICAL: beat raised exception <class 'pymongo.errors.ConnectionFailure'>: ConnectionFailure('could not connect to localhost:27017: [Errno 111] Connection refused',)
Jun 17 20:00:01 box pulp: celery.beat:CRITICAL: Traceback (most recent call last):
Jun 17 20:00:01 box pulp: celery.beat:CRITICAL:   File "/usr/lib/python2.6/site-packages/celery/apps/beat.py", line 112, in start_scheduler
Jun 17 20:00:01 box pulp: celery.beat:CRITICAL:     beat.start()
Jun 17 20:00:01 box pulp: celery.beat:CRITICAL:   File "/usr/lib/python2.6/site-packages/celery/beat.py", line 453, in start
Jun 17 20:00:01 box pulp: celery.beat:CRITICAL: humanize_seconds(self.scheduler.max_interval))
Jun 17 20:00:01 box pulp: celery.beat:CRITICAL:   File "/usr/lib/python2.6/site-packages/kombu/utils/__init__.py", line 322, in __get__
Jun 17 20:00:01 box pulp: celery.beat:CRITICAL:     value = obj.__dict__[self.__name__] = self.__get(obj)
Jun 17 20:00:01 box pulp: celery.beat:CRITICAL:   File "/usr/lib/python2.6/site-packages/celery/beat.py", line 491, in scheduler
Jun 17 20:00:01 box pulp: celery.beat:CRITICAL:     return self.get_scheduler()
Jun 17 20:00:01 box pulp: celery.beat:CRITICAL:   File "/usr/lib/python2.6/site-packages/celery/beat.py", line 486, in get_scheduler
Jun 17 20:00:01 box pulp: celery.beat:CRITICAL:     lazy=lazy)
Jun 17 20:00:01 box pulp: celery.beat:CRITICAL:   File "/usr/lib/python2.6/site-packages/celery/utils/imports.py", line 53, in instantiate
Jun 17 20:00:01 box pulp: celery.beat:CRITICAL:     return symbol_by_name(name)(*args, **kwargs)
Jun 17 20:00:01 box pulp: celery.beat:CRITICAL:   File "/usr/lib/python2.6/site-packages/pulp/server/async/scheduler.py", line 282, in __init__
Jun 17 20:00:01 box pulp: celery.beat:CRITICAL:     super(Scheduler, self).__init__(*args, **kwargs)
Jun 17 20:00:01 box pulp: celery.beat:CRITICAL:   File "/usr/lib/python2.6/site-packages/celery/beat.py", line 184, in __init__
Jun 17 20:00:01 box pulp: celery.beat:CRITICAL: self.setup_schedule()
Jun 17 20:00:01 box pulp: celery.beat:CRITICAL:   File "/usr/lib/python2.6/site-packages/pulp/server/async/scheduler.py", line 328, in setup_schedule
Jun 17 20:00:01 box pulp: celery.beat:CRITICAL: db_connection.initialize()
Jun 17 20:00:01 box pulp: celery.beat:CRITICAL:   File "/usr/lib/python2.6/site-packages/pulp/server/db/connection.py", line 67, in initialize
Jun 17 20:00:01 box pulp: celery.beat:CRITICAL:     _CONNECTION = pymongo.MongoClient(seeds, **connection_kwargs)
Jun 17 20:00:01 box pulp: celery.beat:CRITICAL:   File "/usr/lib64/python2.6/site-packages/pymongo/mongo_client.py", line 337, in __init__
Jun 17 20:00:01 box pulp: celery.beat:CRITICAL:     raise ConnectionFailure(str(e))
Jun 17 20:00:01 box pulp: celery.beat:CRITICAL: ConnectionFailure: could not connect to localhost:27017: [Errno 111] Connection refused



Version-Release number of selected component (if applicable):
pulp-server-2.4.0-0.20.beta.el6.noarch

How reproducible:
always

Steps to Reproduce:
1.  On a not so fast box, install and configure pulp
2.  Reboot the box
3.  On startup check to make sure the pulp_* services are running.  IF they are repeat step 2.


Another way:

1.  Shut down mongod
2.  Restart pulp_celerybeat
3.  Start mongo
4.  Check to see if pulp_celerybeat is running

--- Additional comment from  on 2014-06-18 10:10:45 EDT ---

I believe httpd also should be looked into in addition to pulp_* services to ensure all services do the following:

1. Start normally without mongod running
2. A resilient against mongod being stopped for long periods of time

Comment 1 RHEL Program Management 2014-06-18 15:35:19 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Brad Buckingham 2014-08-06 15:03:21 UTC
Moving to POST since the upstream pulp BZ is now VERIFIED.

Comment 8 Brian Bouterse 2014-08-28 11:15:04 UTC
MongoDB is a required component for pulp_celerybeat to complete its startup correctly. It cannot complete its startup until mongoDB is available. It would be incorrect for pulp_celerybeat to finish booting without MongoDB being available.

pulp_celerybeat does report errors about MongoDB not being available if it is not while pulp_celerybeat is starting. This is a desirable behavior.

pulp_celerybeat monitors for the availability of MongoDB, and once it's available it finishes booting, a behavior I believe you've observed above.

pulp_celerybeat also recovers if MongoDB becomes unavailable, but that is a separate feature than non-availability on startup of pulp_celerybeat.

I wanted to write a few comments on the behavior as it was written. If any of this either deviates from the expected behavior, or if the expected behavior is not the desired behavior for satellite, please let me know.

Comment 10 Bryan Kearney 2014-09-11 12:28:26 UTC
This was delivered with Satellite 6.0 which was released on 10 September 2014.

Comment 11 Red Hat Bugzilla 2023-09-14 02:10:19 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days