Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integration-tests/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ EXPOSE 8300 8301 8302 8303 8304 8305
EXPOSE 9092 9093

WORKDIR /var/lib/druid
ENTRYPOINT export HOST_IP="$(resolveip -s $HOSTNAME)" && /tls/generate-server-certs-and-keystores.sh && exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
ENTRYPOINT export HOST_IP="$(curl ifconfig.me)" && /tls/generate-server-certs-and-keystores.sh && exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs an internet connection, and relies on an external web service that might go away. I think we can do it without needing one. How about:

host `hostname` | perl -nle '/has address (.*)/ && print $1'

The two most common dns lookup commands AFAIK are host and dig, so probably either one would be fine.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. And i think @leventov already had a fix based on dig here: #6702 which also looks good to me.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

export DOCKER_HOST_IP=$(resolveip -s $HOSTNAME)
export DOCKER_HOST_IP=$(curl ifconfig.me)

cat <<EOT > expired_csr.conf
[req]
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/docker/tls/generate-good-client-cert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

export DOCKER_HOST_IP=$(resolveip -s $HOSTNAME)
export DOCKER_HOST_IP=$(curl ifconfig.me)

cat <<EOT > csr.conf
[req]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

export DOCKER_HOST_IP=$(resolveip -s $HOSTNAME)
export DOCKER_HOST_IP=$(curl ifconfig.me)

# Generate a client cert with an incorrect hostname for testing
cat <<EOT > invalid_hostname_csr.conf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

export DOCKER_HOST_IP=$(resolveip -s $HOSTNAME)
export DOCKER_HOST_IP=$(curl ifconfig.me)

cat <<EOT > invalid_ca_intermediate.conf
[req]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

export DOCKER_HOST_IP=$(resolveip -s $HOSTNAME)
export DOCKER_HOST_IP=$(curl ifconfig.me)

# Generate a client cert that will be revoked
cat <<EOT > revoked_csr.conf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

export DOCKER_HOST_IP=$(resolveip -s $HOSTNAME)
export DOCKER_HOST_IP=$(curl ifconfig.me)

cat <<EOT > csr_another_root.conf
[req]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

export DOCKER_HOST_IP=$(resolveip -s $HOSTNAME)
export DOCKER_HOST_IP=$(curl ifconfig.me)

cat <<EOT > ca_intermediate.conf
[req]
Expand Down