[Impala-ASF-CR] Use `curl http://169.254.169.254/` to determine if we're running in aws
Laszlo Gaal has posted comments on this change. ( http://gerrit.cloudera.org:8080/12727 ) Change subject: Use `curl http://169.254.169.254/` to determine if we're running in aws .. Patch Set 1: Code-Review+1 I don't want to block the change; otions 1 is a reasonable approach. In the worst case the code ends up choosing a suboptimal NTP server, but it would still be available -- even the Amazon NTP pool is reachable from outside their cloud. The main point is to keep the timeouts short, so the script does not block for a long time if run on a regular (non-cloud) machine. -- To view, visit http://gerrit.cloudera.org:8080/12727 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iddb2574dbcb3f97cf697095d1777e51ce463b205 Gerrit-Change-Number: 12727 Gerrit-PatchSet: 1 Gerrit-Owner: Hector Acosta Gerrit-Reviewer: Hector Acosta Gerrit-Reviewer: Impala Public Jenkins Gerrit-Reviewer: Laszlo Gaal Gerrit-Comment-Date: Fri, 15 Mar 2019 17:30:11 + Gerrit-HasComments: No
[Impala-ASF-CR] Use `curl http://169.254.169.254/` to determine if we're running in aws
Hector Acosta has posted comments on this change. ( http://gerrit.cloudera.org:8080/12727 ) Change subject: Use `curl http://169.254.169.254/` to determine if we're running in aws .. Patch Set 1: (1 comment) http://gerrit.cloudera.org:8080/#/c/12727/1/bin/bootstrap_system.sh File bin/bootstrap_system.sh: http://gerrit.cloudera.org:8080/#/c/12727/1/bin/bootstrap_system.sh@240 PS1, Line 240: http://169.254.169.254 > On second thought: we may need a stricter test for AWS if the goal is to de I'm not sure I would be able to properly test other non-ec2 cases. But that's outside the scope of what I'm trying to accomplish here. I'm happy to either: a) Re-implement using wget and timeout values. b) Abandon this for now and create a more robust version based on testing whether ntp endpoints are reachable I'm leaning towards a, lmk if you agree. -- To view, visit http://gerrit.cloudera.org:8080/12727 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iddb2574dbcb3f97cf697095d1777e51ce463b205 Gerrit-Change-Number: 12727 Gerrit-PatchSet: 1 Gerrit-Owner: Hector Acosta Gerrit-Reviewer: Hector Acosta Gerrit-Reviewer: Impala Public Jenkins Gerrit-Reviewer: Laszlo Gaal Gerrit-Comment-Date: Wed, 13 Mar 2019 23:26:24 + Gerrit-HasComments: Yes
[Impala-ASF-CR] Use `curl http://169.254.169.254/` to determine if we're running in aws
Laszlo Gaal has posted comments on this change. ( http://gerrit.cloudera.org:8080/12727 ) Change subject: Use `curl http://169.254.169.254/` to determine if we're running in aws .. Patch Set 1: (1 comment) http://gerrit.cloudera.org:8080/#/c/12727/1/bin/bootstrap_system.sh File bin/bootstrap_system.sh: http://gerrit.cloudera.org:8080/#/c/12727/1/bin/bootstrap_system.sh@240 PS1, Line 240: http://169.254.169.254 On second thought: we may need a stricter test for AWS if the goal is to decide if we are running in Amazon's EC2 vs some other, otherwise API-compatible implementation (I'm hesitant to say "OpenStack" here because I don't know if OpenStack is fully API-compatible in this area). If using Amazon's NTP servers depends really on running inside AmazonEC2, then the existence of the metadata service endpoint may not be specific enough. -- To view, visit http://gerrit.cloudera.org:8080/12727 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iddb2574dbcb3f97cf697095d1777e51ce463b205 Gerrit-Change-Number: 12727 Gerrit-PatchSet: 1 Gerrit-Owner: Hector Acosta Gerrit-Reviewer: Impala Public Jenkins Gerrit-Reviewer: Laszlo Gaal Gerrit-Comment-Date: Tue, 12 Mar 2019 17:11:38 + Gerrit-HasComments: Yes
[Impala-ASF-CR] Use `curl http://169.254.169.254/` to determine if we're running in aws
Laszlo Gaal has posted comments on this change. ( http://gerrit.cloudera.org:8080/12727 ) Change subject: Use `curl http://169.254.169.254/` to determine if we're running in aws .. Patch Set 1: (1 comment) http://gerrit.cloudera.org:8080/#/c/12727/1/bin/bootstrap_system.sh File bin/bootstrap_system.sh: http://gerrit.cloudera.org:8080/#/c/12727/1/bin/bootstrap_system.sh@240 PS1, Line 240: curl Two remarks here: 1. curl is historically not used in these scripts, they seem to prefer wget. This is a bit ambiguous, as line 193 above installs curl for RedHat/CentOS, but not for Ubuntu variants. The base Ubuntu:16.04 Docker image definitely does not have it. 2. I'd suggest adding short timeout values to the call (whether you end up using wget or curl) to avoid stalling the script, just in case. bin/check-s3-access.sh uses something similar; it has short timeouts for a similar check. -- To view, visit http://gerrit.cloudera.org:8080/12727 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iddb2574dbcb3f97cf697095d1777e51ce463b205 Gerrit-Change-Number: 12727 Gerrit-PatchSet: 1 Gerrit-Owner: Hector Acosta Gerrit-Reviewer: Impala Public Jenkins Gerrit-Reviewer: Laszlo Gaal Gerrit-Comment-Date: Tue, 12 Mar 2019 16:51:23 + Gerrit-HasComments: Yes
[Impala-ASF-CR] Use `curl http://169.254.169.254/` to determine if we're running in aws
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/12727 ) Change subject: Use `curl http://169.254.169.254/` to determine if we're running in aws .. Patch Set 1: Build Successful https://jenkins.impala.io/job/gerrit-code-review-checks/2415/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests. -- To view, visit http://gerrit.cloudera.org:8080/12727 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iddb2574dbcb3f97cf697095d1777e51ce463b205 Gerrit-Change-Number: 12727 Gerrit-PatchSet: 1 Gerrit-Owner: Hector Acosta Gerrit-Reviewer: Impala Public Jenkins Gerrit-Comment-Date: Tue, 12 Mar 2019 16:37:40 + Gerrit-HasComments: No
[Impala-ASF-CR] Use `curl http://169.254.169.254/` to determine if we're running in aws
Hector Acosta has uploaded this change for review. ( http://gerrit.cloudera.org:8080/12727 Change subject: Use `curl http://169.254.169.254/` to determine if we're running in aws .. Use `curl http://169.254.169.254/` to determine if we're running in aws https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/identify_ec2_instances.html lists the above endpoint as the first choice. In my running instance `dmidecode -s bios-version` prints out: 1.0 dmidecode --string system-uuid|grep ^ec2 seems like a valid alternative here. I removed the `grep` assertions since it's possible that images may have already configured ntp here. Change-Id: Iddb2574dbcb3f97cf697095d1777e51ce463b205 --- M bin/bootstrap_system.sh 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/27/12727/1 -- To view, visit http://gerrit.cloudera.org:8080/12727 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Iddb2574dbcb3f97cf697095d1777e51ce463b205 Gerrit-Change-Number: 12727 Gerrit-PatchSet: 1 Gerrit-Owner: Hector Acosta