Skip to content
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

Discovery: do not allow passing negative cluster size #11608

Merged
merged 1 commit into from
Feb 10, 2020

Conversation

spzala
Copy link
Member

@spzala spzala commented Feb 9, 2020

When an etcd instance attempts to perform service discovery, if a
cluster size with negative value is provided, the etcd instance
will panic without recovery.

When an etcd instance attempts to perform service discovery, if a
cluster size with negative value  is provided, the etcd instance
will panic without recovery because of
@spzala spzala requested review from gyuho and xiang90 February 9, 2020 23:19
@spzala
Copy link
Member Author

spzala commented Feb 9, 2020

/cc @xiang90 @gyuho created this PR per last week's meeting. We could quickly fail if strconv.Atoi return any negative value but thought changing the type is a better solution. Thanks!

@codecov-io
Copy link

Codecov Report

Merging #11608 into master will decrease coverage by 1.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11608      +/-   ##
==========================================
- Coverage   65.06%   64.01%   -1.05%     
==========================================
  Files         403      403              
  Lines       37645    37651       +6     
==========================================
- Hits        24494    24103     -391     
- Misses      11558    11940     +382     
- Partials     1593     1608      +15
Impacted Files Coverage Δ
etcdserver/api/v2discovery/discovery.go 68.82% <100%> (ø) ⬆️
auth/options.go 47.5% <0%> (-45%) ⬇️
client/client.go 44.11% <0%> (-39.87%) ⬇️
client/keys.go 55.77% <0%> (-35.68%) ⬇️
proxy/httpproxy/director.go 61.42% <0%> (-18.58%) ⬇️
auth/store.go 54.63% <0%> (-16.94%) ⬇️
auth/jwt.go 66.29% <0%> (-11.24%) ⬇️
proxy/grpcproxy/register.go 69.44% <0%> (-11.12%) ⬇️
auth/simple_token.go 79.83% <0%> (-9.25%) ⬇️
clientv3/concurrency/mutex.go 62.16% <0%> (-5.41%) ⬇️
... and 24 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4e5314e...2381a48. Read the comment docs.

@xiang90
Copy link
Contributor

xiang90 commented Feb 10, 2020

lgtm

@xiang90 xiang90 merged commit 4c25efc into etcd-io:master Feb 10, 2020
gyuho added a commit that referenced this pull request Jun 22, 2020
…-upstream-release-3.4

Automated cherry pick of #11608
gyuho added a commit that referenced this pull request Jul 6, 2020
…-upstream-release-3.3

Automated cherry pick of #11608
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants