Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/17386 )
Change subject: IMPALA-10694: Improve the error handling of setup-ranger ...................................................................... IMPALA-10694: Improve the error handling of setup-ranger We found that setup-ranger will continue the execution if an error occurs when i) wget was executed to initialize the environment variables of GROUP_ID_OWNER and GROUP_ID_NON_OWNER, and ii) curl was executed to upload a revised Ranger policy even though the -e option was set when create-load-data.sh was executed. This patch improves the error handling by making setup-ranger exit as soon as an error occurs so that no test would be run at all in case there is an error. To exit if an error occurs during wget, we separate the assignment and the export of the environment variables since the export of an environment variable will run and succeed even though there is an error before the export if the assignment and the export are combined. That is, combining them hides the error. On the other hand, to exit if an error occurs during curl, we add an additional -f option so that an error will no longer be silently ignored. Testing: - Verified that setup-ranger could be successfully executed after this patch. - Verified that setup-ranger would exit if a URL in setup-ranger is not correctly set up or if the 'id' field in policy_4_revised.json does not match the URL of the policy to be updated. Change-Id: I45605d1a7441b734cf80249626638cde3adce28b Reviewed-on: http://gerrit.cloudera.org:8080/17386 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- M testdata/bin/create-load-data.sh 1 file changed, 6 insertions(+), 3 deletions(-) Approvals: Impala Public Jenkins: Looks good to me, approved; Verified -- To view, visit http://gerrit.cloudera.org:8080/17386 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I45605d1a7441b734cf80249626638cde3adce28b Gerrit-Change-Number: 17386 Gerrit-PatchSet: 6 Gerrit-Owner: Fang-Yu Rao <[email protected]> Gerrit-Reviewer: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Fang-Yu Rao <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]>
