Bug #11857
admin/build-doc: script fails silently under certain circumstances
0%
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
Associated revisions
admin/build-doc: fix dependency checks
Fixes: #11857
Signed-off-by: John Spray <john.spray@redhat.com>
admin/build-doc: fix dependency checks
http://tracker.ceph.com/issues/11857 Fixes: #11857
Signed-off-by: John Spray <john.spray@redhat.com>
(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