-
Notifications
You must be signed in to change notification settings - Fork 24
60 lines (47 loc) · 2.32 KB
/
debug-metadata.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# name: Debug Metadata
# on:
# push:
# concurrency:
# group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
# cancel-in-progress: true
# jobs:
# integration-tests:
# name: Run TGI Integration Tests
# runs-on:
# group: gcp-ct5lp-hightpu-8t
# steps:
# - name: Install DNS utilities
# run: |
# sudo apt-get update -y
# sudo apt-get install -y dnsutils iputils-ping curl
# - name: Debug metadata
# run: |
# echo "nslookup metadata.google.internal"
# nslookup metadata.google.internal
# echo "ping -c 3 metadata.google.internal"
# ping -c 3 metadata.google.internal
# echo "ping -c 3 169.254.169.254"
# ping -c 3 169.254.169.254
# echo "Get the IP address of metadata.google.internal using getent"
# # Get the IP address of metadata.google.internal using getent
# METADATA_IP=$(getent hosts metadata.google.internal | awk '{ print $1 }')
# echo "Metadata server IP address: ${METADATA_IP}"
# echo "Fetching instance metadata directory:"
# curl -s http://metadata.google.internal/computeMetadata/v1/instance/ -H "Metadata-Flavor: Google"
# echo
# STATUS_CODE=$(curl -s -o /dev/null -w "%{http_code}" "http://metadata.google.internal/computeMetadata/v1/instance/image" -H "Metadata-Flavor: Google")
# RESPONSE=$(curl -s "http://metadata.google.internal/computeMetadata/v1/instance/image" -H "Metadata-Flavor: Google")
# echo "Status code: $STATUS_CODE"
# echo "Metadata response: $RESPONSE"
# if [ "$STATUS_CODE" -ne 200 ]; then
# echo "Failed to fetch instance image metadata"
# exit 1
# fi
# STATUS_CODE=$(curl -s -o /dev/null -w "%{http_code}" "http://metadata.google.internal/computeMetadata/v1/instance/attributes/tpu-env" -H "Metadata-Flavor: Google")
# RESPONSE=$(curl -s "http://metadata.google.internal/computeMetadata/v1/instance/attributes/tpu-env" -H "Metadata-Flavor: Google")
# echo "Status code: $STATUS_CODE"
# echo "Metadata response: $RESPONSE"
# if [ "$STATUS_CODE" -ne 200 ]; then
# echo "Failed to fetch TPU environment metadata"
# exit 1
# fi