Skip to content

Commit f357e29

Browse files
authored
Merge pull request #107 from pp511/PWX-26383-update-cloudops-to-fix-unit-test-in-porx-when-vendoring-gce-drive-encryption-changes
PWX-26383: Only log warning when instance service account is not extr…
2 parents 85d1356 + d532cd5 commit f357e29

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

gce/gce.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,11 +1240,11 @@ func gceInfo(ctx context.Context, inst *instance) error {
12401240
if content["client_email"] != nil {
12411241
inst.serviceAccount = fmt.Sprintf("%s", content["client_email"])
12421242
} else {
1243-
serviceAccount, err := metadata.Email("")
1243+
inst.serviceAccount, err = metadata.Email("")
12441244
if err != nil {
1245-
return fmt.Errorf("unable to get gce instance service account")
1245+
// No need to error out for non-GKE compute instances
1246+
logrus.Warnf("unable to get gce instance service account")
12461247
}
1247-
inst.serviceAccount = serviceAccount
12481248
}
12491249
return nil
12501250
}

0 commit comments

Comments
 (0)