Project

General

Profile

Actions

Bug #11857

closed

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 1 (0 open1 closed)

Copied to devops - Backport #11902: admin/build-doc: script fails silently under certain circumstancesResolvedNathan Cutler06/03/2015Actions
Actions #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)

Actions #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.

Actions #3

Updated by Nathan Cutler almost 9 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #4

Updated by Loïc Dachary over 8 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF