Issue 3509: ssh gc command exits 0 even when errors are encountered
Status:  New
Owner: ----
Reported by saxo...@gmail.com, Aug 4, 2015
*****************************************************************
*****                                                       *****
***** !!!! THIS BUG TRACKER IS FOR GERRIT CODE REVIEW !!!!  *****
*****                                                       *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, CYANOGENMOD,  *****
***** INTERNAL ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.*****
*****                                                       *****
*****   THOSE ISSUES BELONG IN DIFFERENT ISSUE TRACKERS     *****
*****                                                       *****
*****************************************************************

Affected Version: 2.11.2

What steps will reproduce the problem?
1. Run ssh <host> gerrit gc --all
2. Make at least one project fail somehow (wrong permissions, low disk space, etc.)
3.

What is the expected output? What do you see instead?

Right now I get text output like 'error: garbage collection for project "project" failed'. I expected the process to also exit with an error status, so my scheduled gc job realizes that an error occurred.

Instead the process exits with 0, so unless I wrap with a script to parse command output, I am unaware that gc encountered errors.


Please provide any additional information below.

Gerrit 2.11.2 w/ OpenJDK 7u79-2.5.6-0ubuntu1.14.04.1 on Ubuntu 14.04.2 LTS. Running gerrit gc via a nightly Jenkins job (which now scans the console log for errors).