X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/84b1188849d454675d37fbef818e96adf1215f2c..2.3-release:/tools/salt-install/provision.sh diff --git a/tools/salt-install/provision.sh b/tools/salt-install/provision.sh index c4221d2056..ff25403e55 100755 --- a/tools/salt-install/provision.sh +++ b/tools/salt-install/provision.sh @@ -195,7 +195,7 @@ CUSTOM_CERTS_DIR="${SCRIPT_DIR}/certs" # The "local.params.example.*" files already set "RELEASE=production" # to deploy production-ready packages RELEASE="production" -VERSION="2.3.2-1" +VERSION="2.3.3-1" # These are arvados-formula-related parameters # An arvados-formula tag. For a stable release, this should be a @@ -257,6 +257,14 @@ fi if [ ! -z "${HOSTNAME_EXT}" ] ; then # We need to add some extra control vars to manage a single certificate vs. multiple USE_SINGLE_HOSTNAME="yes" + # Make sure that the value configured as IP_INT is a real IP on the system. + # If we don't error out early here when there is a mismatch, the formula will + # fail with hard to interpret nginx errors later on. + ip addr list |grep -q " ${IP_INT}/" + if [[ $? -ne 0 ]]; then + echo "Unable to find the IP_INT address '${IP_INT}' on the system, please correct the value in local.params. Exiting..." + exit 1 + fi else USE_SINGLE_HOSTNAME="no" # We set this variable, anyway, so sed lines do not fail and we don't need to add more @@ -587,7 +595,7 @@ if [ -z "${ROLES}" ]; then CERT_NAME=${c} fi - if [[ "${SSL_MODE}" = "bring-your-own" || "${SSL_MODE}" == "self-signed" ]]; then + if [[ "$SSL_MODE" == "bring-your-own" ]]; then copy_custom_cert ${CUSTOM_CERTS_DIR} ${CERT_NAME} fi @@ -776,8 +784,10 @@ echo '\pset pager off' >> /root/.psqlrc salt-call --local state.apply -l ${LOG_LEVEL} # Finally, make sure that /etc/hosts is not overwritten on reboot -# TODO: will this work on CentOS? -sed -i 's/^manage_etc_hosts: true/#manage_etc_hosts: true/g' /etc/cloud/cloud.cfg.d/* +if [ -d /etc/cloud/cloud.cfg.d ]; then + # TODO: will this work on CentOS? + sed -i 's/^manage_etc_hosts: true/#manage_etc_hosts: true/g' /etc/cloud/cloud.cfg.d/* +fi # FIXME! #16992 Temporary fix for psql call in arvados-api-server if [ "x${DELETE_PSQL}" = "xyes" ]; then