You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Grant Henke (Code Review)" <ge...@cloudera.org> on 2021/02/09 23:00:16 UTC

[kudu-CR] [test] Fix InstanceDetectorTest.Timeout when run on AWS

Grant Henke has uploaded this change for review. ( http://gerrit.cloudera.org:8080/17052


Change subject: [test] Fix InstanceDetectorTest.Timeout when run on AWS
......................................................................

[test] Fix InstanceDetectorTest.Timeout when run on AWS

When running InstanceDetectorTest.Timeout on AWS the test
frequently passes because even though a teimout of 1 ms is set,
the curl request returns in less time than that.

In order to reliably force a timeout regardless of where the test
is run this patch configures the test to use bad DNS servers
preventing a timely response.

Example Failure:
[ RUN      ] InstanceDetectorTest.Timeout
W0208 03:46:56.690357  4190 instance_detector.cc:116] could not retrieve GCE instance metadata: Network error: curl error: Couldn't resolve host name: Could not resolve host: metadata.google.internal
W0208 03:46:56.690555  4191 instance_detector.cc:116] could not retrieve OpenStack instance metadata: Network error: curl error: HTTP response code said error: The requested URL returned error: 404 Not Found
W0208 03:46:56.690815  4189 instance_detector.cc:116] could not retrieve Azure instance metadata: Network error: curl error: HTTP response code said error: The requested URL returned error: 404 Not Found
/data0/somelongdirectorytoavoidrpathissues/src/kudu/src/kudu/util/cloud/instance_detector-test.cc:110: Failure
Value of: s.IsNotFound()
  Actual: false
Expected: true
OK

Change-Id: I0880c2d8f94ae6208adfdd0e21eea91727469979
---
M src/kudu/util/cloud/instance_detector-test.cc
M src/kudu/util/cloud/instance_metadata.cc
M src/kudu/util/curl_util.cc
M src/kudu/util/curl_util.h
4 files changed, 27 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/52/17052/1
-- 
To view, visit http://gerrit.cloudera.org:8080/17052
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0880c2d8f94ae6208adfdd0e21eea91727469979
Gerrit-Change-Number: 17052
Gerrit-PatchSet: 1
Gerrit-Owner: Grant Henke <gr...@apache.org>

[kudu-CR] [test] Fix InstanceDetectorTest.Timeout when run on AWS

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/17052 )

Change subject: [test] Fix InstanceDetectorTest.Timeout when run on AWS
......................................................................


Patch Set 4: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/17052
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0880c2d8f94ae6208adfdd0e21eea91727469979
Gerrit-Change-Number: 17052
Gerrit-PatchSet: 4
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Bankim Bhavsar <ba...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Wed, 10 Feb 2021 03:48:36 +0000
Gerrit-HasComments: No

[kudu-CR] [test] Fix InstanceDetectorTest.Timeout when run on AWS

Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Kudu Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/17052

to look at the new patch set (#2).

Change subject: [test] Fix InstanceDetectorTest.Timeout when run on AWS
......................................................................

[test] Fix InstanceDetectorTest.Timeout when run on AWS

When running InstanceDetectorTest.Timeout on AWS the test
frequently passes because even though a timeout of 1 ms is set,
the curl request returns in less time than that.

In order to reliably force a timeout regardless of where the test
is run this patch configures the test to use bad DNS servers
preventing a timely response.

Example Failure:
[ RUN      ] InstanceDetectorTest.Timeout
W0208 03:46:56.690357  4190 instance_detector.cc:116] could not retrieve GCE instance metadata: Network error: curl error: Couldn't resolve host name: Could not resolve host: metadata.google.internal
W0208 03:46:56.690555  4191 instance_detector.cc:116] could not retrieve OpenStack instance metadata: Network error: curl error: HTTP response code said error: The requested URL returned error: 404 Not Found
W0208 03:46:56.690815  4189 instance_detector.cc:116] could not retrieve Azure instance metadata: Network error: curl error: HTTP response code said error: The requested URL returned error: 404 Not Found
/data0/somelongdirectorytoavoidrpathissues/src/kudu/src/kudu/util/cloud/instance_detector-test.cc:110: Failure
Value of: s.IsNotFound()
  Actual: false
Expected: true
OK

Change-Id: I0880c2d8f94ae6208adfdd0e21eea91727469979
---
M src/kudu/util/cloud/instance_detector-test.cc
M src/kudu/util/cloud/instance_metadata.cc
M src/kudu/util/curl_util.cc
M src/kudu/util/curl_util.h
4 files changed, 27 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/52/17052/2
-- 
To view, visit http://gerrit.cloudera.org:8080/17052
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0880c2d8f94ae6208adfdd0e21eea91727469979
Gerrit-Change-Number: 17052
Gerrit-PatchSet: 2
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)

[kudu-CR] [test] Fix InstanceDetectorTest.Timeout when run on AWS

Posted by "Bankim Bhavsar (Code Review)" <ge...@cloudera.org>.
Bankim Bhavsar has posted comments on this change. ( http://gerrit.cloudera.org:8080/17052 )

Change subject: [test] Fix InstanceDetectorTest.Timeout when run on AWS
......................................................................


Patch Set 3: Code-Review+1


-- 
To view, visit http://gerrit.cloudera.org:8080/17052
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0880c2d8f94ae6208adfdd0e21eea91727469979
Gerrit-Change-Number: 17052
Gerrit-PatchSet: 3
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Bankim Bhavsar <ba...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Wed, 10 Feb 2021 00:26:45 +0000
Gerrit-HasComments: No

[kudu-CR] [test] Fix InstanceDetectorTest.Timeout when run on AWS

Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Grant Henke has posted comments on this change. ( http://gerrit.cloudera.org:8080/17052 )

Change subject: [test] Fix InstanceDetectorTest.Timeout when run on AWS
......................................................................


Patch Set 4:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/17052/3//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/17052/3//COMMIT_MSG@11
PS3, Line 11: the curl request returns in less time than that
> It seemed to me that's the case when it fails, no?
ah, that's what I meant.


http://gerrit.cloudera.org:8080/#/c/17052/3/src/kudu/util/cloud/instance_metadata.cc
File src/kudu/util/cloud/instance_metadata.cc:

http://gerrit.cloudera.org:8080/#/c/17052/3/src/kudu/util/cloud/instance_metadata.cc@106
PS3, Line 106: ting,
> Maybe, allow to specify the list of DNS servers "as is" to be supplied for 
Done


http://gerrit.cloudera.org:8080/#/c/17052/3/src/kudu/util/curl_util.h
File src/kudu/util/curl_util.h:

http://gerrit.cloudera.org:8080/#/c/17052/3/src/kudu/util/curl_util.h@82
PS3, Line 82: t the list of D
> It would be great to add a few lines about the exact curl option under the 
Done



-- 
To view, visit http://gerrit.cloudera.org:8080/17052
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0880c2d8f94ae6208adfdd0e21eea91727469979
Gerrit-Change-Number: 17052
Gerrit-PatchSet: 4
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Bankim Bhavsar <ba...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Wed, 10 Feb 2021 02:51:20 +0000
Gerrit-HasComments: Yes

[kudu-CR] [test] Fix InstanceDetectorTest.Timeout when run on AWS

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/17052 )

Change subject: [test] Fix InstanceDetectorTest.Timeout when run on AWS
......................................................................


Patch Set 3:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/17052/3//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/17052/3//COMMIT_MSG@11
PS3, Line 11: the curl request returns in less time than that
It seemed to me that's the case when it fails, no?


http://gerrit.cloudera.org:8080/#/c/17052/3/src/kudu/util/cloud/instance_metadata.cc
File src/kudu/util/cloud/instance_metadata.cc:

http://gerrit.cloudera.org:8080/#/c/17052/3/src/kudu/util/cloud/instance_metadata.cc@106
PS3, Line 106: false
Maybe, allow to specify the list of DNS servers "as is" to be supplied for the CURLOPT_DNS_SERVERS option for curl_easy_setopt()?  That way it might be useful in other scenarios.


http://gerrit.cloudera.org:8080/#/c/17052/3/src/kudu/util/curl_util.h
File src/kudu/util/curl_util.h:

http://gerrit.cloudera.org:8080/#/c/17052/3/src/kudu/util/curl_util.h@82
PS3, Line 82: set_dns_servers
It would be great to add a few lines about the exact curl option under the hood (CURLOPT_DNS_SERVERS).



-- 
To view, visit http://gerrit.cloudera.org:8080/17052
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0880c2d8f94ae6208adfdd0e21eea91727469979
Gerrit-Change-Number: 17052
Gerrit-PatchSet: 3
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Bankim Bhavsar <ba...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Wed, 10 Feb 2021 00:30:00 +0000
Gerrit-HasComments: Yes

[kudu-CR] [test] Fix InstanceDetectorTest.Timeout when run on AWS

Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Grant Henke has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/17052 )

Change subject: [test] Fix InstanceDetectorTest.Timeout when run on AWS
......................................................................

[test] Fix InstanceDetectorTest.Timeout when run on AWS

When running InstanceDetectorTest.Timeout on AWS the test
frequently fails because even though a timeout of 1 ms is set,
the curl request returns in less time than that.

In order to reliably force a timeout regardless of where the test
is run this patch configures the test to use bad DNS servers
preventing a timely response.

Example Failure:
[ RUN      ] InstanceDetectorTest.Timeout
W0208 03:46:56.690357  4190 instance_detector.cc:116] could not retrieve GCE instance metadata: Network error: curl error: Couldn't resolve host name: Could not resolve host: metadata.google.internal
W0208 03:46:56.690555  4191 instance_detector.cc:116] could not retrieve OpenStack instance metadata: Network error: curl error: HTTP response code said error: The requested URL returned error: 404 Not Found
W0208 03:46:56.690815  4189 instance_detector.cc:116] could not retrieve Azure instance metadata: Network error: curl error: HTTP response code said error: The requested URL returned error: 404 Not Found
/data0/somelongdirectorytoavoidrpathissues/src/kudu/src/kudu/util/cloud/instance_detector-test.cc:110: Failure
Value of: s.IsNotFound()
  Actual: false
Expected: true
OK

Change-Id: I0880c2d8f94ae6208adfdd0e21eea91727469979
Reviewed-on: http://gerrit.cloudera.org:8080/17052
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin <as...@cloudera.com>
---
M src/kudu/util/cloud/instance_detector-test.cc
M src/kudu/util/cloud/instance_metadata.cc
M src/kudu/util/curl_util.cc
M src/kudu/util/curl_util.h
4 files changed, 29 insertions(+), 0 deletions(-)

Approvals:
  Kudu Jenkins: Verified
  Alexey Serbin: Looks good to me, approved

-- 
To view, visit http://gerrit.cloudera.org:8080/17052
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I0880c2d8f94ae6208adfdd0e21eea91727469979
Gerrit-Change-Number: 17052
Gerrit-PatchSet: 5
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Bankim Bhavsar <ba...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)

[kudu-CR] [test] Fix InstanceDetectorTest.Timeout when run on AWS

Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Alexey Serbin, Kudu Jenkins, Bankim Bhavsar, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/17052

to look at the new patch set (#4).

Change subject: [test] Fix InstanceDetectorTest.Timeout when run on AWS
......................................................................

[test] Fix InstanceDetectorTest.Timeout when run on AWS

When running InstanceDetectorTest.Timeout on AWS the test
frequently fails because even though a timeout of 1 ms is set,
the curl request returns in less time than that.

In order to reliably force a timeout regardless of where the test
is run this patch configures the test to use bad DNS servers
preventing a timely response.

Example Failure:
[ RUN      ] InstanceDetectorTest.Timeout
W0208 03:46:56.690357  4190 instance_detector.cc:116] could not retrieve GCE instance metadata: Network error: curl error: Couldn't resolve host name: Could not resolve host: metadata.google.internal
W0208 03:46:56.690555  4191 instance_detector.cc:116] could not retrieve OpenStack instance metadata: Network error: curl error: HTTP response code said error: The requested URL returned error: 404 Not Found
W0208 03:46:56.690815  4189 instance_detector.cc:116] could not retrieve Azure instance metadata: Network error: curl error: HTTP response code said error: The requested URL returned error: 404 Not Found
/data0/somelongdirectorytoavoidrpathissues/src/kudu/src/kudu/util/cloud/instance_detector-test.cc:110: Failure
Value of: s.IsNotFound()
  Actual: false
Expected: true
OK

Change-Id: I0880c2d8f94ae6208adfdd0e21eea91727469979
---
M src/kudu/util/cloud/instance_detector-test.cc
M src/kudu/util/cloud/instance_metadata.cc
M src/kudu/util/curl_util.cc
M src/kudu/util/curl_util.h
4 files changed, 29 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/52/17052/4
-- 
To view, visit http://gerrit.cloudera.org:8080/17052
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0880c2d8f94ae6208adfdd0e21eea91727469979
Gerrit-Change-Number: 17052
Gerrit-PatchSet: 4
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Bankim Bhavsar <ba...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)