Project

Profile

Help

Issue #424

pulp-manage-db stacks-dumps with no connection to mongodb

Added by mkovacik@redhat.com over 5 years ago. Updated over 1 year ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Low
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
2.4 Beta
Platform Release:
2.6.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Description of problem:
When unable to connect to the database, pulp-manage-db stack-dumps

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

How reproducible:
always

Steps to Reproduce:
1. mongo pulp_database --eval "db.dropDatabase()"
2. systemctl stop mongod.service
3. sudo -u apache pulp-manage-db

Actual results:
A stack dump dumped

Expected results:
Error condition properly logged by pulp-manage-db

Additional info:

  1. screen log
    [root@ec2-54-73-48-94 pulp_auto]# systemctl stop mongod
    [root@ec2-54-73-48-94 pulp_auto]# sudo -u apache pulp-manage-db
    No handlers could be found for logger "pulp.server.db.connection"
    Traceback (most recent call last):
    File "/bin/pulp-manage-db", line 9, in <module>
    load_entry_point('pulp-server==2.4.0', 'console_scripts', 'pulp-manage-db')()
    File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 357, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
    File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2394, in load_entry_point
    return ep.load()
    File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2108, in load
    entry = import(self.module_name, globals(),globals(), ['__name__'])
    File "/usr/lib/python2.7/site-packages/pulp/server/db/manage.py", line 30, in <module>
    connection.initialize()
    File "/usr/lib/python2.7/site-packages/pulp/server/db/connection.py", line 67, in initialize
    _CONNECTION = pymongo.MongoClient(seeds, **connection_kwargs)
    File "/usr/lib64/python2.7/site-packages/pymongo/mongo_client.py", line 337, in init
    raise ConnectionFailure(str(e))
    pymongo.errors.ConnectionFailure: could not connect to localhost:27017: [Errno 111] Connection refused

+ This bug was cloned from Bugzilla Bug #1093763 +

History

#1 Updated by amacdona@redhat.com over 5 years ago

Appears to have been fixed from other patches.

+ This comment was cloned from Bugzilla #1093763 comment 1 +

#2 Updated by pthomas@redhat.com over 5 years ago

Fails-qa
[root@qe-blade-13 ~]# rpm -qa pulp-server
pulp-server-2.4.1-0.8.beta.el6.noarch
[root@qe-blade-13 ~]#

The it does not dump stack trace but you will have to Ctrl+C out

[root@qe-blade-13 ~]# sudo -u apache pulp-manage-db
No handlers could be found for logger "pulp.server.db.connection"

^CTraceback (most recent call last):
File "/usr/bin/pulp-manage-db", line 9, in <module>
load_entry_point('pulp-server==2.4.0', 'console_scripts', 'pulp-manage-db')()
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 299, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2229, in load_entry_point
return ep.load()
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1948, in load
entry = import(self.module_name, globals(),globals(), ['__name__'])
File "/usr/lib/python2.6/site-packages/pulp/server/db/manage.py", line 30, in <module>
connection.initialize()
File "/usr/lib/python2.6/site-packages/pulp/server/db/connection.py", line 71, in initialize
time.sleep(next_delay)
KeyboardInterrupt
[root@qe-blade-13 ~]#

+ This comment was cloned from Bugzilla #1093763 comment 2 +

#3 Updated by amacdona@redhat.com over 5 years ago

Previous fix caused pulp-manage-db to wait for mongo if the connection cannot be made. This change allows the event to be logged and printed to the console.

Fixed by https://github.com/pulp/pulp/pull/1162

+ This comment was cloned from Bugzilla #1093763 comment 3 +

#4 Updated by cduryee over 5 years ago

fixed in pulp 2.6.0-0.2.beta

+ This comment was cloned from Bugzilla #1093763 comment 4 +

#5 Updated by pthomas@redhat.com over 5 years ago

verified
[root@cloud-qe-4 yum.repos.d]# rpm -qa pulp-server
pulp-server-2.6.0-0.5.beta.el7.noarch
[root@cloud-qe-4 yum.repos.d]#

[root@cloud-qe-4 yum.repos.d]# systemctl stop mongod.service
[root@cloud-qe-4 yum.repos.d]# sudo -u apache pulp-manage-db
Could not connect to MongoDB at localhost:27017:
Cannot connect to database default :
could not connect to localhost:27017: [Errno 111] Connection refused
... Waiting 1 seconds and trying again.
Could not connect to MongoDB at localhost:27017:
Cannot connect to database default :
could not connect to localhost:27017: [Errno 111] Connection refused
... Waiting 1 seconds and trying again.
Could not connect to MongoDB at localhost:27017:
Cannot connect to database default :

+ This comment was cloned from Bugzilla #1093763 comment 5 +

#6 Updated by rbarlow over 5 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE

#8 Updated by bmbouter over 1 year ago

  • Severity set to 2. Medium

#9 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF