HBASE-24458 release scripts using docker should specify needed disk consistency
closes #1813 Signed-off-by: Viraj Jasani <vjasani@apache.org> Signed-off-by: Bharath Vissapragada <bharathv@apache.org> Signed-off-by: Michael Stack <stack@apache.org> Signed-off-by: Jan Hentschel <jan.hentschel@ultratendency.com>
This commit is contained in:
parent
61a7468df7
commit
2eb993a0f0
|
@ -181,14 +181,14 @@ if [ -n "${GIT_REPO}" ]; then
|
||||||
ssh://*|git://*|http://*|https://*|ftp://*|ftps://*) ;;
|
ssh://*|git://*|http://*|https://*|ftp://*|ftps://*) ;;
|
||||||
# for sure local
|
# for sure local
|
||||||
/*)
|
/*)
|
||||||
GIT_REPO_MOUNT=(--mount "type=bind,src=${GIT_REPO},dst=/opt/hbase-repo")
|
GIT_REPO_MOUNT=(--mount "type=bind,src=${GIT_REPO},dst=/opt/hbase-repo,consistency=delegated")
|
||||||
echo "HOST_GIT_REPO=${GIT_REPO}" >> "${ENVFILE}"
|
echo "HOST_GIT_REPO=${GIT_REPO}" >> "${ENVFILE}"
|
||||||
GIT_REPO="/opt/hbase-repo"
|
GIT_REPO="/opt/hbase-repo"
|
||||||
;;
|
;;
|
||||||
# on the host but normally git wouldn't use the local optimization
|
# on the host but normally git wouldn't use the local optimization
|
||||||
file://*)
|
file://*)
|
||||||
echo "[INFO] converted file:// git repo to a local path, which changes git to assume --local."
|
echo "[INFO] converted file:// git repo to a local path, which changes git to assume --local."
|
||||||
GIT_REPO_MOUNT=(--mount "type=bind,src=${GIT_REPO#file://},dst=/opt/hbase-repo")
|
GIT_REPO_MOUNT=(--mount "type=bind,src=${GIT_REPO#file://},dst=/opt/hbase-repo,consistency=delegated")
|
||||||
echo "HOST_GIT_REPO=${GIT_REPO}" >> "${ENVFILE}"
|
echo "HOST_GIT_REPO=${GIT_REPO}" >> "${ENVFILE}"
|
||||||
GIT_REPO="/opt/hbase-repo"
|
GIT_REPO="/opt/hbase-repo"
|
||||||
;;
|
;;
|
||||||
|
@ -217,7 +217,7 @@ if [ -n "${GIT_REPO}" ]; then
|
||||||
if [ -n "${local_path}" ]; then
|
if [ -n "${local_path}" ]; then
|
||||||
# convert to an absolute path
|
# convert to an absolute path
|
||||||
GIT_REPO="$(cd "$(dirname "${ORIG_PWD}/${GIT_REPO}")"; pwd)/$(basename "${ORIG_PWD}/${GIT_REPO}")"
|
GIT_REPO="$(cd "$(dirname "${ORIG_PWD}/${GIT_REPO}")"; pwd)/$(basename "${ORIG_PWD}/${GIT_REPO}")"
|
||||||
GIT_REPO_MOUNT=(--mount "type=bind,src=${GIT_REPO},dst=/opt/hbase-repo")
|
GIT_REPO_MOUNT=(--mount "type=bind,src=${GIT_REPO},dst=/opt/hbase-repo,consistency=delegated")
|
||||||
echo "HOST_GIT_REPO=${GIT_REPO}" >> "${ENVFILE}"
|
echo "HOST_GIT_REPO=${GIT_REPO}" >> "${ENVFILE}"
|
||||||
GIT_REPO="/opt/hbase-repo"
|
GIT_REPO="/opt/hbase-repo"
|
||||||
fi
|
fi
|
||||||
|
@ -227,9 +227,11 @@ if [ -n "${GIT_REPO}" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Building $RELEASE_TAG; output will be at $WORKDIR/output"
|
echo "Building $RELEASE_TAG; output will be at $WORKDIR/output"
|
||||||
|
# Where possible we specifcy "consistency=delegated" when we do not need host access during the
|
||||||
|
# build run. On Mac OS X specifically this gets us a big perf improvement.
|
||||||
cmd=(docker run -ti \
|
cmd=(docker run -ti \
|
||||||
--env-file "$ENVFILE" \
|
--env-file "$ENVFILE" \
|
||||||
--volume "$WORKDIR:/opt/hbase-rm" \
|
--mount "type=bind,src=${WORKDIR},dst=/opt/hbase-rm,consistency=delegated" \
|
||||||
"${JAVA_VOL[@]}" \
|
"${JAVA_VOL[@]}" \
|
||||||
"${GIT_REPO_MOUNT[@]}" \
|
"${GIT_REPO_MOUNT[@]}" \
|
||||||
"hbase-rm:$IMGTAG")
|
"hbase-rm:$IMGTAG")
|
||||||
|
|
Loading…
Reference in New Issue