-
Notifications
You must be signed in to change notification settings - Fork 250
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
Updated Trillian/etcd/grpc to latest version #774
Conversation
Most of this is pretty straightforwarded, just bending the code to the slightly different shape of the dependencies. The one part that looks like a functional change is in `trillian/ctfe/ct_server/main.go`; etcd has changed service discovery to allow multiple endpoints and this entails us advertising services under a slightly different key. Previously it looks like we just announced the http & metrics services under the bare names provided by the flags (e.g. `trillian-ctfe-http`). Now that etcd has endpoints, it looks like this isn't directly possible and thus I've needed to add a trailing slash (`trillian-ctfe-http/`). This gets around the check (https://github.com/etcd-io/etcd/blob/77e6df28cf18fcf6c25eeb18c98304fb8e9026cd/client/v3/naming/endpoints/endpoints_impl.go#L45) but feels a bit dodgy. What would seem more natural to me is to have a single service (e.g. `trillian-ctfe`) with two endpoints (`http`, and `metrics`). I'd appreciate someone with more familiarity with etcd usage advising on this though.
Codecov Report
@@ Coverage Diff @@
## master #774 +/- ##
=======================================
Coverage 72.94% 72.94%
=======================================
Files 81 81
Lines 7842 7842
=======================================
Hits 5720 5720
Misses 1696 1696
Partials 426 426 Continue to review full report at Codecov.
|
Hi @pgporada do you mind taking a look at this PR and letting us know if & how it'll affect you? I've tried to keep the changes minimal, but I've been forced to make a minor functional change, and I don't have the context to know how big a deal this will be. |
Thanks for pinging me about this. Turns out that we're doing something goofy in our ctfe configuration. I wasn't aware that I could or even should be using etcd for the ctfe. From what I can tell our ctfe's are hitting the kubernetes services api certificate-transparency-go/trillian/ctfe/ct_server/main.go Lines 158 to 161 in 8e37269
ctfe config
Our trillian log_server and log_signer's contain the following config. Will a similar code change to what you've done here also need to be done for the log_server and log_signer when a similar PR lands in the trillian repo?
Assuming that I switch my ctfe's to use etcd, am I correctly understanding that the config would look like:
You're right that feels a bit dodgy. I am onboard with a single service with two endpoints. |
Revert the changelog as there is no delta now.
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.
This is backward-compatible, as far as I can tell. LGTM.
Update the PR desc? |
I've updated the PR description 👍 |
@pgporada thanks for your comments here. I went back to look at Trillian and then found out my expectation of the previous behaviour didn't match the reality. See google/trillian#2381. It turns out that the endpoints were already announced under a |
Most of this is pretty straightforwarded, just bending the code to the slightly different shape of the dependencies. While the etcd announcements look quite different in code, I've confirmed that the output of
etcdctl get trillian-ctfe --prefix
is the same before/after this change, e.g.