-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Check return value when calling ensureDnsRecords #28568
Check return value when calling ensureDnsRecords #28568
Conversation
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
1 similar comment
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
ensuredCount += 1 | ||
if err := s.ensureDnsRecords(clusterName, service); err == nil { | ||
ensuredCount += 1 | ||
} |
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.
Should we return the error directly ?
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.
yes probably best to return the error here
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.
Thanks @jfrazelle ! I'm on vocation now, will fix it when I'm back to office.
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
2 similar comments
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
3123d28
to
0ff3c52
Compare
Fixed and rebased. PTAL @jfrazelle @nikhiljindal |
seems good to me! On Mon, Jul 11, 2016 at 1:53 AM, Peter Zhao notifications@github.com
|
cc @quinton-hoole @kubernetes/sig-cluster-federation |
@@ -728,7 +728,9 @@ func (s *ServiceController) lockedUpdateDNSRecords(service *cachedService, clust | |||
for key := range s.clusterCache.clientMap { | |||
for _, clusterName := range clusterNames { | |||
if key == clusterName { | |||
s.ensureDnsRecords(clusterName, service) | |||
if err := s.ensureDnsRecords(clusterName, service); err != nil { | |||
return fmt.Errorf("Failed to update DNS records for service %v due to %v", service, err) |
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.
How about logging the error, but still try to ensureDNS records for other clusters?
That way we can return errors for all clusters at once
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.
Agreed, we can't just bail out like this, unfortunately, as that will potentially cause updates of all services and clusters to fail. I'd be in support of logging an error here, and not incrementing the ensuredCount if the returned value from ensureDnsRecords is not nil.
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.
Thanks @nikhiljindal @quinton-hoole , I will change as you commented.
Thanks @xiangpengzhao ! My apologies - I only saw this PR today. See my in-code comment. I think we need a fairly minor change before merging. |
@xiangpengzhao Does this fix any specific bug you're seeing? If so, could you link to the associated issue here please. Also, note that we do not yet have an automated pre-submit e2e test for Federation, so you will need to run the Federation tests manually, and paste the results here. Thanks |
0ff3c52
to
13eeb12
Compare
I found this when learning and reviewing Federation code, so there isn't associated bug AFAIK.
I tried to run e2e test as the doc federation-e2e-tests but failed to run in my local env. Will the PR check |
Code changed, PTAL @nikhiljindal @quinton-hoole |
e2bc83b
to
b6c832a
Compare
/cc @nikhiljindal @quinton-hoole
|
b6c832a
to
392c181
Compare
No Jenkins GCE e2e will not run federation tests (yet, we have an open issue: kubernetes/test-infra#155). |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
@xiangpengzhao Sorry for all the trouble, we definitely need to make it easier to run federation e2e tests. |
@nikhiljindal Glad to see that PR. Thank you so much for your work on it! Hope to see that PR merged ASAP:) |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
@k8s-bot federation gce e2e test this |
@nikhiljindal I saw that your PR kubernetes/test-infra#335 was merged, cool! I commented |
Yes. As with all other kubernetes jenkins tests, only admins will be able to trigger federation test. I have #30458 to make sure the test works as expected. Thanks for your patience |
@nikhiljindal Thanks for your wonderful work! I see that kubernetes/test-infra#389 was also merged 3 hours ago. Happy waiting to try the federation test 😄 |
#26723 getting fully functional will take some time. |
@k8s-bot test this Tests are more than 96 hours old. Re-running tests. |
GCE e2e build/test passed for commit 4ccd90d. |
Thanks @nikhiljindal ! Will this PR be merged after you labeled 'lgtm' and it passed all the current checks? Do we need to continue to wait for the federation test to ensure it pass the test ? |
@k8s-bot federation gce e2e test this |
@xiangpengzhao The above should run the test for you, I think. I'm surprised that this has not already auto-merged, given that it has passed all of the mandatory checks already. I'll check up for you. |
@xiangpengzhao I checked and apparently the merge-bot is down at the moment. That's being worked on, and as soon as it's resolved, this PR should get automatically merged. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit 4ccd90d. |
Automatic merge from submit-queue |
Thanks @quinton-hoole ! The federation gce e2e test ran but failed due to below error. It seems to be some infra reasons.
|
Yes am working on that. Not related to your PR |
When lockedUpdateDNSRecords calls
ensureDnsRecords
, it should check the return value. If it returns error, theensuredCount
should not increment.This change is