Skip to content

Commit

Permalink
Use IP address for calling the metadata server. (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
illfelder authored Jul 7, 2021
1 parent 6223e90 commit d90f703
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion google_guest_agent/clock.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (a *clockskewMgr) set() error {
}()
}
// TODO get server
return runCmd(exec.Command("ntpdate", "metadata.google.internal"))
return runCmd(exec.Command("ntpdate", "169.254.169.254"))
}

res := runCmdOutput(exec.Command("/sbin/hwclock", "--hctosys", "-u", "--noadjfile"))
Expand Down
2 changes: 1 addition & 1 deletion google_metadata_script_runner/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import (
var (
programName = "GCEMetadataScripts"
version = "dev"
metadataURL = "http://metadata.google.internal/computeMetadata/v1"
metadataURL = "http://169.254.169.254/computeMetadata/v1"
metadataHang = "/?recursive=true&alt=json&timeout_sec=10&last_etag=NONE"
defaultTimeout = 20 * time.Second
powerShellArgs = []string{"-NoProfile", "-NoLogo", "-ExecutionPolicy", "Unrestricted", "-File"}
Expand Down

0 comments on commit d90f703

Please sign in to comment.