Hello Ottomata,

I'd like you to do a code review.  Please visit

    https://gerrit.wikimedia.org/r/177715

to review the following change.

Change subject: Improve error message in deploy script, if Oozie's Hive config 
is not readable
......................................................................

Improve error message in deploy script, if Oozie's Hive config is not readable

Change-Id: Ic5e69089d11eae3e86f4ec0fc082ad6acc04c0cf
---
M bin/refinery-deploy-to-hdfs
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery 
refs/changes/15/177715/1

diff --git a/bin/refinery-deploy-to-hdfs b/bin/refinery-deploy-to-hdfs
index c0d1c75..b5ce60c 100755
--- a/bin/refinery-deploy-to-hdfs
+++ b/bin/refinery-deploy-to-hdfs
@@ -168,6 +168,16 @@
         error "Could not find oozie's hive config at 
'$OOZIES_HIVE_CONFIG_FILE_RELR'"
     fi
 
+    # Since Oozie's hive config is typically a link to /etc/hive/... it might 
be
+    # that the below test for passwords fails because the config file is not
+    # readable. To provide a better error message for this case, we single it
+    # out.
+    if [ ! -r "$OOZIES_HIVE_CONFIG_FILE_RELR" ]
+    then
+        error "Oozie's hive config at '$OOZIES_HIVE_CONFIG_FILE_RELR' is not \
+readable"
+    fi
+
     if grep -q -i 'password' "$OOZIES_HIVE_CONFIG_FILE_RELR"
     then
         error "Oozie's hive config at '$OOZIES_HIVE_CONFIG_FILE_RELR' matches \

-- 
To view, visit https://gerrit.wikimedia.org/r/177715
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic5e69089d11eae3e86f4ec0fc082ad6acc04c0cf
Gerrit-PatchSet: 1
Gerrit-Project: analytics/refinery
Gerrit-Branch: master
Gerrit-Owner: QChris <[email protected]>
Gerrit-Reviewer: Ottomata <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to