Bug 1004855

Summary: The admin client's default error message tells users to run pulp-manage-db, even when that's not the problem
Product: [Retired] Pulp Reporter: Randy Barlow <rbarlow>
Component: user-experienceAssignee: pulp-bugs
Status: CLOSED DUPLICATE QA Contact: Preethi Thomas <pthomas>
Severity: medium Docs Contact:
Priority: low    
Version: MasterCC: cduryee
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-18 00:01:14 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:

Description Randy Barlow 2013-09-05 15:38:05 UTC
Our admin client will tell users that the likely cause of unhandled exceptions on the server is that they need to run pulp-manage-db. This can be misleading, as there are real situations that this is not the likely cause. For example, uploading an ISO that fails to validate (for example, due to being named PULP_MANIFEST) will cause this message:

$ pulp-admin iso repo uploads upload --repo-id test -f PULP_MANIFEST
+----------------------------------------------------------------------+
                              Unit Upload
+----------------------------------------------------------------------+

Extracting necessary metadata for each request...
[==================================================] 100%
Analyzing: PULP_MANIFEST
... completed

Creating upload requests on the server...
[==================================================] 100%
Initializing: PULP_MANIFEST
... completed

Starting upload of selected units. If this process is stopped through ctrl+c,
the uploads will be paused and may be resumed later using the resume command or
cancelled entirely using the cancel command.

Uploading: PULP_MANIFEST
... completed

Importing into the repository...
The web server reported an error trying to access the Pulp application. The
likely cause is that the pulp-manage-db script has not been run prior to
starting the server. More information can be found in Apache's error log file on
the server itself.

In the general case, it would be more helpful to just tell the user than an unhandled exception occurred, and to please have a look at the server log for more information.

It would probably be a good improvement to add the ability to detect the situation when pulp-manage-db really does need to be run, so that we can reliably tell the user that was the problem. The code to detect this situation is already present, so we would just need the server to return an appropriate error code to API users when there are unapplied migrations.

Comment 1 Chris Duryee 2014-11-18 00:01:14 UTC
Marking as duplicate of 1145734 which updated the error message.

*** This bug has been marked as a duplicate of bug 1145734 ***