From 2b06f26b3421431a961c9763ad8a5c9762b543c9 Mon Sep 17 00:00:00 2001 From: Ward Vandewege Date: Tue, 1 Mar 2022 12:50:55 -0500 Subject: [PATCH] 18785: add explicit test that IP_INT is set correctly in the single host case. Arvados-DCO-1.1-Signed-off-by: Ward Vandewege --- tools/salt-install/provision.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/salt-install/provision.sh b/tools/salt-install/provision.sh index 8bca9d0bd5..f467c77e78 100755 --- a/tools/salt-install/provision.sh +++ b/tools/salt-install/provision.sh @@ -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 -- 2.30.2