pax_global_header00006660000000000000000000000064145564431770014532gustar00rootroot0000000000000052 comment=ff2304879e1bf1cf6c7c5669bc08f8e32296582e etcd-3.4.30/000077500000000000000000000000001455644317700125405ustar00rootroot00000000000000etcd-3.4.30/.github/000077500000000000000000000000001455644317700141005ustar00rootroot00000000000000etcd-3.4.30/.github/ISSUE_TEMPLATE.md000066400000000000000000000001321455644317700166010ustar00rootroot00000000000000 Please read https://github.com/etcd-io/etcd/blob/master/Documentation/reporting_bugs.md. etcd-3.4.30/.github/PULL_REQUEST_TEMPLATE.md000066400000000000000000000001341455644317700176770ustar00rootroot00000000000000 Please read https://github.com/etcd-io/etcd/blob/master/CONTRIBUTING.md#contribution-flow. etcd-3.4.30/.github/SECURITY.md000066400000000000000000000001151455644317700156660ustar00rootroot00000000000000 Please read https://github.com/etcd-io/etcd/blob/master/security/README.md. etcd-3.4.30/.github/workflows/000077500000000000000000000000001455644317700161355ustar00rootroot00000000000000etcd-3.4.30/.github/workflows/release.yaml000066400000000000000000000016451455644317700204470ustar00rootroot00000000000000name: Release on: [push, pull_request] jobs: release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - id: goversion run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - uses: actions/setup-go@v2 with: go-version: ${{ steps.goversion.outputs.goversion }} - name: release run: | set -euo pipefail git config --global user.email "github-action@etcd.io" git config --global user.name "Github Action" gpg --batch --gen-key <> "$GITHUB_OUTPUT" - uses: actions/setup-go@v2 with: go-version: ${{ steps.goversion.outputs.goversion }} - run: date - env: TARGET: ${{ matrix.target }} run: | set -euo pipefail go version echo ${GOROOT} echo "${TARGET}" case "${TARGET}" in linux-amd64-fmt) GOARCH=amd64 PASSES='fmt bom dep' ./test ;; linux-amd64-integration-1-cpu) GOARCH=amd64 CPU=1 RACE='false' make test-integration ;; linux-amd64-integration-2-cpu) GOARCH=amd64 CPU=2 RACE='false' make test-integration ;; linux-amd64-integration-4-cpu) GOARCH=amd64 CPU=4 RACE='false' make test-integration ;; linux-amd64-functional) ./build && GOARCH=amd64 PASSES='functional' ./test ;; linux-amd64-unit-4-cpu-race) GOARCH=amd64 RACE='true' CPU='4' GO_TEST_FLAGS='-p=2' make test-unit ;; all-build) GOARCH=amd64 PASSES='build' ./test GOARCH=386 PASSES='build' ./test GO_BUILD_FLAGS='-v' GOOS=darwin GOARCH=amd64 ./build GO_BUILD_FLAGS='-v' GOOS=windows GOARCH=amd64 ./build GO_BUILD_FLAGS='-v' GOARCH=arm ./build GO_BUILD_FLAGS='-v' GOARCH=arm64 ./build GO_BUILD_FLAGS='-v' GOARCH=ppc64le ./build GO_BUILD_FLAGS='-v' GOARCH=s390x ./build ;; linux-amd64-grpcproxy) PASSES='build grpcproxy' CPU='4' RACE='true' ./test ;; linux-amd64-e2e) make install-gofail GOARCH=amd64 FAILPOINTS='true' CPU='4' make test-e2e-release ;; linux-386-unit) GOARCH=386 make test-unit ;; *) echo "Failed to find target" exit 1 ;; esac etcd-3.4.30/.github/workflows/trivy-nightly-scan.yaml000066400000000000000000000023161455644317700225760ustar00rootroot00000000000000name: Trivy Nightly Scan on: schedule: - cron: '0 2 * * *' # run at 2 AM UTC permissions: read-all jobs: nightly-scan: name: Trivy Scan nightly strategy: fail-fast: false matrix: # maintain the versions of etcd that need to be actively # security scanned versions: [v3.4.22] permissions: security-events: write # for github/codeql-action/upload-sarif to upload SARIF results runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 with: ref: release-3.4 - name: Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@9ab158e8597f3b310480b9a69402b419bc03dbd5 # master with: image-ref: 'gcr.io/etcd-development/etcd:${{ matrix.versions }}' severity: 'CRITICAL,HIGH' format: 'template' template: '@/contrib/sarif.tpl' output: 'trivy-results-3-4.sarif' - name: Upload Trivy scan results to GitHub Security tab uses: github/codeql-action/upload-sarif@a669cc5936cc5e1b6a362ec1ff9e410dc570d190 # v2.1.36 with: sarif_file: 'trivy-results-3-4.sarif' etcd-3.4.30/.gitignore000066400000000000000000000011141455644317700145250ustar00rootroot00000000000000/agent-* /coverage /covdir /gopath /gopath.proto /release /bin *.etcd *.log /etcd /hack/insta-discovery/.env *.coverprofile *.test hack/tls-setup/certs .idea /contrib/raftexample/raftexample /contrib/raftexample/raftexample-* # TODO: use dep prune # https://github.com/golang/dep/issues/120#issuecomment-306518546 vendor/**/* !vendor/**/ !vendor/**/*.go !vendor/**/*.c !vendor/**/*.cpp !vendor/**/*.s !vendor/**/COPYING* !vendor/**/PATENTS* !vendor/**/NOTICE* !vendor/**/Licence* !vendor/**/License* !vendor/**/LICENCE* !vendor/**/LICENSE* !vendor/modules.txt vendor/**/*_test.go *.bak etcd-3.4.30/.go-version000066400000000000000000000000101455644317700146200ustar00rootroot000000000000001.20.13 etcd-3.4.30/.header000066400000000000000000000011211455644317700137640ustar00rootroot00000000000000// Copyright 2016 The etcd Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. etcd-3.4.30/.words000066400000000000000000000022741455644317700137040ustar00rootroot00000000000000DefaultMaxRequestBytes ErrCodeEnhanceYourCalm ErrTimeout GoAway KeepAlive Keepalive MiB ResourceExhausted RPC RPCs parsedTarget SRV WithRequireLeader InfoLevel args backoff blackhole blackholed cancelable cancelation cluster_proxy defragment defragmenting deleter dev /dev/null dev/null errClientDisconnected etcd gRPC goroutine goroutines healthcheck hostname iff inflight keepalive keepalives hasleader racey keyspace linearization liveness linearized localhost mutex prefetching protobuf prometheus rafthttp repin rpc serializable statusError teardown too_many_pings transactional uncontended unprefixed unlisting nondeterministically atomics transferee Balancer lexicographically lexically accessors unbuffered nils reconnection mutators ConsistentIndexGetter OutputWALDir WAL consistentIndex todo saveWALAndSnap SHA subconns nop SubConns DNS passthrough ccBalancerWrapper rebalanced addrConns subConn TestBalancerDoNotBlockOnClose middleware clusterName jitter FIXME retriable github retriable jitter WithBackoff BackoffLinearWithJitter jitter WithDialer WithMax ServerStreams BidiStreams transientFailure BackoffFunc CallOptions PermitWithoutStream __lostleader ErrConnClosing unfreed grpcAddr clientURLs etcd-3.4.30/CONTRIBUTING.md000066400000000000000000000063511455644317700147760ustar00rootroot00000000000000# How to contribute etcd is Apache 2.0 licensed and accepts contributions via GitHub pull requests. This document outlines some of the conventions on commit message formatting, contact points for developers, and other resources to help get contributions into etcd. # Email and chat - Email: [etcd-dev](https://groups.google.com/forum/?hl=en#!forum/etcd-dev) - IRC: #[etcd](irc://irc.freenode.org:6667/#etcd) IRC channel on freenode.org ## Getting started - Fork the repository on GitHub - Read the README.md for build instructions ## Reporting bugs and creating issues Reporting bugs is one of the best ways to contribute. However, a good bug report has some very specific qualities, so please read over our short document on [reporting bugs](https://github.com/etcd-io/etcd/blob/master/Documentation/reporting_bugs.md) before submitting a bug report. This document might contain links to known issues, another good reason to take a look there before reporting a bug. ## Contribution flow This is a rough outline of what a contributor's workflow looks like: - Create a topic branch from where to base the contribution. This is usually master. - Make commits of logical units. - Make sure commit messages are in the proper format (see below). - Push changes in a topic branch to a personal fork of the repository. - Submit a pull request to etcd-io/etcd. - The PR must receive a LGTM from two maintainers found in the MAINTAINERS file. Thanks for contributing! ### Code style The coding style suggested by the Golang community is used in etcd. See the [style doc](https://github.com/golang/go/wiki/CodeReviewComments) for details. Please follow this style to make etcd easy to review, maintain and develop. ### Format of the commit message We follow a rough convention for commit messages that is designed to answer two questions: what changed and why. The subject line should feature the what and the body of the commit should describe the why. ``` etcdserver: add grpc interceptor to log info on incoming requests To improve debuggability of etcd v3. Added a grpc interceptor to log info on incoming requests to etcd server. The log output includes remote client info, request content (with value field redacted), request handling latency, response size, etc. Uses zap logger if available, otherwise uses capnslog. Fixes #38 ``` The format can be described more formally as follows: ``` :