Project

General

Profile

Bug #11857

admin/build-doc: script fails silently under certain circumstances

Added by Nathan Cutler almost 9 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
hammer
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

On openSUSE, admin/build-doc fails silently due to missing commands. Although the script has code for reporting which commands are missing, due to the presence of "set -e" at the beginning of the script the script bails out immediately when "command -v" returns a nonzero status.

The "set -e" was introduced by this commit: https://github.com/ceph/ceph/commit/c5a74a73d2a37825f91a89cfe2868aac4fb95260

One option would be to add error-checking code to any commands (like pip) that might fail.

If this is deemed to be too much trouble, Kefu Chai suggested we could also disable "set -e" right before "command -v" and re-enable it immediately after.


Related issues

Copied to devops - Backport #11902: admin/build-doc: script fails silently under certain circumstances Resolved 06/03/2015

Associated revisions

Revision 539c1ba7 (diff)
Added by John Spray almost 9 years ago

admin/build-doc: fix dependency checks

Fixes: #11857
Signed-off-by: John Spray <>

Revision ba1a0167 (diff)
Added by John Spray almost 9 years ago

admin/build-doc: fix dependency checks

http://tracker.ceph.com/issues/11857 Fixes: #11857

Signed-off-by: John Spray <>
(cherry picked from commit 539c1ba7211f579bad4f59ae824f1e68e620ecbd)

Conflicts:
admin/build-doc
Insert lines at appropriate spot

History

#1 Updated by John Spray almost 9 years ago

  • Status changed from New to Fix Under Review

As kefu says, we should just wait until after the dependency checks to enable -e

https://github.com/ceph/ceph/pull/4836

BTW I doubt this actually failed silently? It would have returned whatever error code was raised by the failing command (unless you just mean it didn't print anything)

#2 Updated by Nathan Cutler almost 9 years ago

Thanks, John. The issue I ran into when I ran admin/build-doc on my openSUSE system was that admin/build-doc looks for apt-get and yum, but of course finds neither. It then proceeds to run 'command -v' on a bunch of things that it needs. It does not find, e.g., ditaa because ditaa is not yet packaged for openSUSE and I don't have it installed. Due to the presence of 'set -e' at the top, the script exits immediately after the failing 'command -v' instead of going on to report the missing command.

#3 Updated by Nathan Cutler almost 9 years ago

  • Status changed from Fix Under Review to Pending Backport

#4 Updated by Loïc Dachary over 8 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF