Bug 1106413 - psql wrapper always return zero even if psql command is already failed.
Summary: psql wrapper always return zero even if psql command is already failed.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Image
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Jakub Hadvig
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks: 1106414
TreeView+ depends on / blocked
 
Reported: 2014-06-09 09:45 UTC by Johnny Liu
Modified: 2015-05-15 00:42 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1106414 (view as bug list)
Environment:
Last Closed: 2014-07-15 10:30:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Johnny Liu 2014-06-09 09:45:06 UTC
Description of problem:
Check psql wrapper function in /usr/bin/rhcsh, psql command's return value is always return 0.

Version-Release number of selected component (if applicable):
devenv_4850

How reproducible:
Always

Steps to Reproduce:
1.Create app, and embed postgresql.
2.Log into this app, run psql command with non-existing file.
> psql -f xx; echo $?
psql: FATAL:  password authentication failed for user "admin1hygbvy"
0
3.

Actual results:
It always return 0.

Expected results:
Psql wrapper should return non-zero value when psql command is failed.

Additional info:

Comment 1 openshift-github-bot 2014-06-11 14:47:00 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/73808983505a93095351d503742809a343b36de5
Bug 1106413: psql wrapper always return zero even if psql command is already failed

Comment 2 Johnny Liu 2014-06-12 04:15:01 UTC
Verified this bug with devenv_4860, and PASS.

> psql -f xx; echo $?
xx: No such file or directory
1


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