Skip to content

Commit 087f131

Browse files
onlyshawnSibcgh
authored andcommitted
Replace error with warning when access metadata server (google#603)
1 parent 2a8233c commit 087f131

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/attest.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55
"fmt"
66
"io"
7+
"log"
78
"strconv"
89

910
"cloud.google.com/go/compute/metadata"
@@ -116,7 +117,7 @@ hardware and guarantees a fresh quote.
116117
if key == "gceAK" {
117118
instanceInfo, err := getInstanceInfoFromMetadata()
118119
if err != nil {
119-
return err
120+
log.Printf("Could not get GCE instance info, continuing without it: %v", err)
120121
}
121122
attestation.InstanceInfo = instanceInfo
122123
}

0 commit comments

Comments
 (0)