-
Notifications
You must be signed in to change notification settings - Fork 408
fix: Bypass proxy for GCE metadata server requests #15145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #15145 +/- ##
==========================================
- Coverage 92.93% 92.93% -0.01%
==========================================
Files 2392 2392
Lines 215083 215085 +2
==========================================
- Hits 199887 199885 -2
- Misses 15196 15200 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions (waiting on @ddelgrosso1)
google/cloud/internal/curl_impl.cc
line 376 at r1 (raw file):
"http://metadata.google.internal") || absl::StartsWithIgnoreCase(this->url_, "https://metadata.google.internal")) {
I don't think we need to make this conditional, just always
status = handle_.SetOption(CURLOPT_NOPROXY, "metadata.google.internal");
if (!status.ok()) return OnTransferError(context, std::move(status));
And I don't think we need to emit any logging.
In this case should we just remove the unit tests? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 2 files at r2, all commit messages.
Reviewable status: 1 of 2 files reviewed, 2 unresolved discussions (waiting on @ddelgrosso1 and @eliekozah)
google/cloud/internal/curl_impl.cc
line 376 at r1 (raw file):
Previously, eliekozah (Elie Kozah) wrote…
In this case should we just remove the unit tests?
Yes.
This resolves an issue where requests to the GCE metadata server (metadata.google.internal) could fail on GCE VMs if an HTTP/HTTPS proxy was configured
This change is