pulp-manage-db does not handle missing /dev/log gracefully
Description of problem:
If pulp-manage-db is run on a machine that does not have /dev/log, the user will see error messages that they do not understand (similar to "Nonetype has no attribute critical"). It would be better if we printed an informative error to stderr and exited with a non-zero exit code.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Take some action to remove /dev/log (stopping rsyslogd might do the trick)
2. Run pulp-manage-db
You will get difficult-to-understand error messages on the console (and obviously, no log messages).
You should get a meaningful error message on the console and a non-zero exit code. Obviously, still nothing should/could be logged.
+ This bug was cloned from Bugzilla Bug #1173310 +
#7 Updated by firstname.lastname@example.org about 5 years ago
- Status changed from 5 to 6
[root@mgmt7 ~]# [root@mgmt7 ~]# service rsyslog stop Shutting down system logger: [ OK ] [root@mgmt7 ~]# [root@mgmt7 ~]# [root@mgmt7 ~]# [root@mgmt7 ~]# sudo -u apache pulp-manage-db Unable to access to log, /dev/log. [root@mgmt7 ~]# [root@mgmt7 ~]# [root@mgmt7 ~]# service rsyslog start Starting system logger: [ OK ] [root@mgmt7 ~]# [root@mgmt7 ~]# [root@mgmt7 ~]# sudo -u apache pulp-manage-db Mongo database for connection is version 2.4.13 Loading content types. Loading type descriptors [rpm_support.json, iso_support.json, puppet.json] Parsing type descriptors Validating type descriptor syntactic integrity Validating type descriptor semantic integrity Updating the database with types [distribution, drpm, erratum, package_group, package_category, package_environment, rpm, srpm, yum_repo_metadata_file, iso, puppet_module] /usr/lib/python2.6/site-packages/pulp/server/db/connection.py:167: DeprecationWarning: The safe parameter is deprecated. Please use write concern options instead. return method(*args, **kwargs) Content types loaded. Ensuring the admin role and user are in place. Admin role and user are in place. Beginning database migrations. Migration package pulp.server.db.migrations is up to date at version 12 Migration package pulp_puppet.plugins.migrations is up to date at version 2 Migration package pulp_rpm.plugins.migrations is up to date at version 21 Database migrations complete. <\pre>
Please register to edit this issue