Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
if you script out some shell commands, then run them via the shell in non-interactive mode we sometimes give an erroneous "I couldn't find that file" response when the master(s) are in a bad state instead of revealing the underlying cluster issue.
e.g.
tmpfile=$(mktemp) echo "balance_switch false" > $tmpfile echo "exit" >> $tmpfile $HBASE_BIN --config $CONF_DIR shell -n $tmpfile RET=$? rm $tmpfile exit $RET
as an example, with a master stuck trying to initialize as active the failure might look like
++ mktemp
+ tmpfile=/tmp/tmp.dMHTj0nVXx
+ echo balance_switch true
+ echo exit
+ bin/hbase --config /etc/hbase/conf shell -n /tmp/tmp.dMHTj0nVXx
LoadError: no such file to load -- /tmp/tmp.dMHTj0nVXx
load at org/jruby/RubyKernel.java:974
<main> at /some/path/to/lib/hbase/bin/hirb.rb:186
+ RET=1
+ rm /tmp/tmp.dMHTj0nVXx
+ exit 1
which is very confusing. the shell should report something related to an issue talking to the cluster rather than a problem with the passed script.