diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000000..75a99abd784 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,22 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/go +{ + "name": "Go", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/go:1.23-bookworm", + // Features to add to the dev container. More info: https://containers.dev/features. + "features": { + "ghcr.io/devcontainers/features/docker-in-docker:2": {}, + "ghcr.io/devcontainers/features/github-cli:1": {}, + "ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {} + }, + // Use 'forwardPorts' to make a list of ports inside the container available locally. + "forwardPorts": [ + 2379, + 2380 + ], + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "make build" + // Configure tool-specific properties. + // "customizations": {}, +} \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 3a3c247b5bd..00000000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,2 +0,0 @@ - -Please read https://etcd.io/docs/latest/reporting_bugs/ diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 00000000000..5ba33bc16bc --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,102 @@ +--- +name: Bug Report +description: Report a bug encountered while operating etcd +labels: + - type/bug +body: + - type: checkboxes + id: confirmations + attributes: + label: Bug report criteria + description: Please confirm this bug report meets the following criteria. + options: + - label: This bug report is not security related, security issues should be disclosed privately via [etcd maintainers](mailto:etcd-maintainers@googlegroups.com). + - label: This is not a support request or question, support requests or questions should be raised in the etcd [discussion forums](https://github.com/etcd-io/etcd/discussions). + - label: You have read the etcd [bug reporting guidelines](https://github.com/etcd-io/etcd/blob/main/Documentation/contributor-guide/reporting_bugs.md). + - label: Existing open issues along with etcd [frequently asked questions](https://etcd.io/docs/latest/faq) have been checked and this is not a duplicate. + + - type: markdown + attributes: + value: | + Please fill the form below and provide as much information as possible. + Not doing so may result in your bug not being addressed in a timely manner. + + - type: textarea + id: problem + attributes: + label: What happened? + validations: + required: true + + - type: textarea + id: expected + attributes: + label: What did you expect to happen? + validations: + required: true + + - type: textarea + id: repro + attributes: + label: How can we reproduce it (as minimally and precisely as possible)? + validations: + required: true + + - type: textarea + id: additional + attributes: + label: Anything else we need to know? + + - type: textarea + id: etcdVersion + attributes: + label: Etcd version (please run commands below) + value: | +
+ + ```console + $ etcd --version + # paste output here + + $ etcdctl version + # paste output here + ``` + +
+ validations: + required: true + + - type: textarea + id: config + attributes: + label: Etcd configuration (command line flags or environment variables) + value: | +
+ + # paste your configuration here + +
+ + - type: textarea + id: etcdDebugInformation + attributes: + label: Etcd debug information (please run commands below, feel free to obfuscate the IP address or FQDN in the output) + value: | +
+ + ```console + $ etcdctl member list -w table + # paste output here + + $ etcdctl --endpoints= endpoint status -w table + # paste output here + ``` + +
+ + - type: textarea + id: logs + attributes: + label: Relevant log output + description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. + render: Shell diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000000..b48f29b9061 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,6 @@ +--- +blank_issues_enabled: false +contact_links: + - name: Question + url: https://github.com/etcd-io/etcd/discussions + about: Question relating to Etcd diff --git a/.github/ISSUE_TEMPLATE/distributors-application.md b/.github/ISSUE_TEMPLATE/distributors-application.md deleted file mode 100644 index 2f65c6afa7f..00000000000 --- a/.github/ISSUE_TEMPLATE/distributors-application.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Distributors Application -title: Distributors Application for -about: Apply for membership of security@etcd.io ---- - - - -**Actively monitored security email alias for our project:** - -**1. Have a user base not limited to your own organization.** - -**2. Have a publicly verifiable track record up to present day of fixing security issues.** - -**3. Not be a downstream or rebuild of another distribution.** - -**4. Be a participant and active contributor in the community.** - -**5. Accept the Embargo Policy.** - - -**6. Be willing to contribute back.** - - -**7. Have someone already on the list vouch for the person requesting membership on behalf of your distribution.** diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml new file mode 100644 index 00000000000..d18dec24567 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -0,0 +1,19 @@ +--- +name: Feature request +description: Provide idea for a new feature +labels: + - type/feature +body: + - type: textarea + id: feature + attributes: + label: What would you like to be added? + validations: + required: true + + - type: textarea + id: rationale + attributes: + label: Why is this needed? + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/test-flake.yml b/.github/ISSUE_TEMPLATE/test-flake.yml new file mode 100644 index 00000000000..6ecf32392a4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/test-flake.yml @@ -0,0 +1,35 @@ +--- +name: Flaking Test +description: Report flaky tests +labels: + - type/flake + - area/testing +body: + - type: textarea + id: workflows + attributes: + label: Which Github Action / Prow Jobs are flaking? + validations: + required: true + + - type: textarea + id: tests + attributes: + label: Which tests are flaking? + validations: + required: true + + - type: input + id: link + attributes: + label: Github Action / Prow Job link + + - type: textarea + id: reason + attributes: + label: Reason for failure (if possible) + + - type: textarea + id: additional + attributes: + label: Anything else we need to know? diff --git a/.github/OWNERS b/.github/OWNERS new file mode 100644 index 00000000000..efdfed26735 --- /dev/null +++ b/.github/OWNERS @@ -0,0 +1,4 @@ +# See the OWNERS docs at https://go.k8s.io/owners + +approvers: + - ivanvc # Ivan Valdes diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000000..6931f34066e --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,38 @@ +--- +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + + - package-ecosystem: gomod + directory: / + schedule: + interval: weekly + allow: + - dependency-type: all + + - package-ecosystem: gomod + directory: /tools/mod # Not linked from /go.mod + schedule: + interval: weekly + allow: + - dependency-type: direct + + - package-ecosystem: docker + directory: / + schedule: + interval: weekly + + - package-ecosystem: docker + directory: / + target-branch: "release-3.4" + schedule: + interval: monthly + + - package-ecosystem: docker + directory: / + target-branch: "release-3.5" + schedule: + interval: monthly diff --git a/.github/stale.yml b/.github/stale.yml index b85f1f45720..1c04a756b9a 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -1,3 +1,4 @@ +--- # Configuration for probot-stale - https://github.com/probot/stale # Number of days of inactivity before an Issue or Pull Request becomes stale @@ -12,8 +13,7 @@ onlyLabels: [] # Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable exemptLabels: - - "area/security" - - "Investigating" + - "stage/tracked" # Set to true to ignore issues in a project (defaults to false) exemptProjects: false @@ -28,11 +28,7 @@ exemptAssignees: false staleLabel: stale # Comment to post when marking as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed after 21 days if no further activity - occurs. Thank you for your contributions. - +markComment: This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions. # Comment to post when removing the stale label. # unmarkComment: > # Your comment here. diff --git a/.github/workflows/OWNERS b/.github/workflows/OWNERS new file mode 100644 index 00000000000..0dbba06bbad --- /dev/null +++ b/.github/workflows/OWNERS @@ -0,0 +1,4 @@ +# See the OWNERS docs at https://go.k8s.io/owners + +labels: + - github_actions diff --git a/.github/workflows/asset-transparency.yaml b/.github/workflows/asset-transparency.yaml deleted file mode 100644 index 6f4f2bf0cfd..00000000000 --- a/.github/workflows/asset-transparency.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: Publish Release Assets to Asset Transparency Log - -on: - release: - types: [published, created, edited, released] - -jobs: - github_release_asset_transparency_log_publish_job: - runs-on: ubuntu-latest - name: Publish GitHub release asset digests to https://beta-asset.transparencylog.net - steps: - - name: Gather URLs from GitHub release and publish - id: asset-transparency - uses: transparencylog/github-releases-asset-transparency-verify-action@v11 - - name: List verified and published URLs - run: echo "Verified URLs ${{ steps.asset-transparency.outputs.verified }}" - - name: List failed URLs - run: echo "Failed URLs ${{ steps.asset-transparency.outputs.failed }}" diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 76e8a31e370..a270f436ac4 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,3 +1,4 @@ +--- # For most projects, this workflow file will not need changing; you simply need # to commit it to your repository. # @@ -10,58 +11,45 @@ # supported CodeQL languages. # name: "CodeQL" - on: push: - branches: [ main, release-0.4, release-2.0, release-2.1, release-2.2, release-2.3, release-3.0, release-3.1 ] + branches: [main, release-3.4, release-3.5, release-3.6] pull_request: # The branches below must be a subset of the branches above - branches: [ main ] + branches: [main] schedule: - cron: '20 14 * * 5' - +permissions: read-all jobs: analyze: name: Analyze runs-on: ubuntu-latest - + permissions: + actions: read + contents: read + security-events: write strategy: fail-fast: false matrix: - language: [ 'go' ] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] # Learn more: # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed - + language: ['go'] steps: - - name: Checkout repository - uses: actions/checkout@v2 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v1 - - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0 + with: + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + languages: ${{ matrix.language }} + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0 diff --git a/.github/workflows/contrib.yaml b/.github/workflows/contrib.yaml new file mode 100644 index 00000000000..fc3f040c66e --- /dev/null +++ b/.github/workflows/contrib.yaml @@ -0,0 +1,18 @@ +--- +name: Test contrib/mixin +on: [push, pull_request] +permissions: read-all +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - id: goversion + run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" + - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 + with: + go-version: ${{ steps.goversion.outputs.goversion }} + - run: | + set -euo pipefail + + make -C contrib/mixin tools test diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml new file mode 100644 index 00000000000..69ec34868d1 --- /dev/null +++ b/.github/workflows/coverage.yaml @@ -0,0 +1,34 @@ +--- +name: Coverage +on: [push, pull_request] +permissions: read-all +jobs: + coverage: + # this is to prevent the job to run at forked projects + if: github.repository == 'etcd-io/etcd' + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + target: + - linux-amd64-coverage + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - id: goversion + run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" + - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 + with: + go-version: ${{ steps.goversion.outputs.goversion }} + - env: + TARGET: ${{ matrix.target }} + run: | + mkdir "${TARGET}" + case "${TARGET}" in + linux-amd64-coverage) + GOARCH=amd64 ./scripts/codecov_upload.sh + ;; + *) + echo "Failed to find target" + exit 1 + ;; + esac diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml deleted file mode 100644 index 4ec326b52ed..00000000000 --- a/.github/workflows/e2e.yaml +++ /dev/null @@ -1,35 +0,0 @@ -name: E2E -on: [push, pull_request] -jobs: - test: - runs-on: ubuntu-latest - strategy: - fail-fast: true - matrix: - target: - - linux-amd64-e2e - - linux-386-e2e - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-go@v2 - with: - go-version: "^1.16" - - run: date - - env: - TARGET: ${{ matrix.target }} - run: | - echo "${TARGET}" - case "${TARGET}" in - linux-amd64-e2e) - PASSES='build release e2e' MANUAL_VER=v3.4.7 CPU='4' EXPECT_DEBUG='true' COVER='false' RACE='true' ./test.sh 2>&1 | tee test.log - ! egrep "(--- FAIL:|DATA RACE|panic: test timed out|appears to have leaked)" -B50 -A10 test.log - ;; - linux-386-e2e) - GOARCH=386 PASSES='build e2e' CPU='4' EXPECT_DEBUG='true' COVER='false' RACE='true' ./test.sh 2>&1 | tee test.log - ! egrep "(--- FAIL:|DATA RACE|panic: test timed out|appears to have leaked)" -B50 -A10 test.log - ;; - *) - echo "Failed to find target" - exit 1 - ;; - esac diff --git a/.github/workflows/functional.yaml b/.github/workflows/functional.yaml deleted file mode 100644 index 0e3a46fc688..00000000000 --- a/.github/workflows/functional.yaml +++ /dev/null @@ -1,29 +0,0 @@ -name: functional-tests -on: [push, pull_request] -jobs: - test: - runs-on: ubuntu-latest - strategy: - fail-fast: true - matrix: - target: - - linux-amd64-functional - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-go@v2 - with: - go-version: "^1.16" - - run: date - - env: - TARGET: ${{ matrix.target }} - run: | - echo "${TARGET}" - case "${TARGET}" in - linux-amd64-functional) - GO_BUILD_FLAGS='-v -mod=readonly' ./build && GOARCH=amd64 PASSES='functional' ./test - ;; - *) - echo "Failed to find target" - exit 1 - ;; - esac diff --git a/.github/workflows/fuzzing.yaml b/.github/workflows/fuzzing.yaml new file mode 100644 index 00000000000..8ab8c374adb --- /dev/null +++ b/.github/workflows/fuzzing.yaml @@ -0,0 +1,26 @@ +--- +name: Fuzzing v3rpc +on: [push, pull_request] +permissions: read-all +jobs: + fuzzing: + runs-on: ubuntu-latest + strategy: + fail-fast: false + env: + TARGET_PATH: ./server/etcdserver/api/v3rpc + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - id: goversion + run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" + - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 + with: + go-version: ${{ steps.goversion.outputs.goversion }} + - run: | + set -euo pipefail + + GOARCH=amd64 CPU=4 make fuzz + - uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 + if: failure() + with: + path: "${{env.TARGET_PATH}}/testdata/fuzz/**/*" diff --git a/.github/workflows/gh-workflow-approve.yaml b/.github/workflows/gh-workflow-approve.yaml new file mode 100644 index 00000000000..1f988637677 --- /dev/null +++ b/.github/workflows/gh-workflow-approve.yaml @@ -0,0 +1,45 @@ +--- +name: Approve GitHub Workflows +permissions: read-all + +on: + pull_request_target: + types: + - labeled + - synchronize + branches: + - main + - release-3.5 + - release-3.4 + +jobs: + approve: + name: Approve ok-to-test + if: contains(github.event.pull_request.labels.*.name, 'ok-to-test') + runs-on: ubuntu-latest + permissions: + actions: write + steps: + - name: Update PR + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 + continue-on-error: true + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + debug: ${{ secrets.ACTIONS_RUNNER_DEBUG == 'true' }} + script: | + const result = await github.rest.actions.listWorkflowRunsForRepo({ + owner: context.repo.owner, + repo: context.repo.repo, + event: "pull_request", + status: "action_required", + head_sha: context.payload.pull_request.head.sha, + per_page: 100 + }); + + for (var run of result.data.workflow_runs) { + await github.rest.actions.approveWorkflowRun({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: run.id + }); + } diff --git a/.github/workflows/grpcproxy.yaml b/.github/workflows/grpcproxy.yaml index 081d8be328f..e15a37bc358 100644 --- a/.github/workflows/grpcproxy.yaml +++ b/.github/workflows/grpcproxy.yaml @@ -1,30 +1,38 @@ +--- name: grpcProxy-tests on: [push, pull_request] +permissions: read-all jobs: test: runs-on: ubuntu-latest strategy: - fail-fast: true + fail-fast: false matrix: target: - - linux-amd64-grpcproxy + - linux-amd64-grpcproxy-integration + - linux-amd64-grpcproxy-e2e steps: - - uses: actions/checkout@v2 - - uses: actions/setup-go@v2 - with: - go-version: "^1.16" - - run: date - - env: - TARGET: ${{ matrix.target }} - run: | - echo "${TARGET}" - case "${TARGET}" in - linux-amd64-grpcproxy) - PASSES='build grpcproxy' CPU='4' COVER='false' RACE='true' ./test.sh 2>&1 | tee test.log - ! egrep "(--- FAIL:|DATA RACE|panic: test timed out|appears to have leaked)" -B50 -A10 test.log - ;; - *) - echo "Failed to find target" - exit 1 - ;; - esac + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - id: goversion + run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" + - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 + with: + go-version: ${{ steps.goversion.outputs.goversion }} + - env: + TARGET: ${{ matrix.target }} + run: | + set -euo pipefail + + echo "${TARGET}" + case "${TARGET}" in + linux-amd64-grpcproxy-integration) + GOOS=linux GOARCH=amd64 CPU=4 make test-grpcproxy-integration + ;; + linux-amd64-grpcproxy-e2e) + GOOS=linux GOARCH=amd64 CPU=4 make test-grpcproxy-e2e + ;; + *) + echo "Failed to find target" + exit 1 + ;; + esac diff --git a/.github/workflows/measure-testgrid-flakiness.yaml b/.github/workflows/measure-testgrid-flakiness.yaml new file mode 100644 index 00000000000..97ecf0c95bb --- /dev/null +++ b/.github/workflows/measure-testgrid-flakiness.yaml @@ -0,0 +1,26 @@ +--- +name: Measure TestGrid Flakiness + +on: + schedule: + - cron: "0 0 * * *" # run every day at midnight + +permissions: read-all + +jobs: + measure-testgrid-flakiness: + name: Measure TestGrid Flakiness + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - id: goversion + run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" + - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 + with: + go-version: ${{ steps.goversion.outputs.goversion }} + - env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + set -euo pipefail + + ./scripts/measure-testgrid-flakiness.sh diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 00000000000..3f370fb57c0 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,77 @@ +--- +name: Release +on: [push, pull_request] +permissions: read-all +jobs: + main: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - id: goversion + run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" + - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 + 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 < - case "${TARGET}" in - linux-amd64-coverage) - sudo HOST_TMP_DIR=/tmp TEST_OPTS="VERBOSE='1'" make docker-test-coverage - ;; - linux-amd64-fmt-unit-go-tip-2-cpu) - GOARCH=amd64 PASSES='fmt unit' CPU='2' RACE='false' ./test.sh -p=2 - ;; - esac diff --git a/.words b/.words deleted file mode 100644 index da36ba44ba5..00000000000 --- a/.words +++ /dev/null @@ -1,116 +0,0 @@ -accessors -addrConns -args -atomics -backoff -BackoffFunc -BackoffLinearWithJitter -Balancer -BidiStreams -blackhole -blackholed -CallOptions -cancelable -cancelation -ccBalancerWrapper -clientURLs -clusterName -cluster_proxy -consistentIndex -ConsistentIndexGetter -DefaultMaxRequestBytes -defragment -defragmenting -deleter -dev -/dev/null -dev/null -DNS -errClientDisconnected -ErrCodeEnhanceYourCalm -ErrConnClosing -ErrRequestTooLarge -ErrTimeout -etcd -FIXME -github -GoAway -goroutine -goroutines -gRPC -grpcAddr -hasleader -healthcheck -hostname -iff -inflight -InfoLevel -jitter -jitter -jitter -keepalive -Keepalive -KeepAlive -keepalives -keyspace -lexically -lexicographically -linearizable -linearization -linearized -liveness -localhost -__lostleader -MaxRequestBytes -MiB -middleware -mutators -mutex -nils -nondeterministically -nop -OutputWALDir -parsedTarget -passthrough -PermitWithoutStream -prefetching -prometheus -protobuf -racey -rafthttp -rebalanced -reconnection -repin -ResourceExhausted -retriable -retriable -rpc -RPC -RPCs -saveWALAndSnap -serializable -ServerStreams -SHA -SRV -statusError -subConn -subconns -SubConns -teardown -TestBalancerDoNotBlockOnClose -todo -too_many_pings -transactional -transferee -transientFailure -unbuffered -uncontended -unfreed -unlisting -unprefixed -WatchProgressNotifyInterval -WAL -WithBackoff -WithDialer -WithMax -WithRequireLeader diff --git a/ADOPTERS.md b/ADOPTERS.md index c6c294637d3..5c6874c609f 100644 --- a/ADOPTERS.md +++ b/ADOPTERS.md @@ -212,7 +212,7 @@ At [Branch][branch], we use kubernetes heavily as our core microservice platform ## Baidu Waimai - *Application*: SkyDNS, Kubernetes, UDC, CMDB and other distributed systems -- *Launched*: April. 2016 +- *Launched*: April 2016 - *Cluster Size*: 3 clusters of 5 members - *Order of Data Size*: several gigabytes - *Operator*: Baidu Waimai Operations Department @@ -248,3 +248,13 @@ At [Branch][branch], we use kubernetes heavily as our core microservice platform - *Operator*: Trasnwarp Operating System - *Environment*: Bare Metal, Container - *Backups*: backup scripts + +## Cyberfusion + +- *Application*: cluster configuration management +- *Launched*: February 2023 +- *Cluster Size*: single cluster, 3 nodes +- *Order of Data Size*: kilobytes +- *Operator*: Cyberfusion +- *Environment*: Debian on VMs +- *Backups*: periodic `etcdctl snapshot save` + rotation in cron. More about our setup: https://cyberfusion.io/articles/building-hosting-infrastructure-in-2024-configuration-management-part-1 diff --git a/CHANGELOG-3.5.md b/CHANGELOG-3.5.md deleted file mode 100644 index b60a08e5c79..00000000000 --- a/CHANGELOG-3.5.md +++ /dev/null @@ -1,296 +0,0 @@ - - -Previous change logs can be found at [CHANGELOG-3.4](https://github.com/etcd-io/etcd/blob/main/CHANGELOG-3.4.md). - - -The minimum recommended etcd versions to run in **production** are 3.2.28+, 3.3.18+, and 3.4.2+. - - -
- - -## v3.5.0 (2021-06) - -See [code changes](https://github.com/etcd-io/etcd/compare/v3.4.0...v3.5.0) and [v3.5 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_5/) for any breaking changes. - -- [v3.5.0](https://github.com/etcd-io/etcd/releases/tag/v3.5.0) (2020 TBD), see [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0-rc.1...v3.5.0). -- [v3.5.0-rc.1](https://github.com/etcd-io/etcd/releases/tag/v3.5.0-rc.1) (2020 TBD), see [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0-rc.0...v3.5.0-rc.1). -- [v3.5.0-rc.0](https://github.com/etcd-io/etcd/releases/tag/v3.5.0-rc.0) (2020 TBD), see [code changes](https://github.com/etcd-io/etcd/compare/v3.4.0...v3.5.0-rc.0). - -**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.5 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_5/).** - -### Breaking Changes - -- `go.etcd.io/etcd` Go packages have moved to `go.etcd.io/etcd/{api,pkg,raft,client,etcdctl,server,raft,tests}/v3` to follow the [Go modules](https://github.com/golang/go/wiki/Modules) conventions -- `go.etcd.io/clientv3/snapshot` SnapshotManager class have moved to `go.etcd.io/clientv3/etcdctl`. - The method `snapshot.Save` to download a snapshot from the remote server was preserved in 'go.etcd.io/clientv3/snapshot`. -- `go.etcd.io/client' package got migrated to 'go.etcd.io/client/v2'. -- Changed behavior of clienv3 API [MemberList](https://github.com/etcd-io/etcd/pull/11639). - - Previously, it is directly served with server's local data, which could be stale. - - Now, it is served with linearizable guarantee. If the server is disconnected from quorum, `MemberList` call will fail. -- [gRPC gateway](https://github.com/grpc-ecosystem/grpc-gateway) only supports [`/v3`](TODO) endpoint. - - Deprecated [`/v3beta`](https://github.com/etcd-io/etcd/pull/9298). - - `curl -L http://localhost:2379/v3beta/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` does work in v3.5. Use `curl -L http://localhost:2379/v3/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` instead. -- **`etcd --experimental-enable-v2v3` flag remains experimental and to be deprecated.** - - v2 storage emulation feature will be deprecated in the next release. - - etcd 3.5 is the last version that supports V2 API. Flags `--enable-v2` and `--experimental-enable-v2v3` [are now deprecated](https://github.com/etcd-io/etcd/pull/) and will be removed in etcd v3.6 release. -- **`etcd --experimental-backend-bbolt-freelist-type` flag has been deprecated.** Use **`etcd --backend-bbolt-freelist-type`** instead. The default type is hashmap and it is stable now. -- **`etcd --debug` flag has been deprecated.** Use **`etcd --log-level=debug`** instead. -- Remove [`embed.Config.Debug`](https://github.com/etcd-io/etcd/pull/10947). -- **`etcd --log-output` flag has been deprecated.** Use **`etcd --log-outputs`** instead. -- **`etcd --logger=zap --log-outputs=stderr`** is now the default. -- **`etcd --logger=capnslog` flag value has been deprecated.** -- **`etcd --logger=zap --log-outputs=default` flag value is not supported.**. - - Use `etcd --logger=zap --log-outputs=stderr`. - - Or, use `etcd --logger=zap --log-outputs=systemd/journal` to send logs to the local systemd journal. - - Previously, if etcd parent process ID (PPID) is 1 (e.g. run with systemd), `etcd --logger=capnslog --log-outputs=default` redirects server logs to local systemd journal. And if write to journald fails, it writes to `os.Stderr` as a fallback. - - However, even with PPID 1, it can fail to dial systemd journal (e.g. run embedded etcd with Docker container). Then, [every single log write will fail](https://github.com/etcd-io/etcd/pull/9729) and fall back to `os.Stderr`, which is inefficient. - - To avoid this problem, systemd journal logging must be configured manually. -- **`etcd --log-outputs=stderr`** is now the default. -- **`etcd --log-package-levels` flag for `capnslog` has been deprecated.** Now, **`etcd --logger=zap --log-outputs=stderr`** is the default. -- **`[CLIENT-URL]/config/local/log` endpoint has been deprecated, as is `etcd --log-package-levels` flag.** - - `curl http://127.0.0.1:2379/config/local/log -XPUT -d '{"Level":"DEBUG"}'` won't work. - - Please use `etcd --logger=zap --log-outputs=stderr` instead. -- Deprecated `etcd_debugging_mvcc_db_total_size_in_bytes` Prometheus metric. Use `etcd_mvcc_db_total_size_in_bytes` instead. -- Deprecated `etcd_debugging_mvcc_put_total` Prometheus metric. Use `etcd_mvcc_put_total` instead. -- Deprecated `etcd_debugging_mvcc_delete_total` Prometheus metric. Use `etcd_mvcc_delete_total` instead. -- Deprecated `etcd_debugging_mvcc_txn_total` Prometheus metric. Use `etcd_mvcc_txn_total` instead. -- Deprecated `etcd_debugging_mvcc_range_total` Prometheus metric. Use `etcd_mvcc_range_total` instead. -- Main branch `/version` outputs `3.5.0-pre`, instead of `3.4.0+git`. -- Changed `proxy` package function signature to [support structured logger](https://github.com/etcd-io/etcd/pull/11614). - - Previously, `NewClusterProxy(c *clientv3.Client, advaddr string, prefix string) (pb.ClusterServer, <-chan struct{})`, now `NewClusterProxy(lg *zap.Logger, c *clientv3.Client, advaddr string, prefix string) (pb.ClusterServer, <-chan struct{})`. - - Previously, `Register(c *clientv3.Client, prefix string, addr string, ttl int)`, now `Register(lg *zap.Logger, c *clientv3.Client, prefix string, addr string, ttl int) <-chan struct{}`. - - Previously, `NewHandler(t *http.Transport, urlsFunc GetProxyURLs, failureWait time.Duration, refreshInterval time.Duration) http.Handler`, now `NewHandler(lg *zap.Logger, t *http.Transport, urlsFunc GetProxyURLs, failureWait time.Duration, refreshInterval time.Duration) http.Handler`. -- Changed `pkg/flags` function signature to [support structured logger](https://github.com/etcd-io/etcd/pull/11616). - - Previously, `SetFlagsFromEnv(prefix string, fs *flag.FlagSet) error`, now `SetFlagsFromEnv(lg *zap.Logger, prefix string, fs *flag.FlagSet) error`. - - Previously, `SetPflagsFromEnv(prefix string, fs *pflag.FlagSet) error`, now `SetPflagsFromEnv(lg *zap.Logger, prefix string, fs *pflag.FlagSet) error`. -- ClientV3 supports [grpc resolver API](https://github.com/etcd-io/etcd/blob/main/client/v3/naming/resolver/resolver.go). - - Endpoints can be managed using [endpoints.Manager](https://github.com/etcd-io/etcd/blob/main/client/v3/naming/endpoints/endpoints.go) - - Previously supported [GRPCResolver was decomissioned](https://github.com/etcd-io/etcd/pull/12675). Use [resolver](https://github.com/etcd-io/etcd/blob/main/client/v3/naming/resolver/resolver.go) instead. -- Turned on [--pre-vote by default](https://github.com/etcd-io/etcd/pull/12770). Should prevent disrupting RAFT leader by an individual member. -- [ETCD_CLIENT_DEBUG env](https://github.com/etcd-io/etcd/pull/12786): Now supports log levels (debug, info, warn, error, dpanic, panic, fatal). Only when set, overrides application-wide grpc logging settings. -- [Embed Etcd.Close()](https://github.com/etcd-io/etcd/pull/12828) needs to called exactly once and closes Etcd.Err() stream. -- [Embed Etcd does not override global/grpc logger](https://github.com/etcd-io/etcd/pull/12861) be default any longer. If desired, please call `embed.Config::SetupGlobalLoggers()` explicitly. -- [Embed Etcd custom logger should be configured using simpler builder `NewZapLoggerBuilder`](https://github.com/etcd-io/etcd/pull/12973). -- Client errors of `context cancelled` or `context deadline exceeded` are exposed as `codes.Canceled` and `codes.DeadlineExceeded`, instead of `codes.Unknown`. - - -### Storage format changes -- [WAL log's snapshots persists raftpb.ConfState](https://github.com/etcd-io/etcd/pull/12735) -- [Backend persists raftpb.ConfState](https://github.com/etcd-io/etcd/pull/12962) in the `meta` bucket `confState` key. -- [Backend persists applied term](https://github.com/etcd-io/etcd/pull/) in the `meta` bucket. -- Backend persists `downgrade` in the `cluster` bucket - -### Security - -- Add [`TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256` and `TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256` to `etcd --cipher-suites`](https://github.com/etcd-io/etcd/pull/11864). -- Changed [the format of WAL entries related to auth for not keeping password as a plain text](https://github.com/etcd-io/etcd/pull/11943). -- Add third party [Security Audit Report](https://github.com/etcd-io/etcd/pull/12201). -- A [log warning](https://github.com/etcd-io/etcd/pull/12242) is added when etcd uses any existing directory that has a permission different than 700 on Linux and 777 on Windows. - -### Metrics, Monitoring - -See [List of metrics](https://etcd.io/docs/latest/metrics/) for all metrics per release. - -Note that any `etcd_debugging_*` metrics are experimental and subject to change. - -- Deprecated `etcd_debugging_mvcc_db_total_size_in_bytes` Prometheus metric. Use `etcd_mvcc_db_total_size_in_bytes` instead. -- Deprecated `etcd_debugging_mvcc_put_total` Prometheus metric. Use `etcd_mvcc_put_total` instead. -- Deprecated `etcd_debugging_mvcc_delete_total` Prometheus metric. Use `etcd_mvcc_delete_total` instead. -- Deprecated `etcd_debugging_mvcc_txn_total` Prometheus metric. Use `etcd_mvcc_txn_total` instead. -- Deprecated `etcd_debugging_mvcc_range_total` Prometheus metric. Use `etcd_mvcc_range_total` instead. -- Add [`etcd_debugging_mvcc_current_revision`](https://github.com/etcd-io/etcd/pull/11126) Prometheus metric. -- Add [`etcd_debugging_mvcc_compact_revision`](https://github.com/etcd-io/etcd/pull/11126) Prometheus metric. -- Change [`etcd_cluster_version`](https://github.com/etcd-io/etcd/pull/11254) Prometheus metrics to include only major and minor version. -- Add [`etcd_debugging_mvcc_total_put_size_in_bytes`](https://github.com/etcd-io/etcd/pull/11374) Prometheus metric. -- Add [`etcd_server_client_requests_total` with `"type"` and `"client_api_version"` labels](https://github.com/etcd-io/etcd/pull/11687). -- Add [`etcd_wal_write_bytes_total`](https://github.com/etcd-io/etcd/pull/11738). -- Add [`etcd_debugging_auth_revision`](https://github.com/etcd-io/etcd/commit/f14d2a087f7b0fd6f7980b95b5e0b945109c95f3). -- Add [`os_fd_used` and `os_fd_limit` to monitor current OS file descriptors](https://github.com/etcd-io/etcd/pull/12214). - -### etcd server - - - Add [`TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256` and `TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256` to `etcd --cipher-suites`](https://github.com/etcd-io/etcd/pull/11864). - - Automatically [create parent directory if it does not exist](https://github.com/etcd-io/etcd/pull/9626) (fix [issue#9609](https://github.com/etcd-io/etcd/issues/9609)). - - v4.0 will configure `etcd --enable-v2=true --enable-v2v3=/aaa` to enable v2 API server that is backed by **v3 storage**. -- [`etcd --backend-bbolt-freelist-type`] flag is now stable. - - `etcd --experimental-backend-bbolt-freelist-type` has been deprecated. -- Support [downgrade API](https://github.com/etcd-io/etcd/pull/11715). -- Deprecate v2 apply on cluster version. [Use v3 request to set cluster version and recover cluster version from v3 backend](https://github.com/etcd-io/etcd/pull/11427). -- [Fix corruption bug in defrag](https://github.com/etcd-io/etcd/pull/11613). -- Fix [quorum protection logic when promoting a learner](https://github.com/etcd-io/etcd/pull/11640). -- Improve [peer corruption checker](https://github.com/etcd-io/etcd/pull/11621) to work when peer mTLS is enabled. -- Log [`[CLIENT-PORT]/health` check in server side](https://github.com/etcd-io/etcd/pull/11704). -- Log [successful etcd server-side health check in debug level](https://github.com/etcd-io/etcd/pull/12677). -- Improve [compaction performance when latest index is greater than 1-million](https://github.com/etcd-io/etcd/pull/11734). -- [Refactor consistentindex](https://github.com/etcd-io/etcd/pull/11699). -- [Add log when etcdserver failed to apply command](https://github.com/etcd-io/etcd/pull/11670). -- Improve [count-only range performance](https://github.com/etcd-io/etcd/pull/11771). -- Remove [redundant storage restore operation to shorten the startup time](https://github.com/etcd-io/etcd/pull/11779). - - With 40 million key test data,it can shorten the startup time from 5 min to 2.5 min. -- [Fix deadlock bug in mvcc](https://github.com/etcd-io/etcd/pull/11817). -- Fix [inconsistency between WAL and server snapshot](https://github.com/etcd-io/etcd/pull/11888). - - Previously, server restore fails if it had crashed after persisting raft hard state but before saving snapshot. - - See https://github.com/etcd-io/etcd/issues/10219 for more. - - Add [missing CRC checksum check in WAL validate method otherwise causes panic](https://github.com/etcd-io/etcd/pull/11924). - - See https://github.com/etcd-io/etcd/issues/11918. -- Improve logging around snapshot send and receive. -- [Push down RangeOptions.limit argv into index tree to reduce memory overhead](https://github.com/etcd-io/etcd/pull/11990). -- Add [reason field for /health response](https://github.com/etcd-io/etcd/pull/11983). -- Add [exclude alarms from health check conditionally](https://github.com/etcd-io/etcd/pull/12880). -- Add [`etcd --unsafe-no-fsync`](https://github.com/etcd-io/etcd/pull/11946) flag. - - Setting the flag disables all uses of fsync, which is unsafe and will cause data loss. This flag makes it possible to run an etcd node for testing and development without placing lots of load on the file system. -- Add [`etcd --auth-token-ttl`](https://github.com/etcd-io/etcd/pull/11980) flag to customize `simpleTokenTTL` settings. -- Improve [`runtime.FDUsage` call pattern to reduce objects malloc of Memory Usage and CPU Usage](https://github.com/etcd-io/etcd/pull/11986). -- Improve [mvcc.watchResponse channel Memory Usage](https://github.com/etcd-io/etcd/pull/11987). -- Log [expensive request info in UnaryInterceptor](https://github.com/etcd-io/etcd/pull/12086). -- [Fix invalid Go type in etcdserverpb](https://github.com/etcd-io/etcd/pull/12000). -- [Improve healthcheck by using v3 range request and its corresponding timeout](https://github.com/etcd-io/etcd/pull/12195). -- Add [`etcd --experimental-watch-progress-notify-interval`](https://github.com/etcd-io/etcd/pull/12216) flag to make watch progress notify interval configurable. -- Fix [server panic in slow writes warnings](https://github.com/etcd-io/etcd/issues/12197). - - Fixed via [PR#12238](https://github.com/etcd-io/etcd/pull/12238). -- [Fix server panic](https://github.com/etcd-io/etcd/pull/12288) when force-new-cluster flag is enabled in a cluster which had learner node. -- Add [`etcd --self-signed-cert-validity`](https://github.com/etcd-io/etcd/pull/12429) flag to support setting certificate expiration time. - - Notice, certificates generated by etcd are valid for 1 year by default when specifying the auto-tls or peer-auto-tls option. -- Add [`etcd --experimental-warning-apply-duration`](https://github.com/etcd-io/etcd/pull/12448) flag which allows apply duration threshold to be configurable. -- Add [`etcd --experimental-memory-mlock`](https://github.com/etcd-io/etcd/pull/TODO) flag which prevents etcd memory pages to be swapped out. -- Add [`etcd --socket-reuse-port`](https://github.com/etcd-io/etcd/pull/12702) flag - - Setting this flag enables `SO_REUSEPORT` which allows rebind of a port already in use. User should take caution when using this flag to ensure flock is properly enforced. -- Add [`etcd --socket-reuse-address`](https://github.com/etcd-io/etcd/pull/12702) flag - - Setting this flag enables `SO_REUSEADDR` which allows binding to an address in `TIME_WAIT` state, improving etcd restart time. -- Reduce [around 30% memory allocation by logging range response size without marshal](https://github.com/etcd-io/etcd/pull/12871). -- `ETCD_VERIFY="all"` environment triggers [additional verification of consistency](https://github.com/etcd-io/etcd/pull/) of etcd data-dir files. -- Add [`etcd --enable-log-rotation`](https://github.com/etcd-io/etcd/pull/12774) boolean flag which enables log rotation if true. -- Add [`etcd --log-rotation-config-json`](https://github.com/etcd-io/etcd/pull/12774) flag which allows passthrough of JSON config to configure log rotation for a file output target. -- Add experimental distributed tracing boolean flag [`--experimental-enable-distributed-tracing`](https://github.com/etcd-io/etcd/pull/12919) which enables tracing. -- Add [`etcd --experimental-distributed-tracing-address`](https://github.com/etcd-io/etcd/pull/12919) string flag which allows configuring the OpenTelemetry collector address. -- Add [`etcd --experimental-distributed-tracing-service-name`](https://github.com/etcd-io/etcd/pull/12919) string flag which allows changing the default "etcd" service name. -- Add [`etcd --experimental-distributed-tracing-instance-id`](https://github.com/etcd-io/etcd/pull/12919) string flag which configures an instance ID, which must be unique per etcd instance. - -### Package `runtime` - -- Optimize [`runtime.FDUsage` by removing unnecessary sorting](https://github.com/etcd-io/etcd/pull/12214). - -### Package `embed` - -- Remove [`embed.Config.Debug`](https://github.com/etcd-io/etcd/pull/10947). - - Use `embed.Config.LogLevel` instead. -- Add [`embed.Config.ZapLoggerBuilder`](https://github.com/etcd-io/etcd/pull/11147) to allow creating a custom zap logger. -- Replace [global `*zap.Logger` with etcd server logger object](https://github.com/etcd-io/etcd/pull/12212). -- Add [`embed.Config.EnableLogRotation`](https://github.com/etcd-io/etcd/pull/12774) which enables log rotation if true. -- Add [`embed.Config.LogRotationConfigJSON`](https://github.com/etcd-io/etcd/pull/12774) to allow passthrough of JSON config to configure log rotation for a file output target. -- Add [`embed.Config.ExperimentalEnableDistributedTracing`](https://github.com/etcd-io/etcd/pull/12919) which enables experimental distributed tracing if true. -- Add [`embed.Config.ExperimentalDistributedTracingAddress`](https://github.com/etcd-io/etcd/pull/12919) which allows overriding default collector address. -- Add [`embed.Config.ExperimentalDistributedTracingServiceName`](https://github.com/etcd-io/etcd/pull/12919) which allows overriding default "etcd" service name. -- Add [`embed.Config.ExperimentalDistributedTracingServiceInstanceID`](https://github.com/etcd-io/etcd/pull/12919) which allows configuring an instance ID, which must be uniquer per etcd instance. - -### Package `clientv3` - -- Remove [excessive watch cancel logging messages](https://github.com/etcd-io/etcd/pull/12187). - - See [kubernetes/kubernetes#93450](https://github.com/kubernetes/kubernetes/issues/93450). -- Add [`TryLock`](https://github.com/etcd-io/etcd/pull/11104) method to `clientv3/concurrency/Mutex`. A non-blocking method on `Mutex` which does not wait to get lock on the Mutex, returns immediately if Mutex is locked by another session. -- Fix [client balancer failover against multiple endpoints](https://github.com/etcd-io/etcd/pull/11184). - - Fix [`"kube-apiserver: failover on multi-member etcd cluster fails certificate check on DNS mismatch"`](https://github.com/kubernetes/kubernetes/issues/83028). -- Fix [IPv6 endpoint parsing in client](https://github.com/etcd-io/etcd/pull/11211). - - Fix ["1.16: etcd client does not parse IPv6 addresses correctly when members are joining" (kubernetes#83550)](https://github.com/kubernetes/kubernetes/issues/83550). -- Fix [errors caused by grpc changing balancer/resolver API](https://github.com/etcd-io/etcd/pull/11564). This change is compatible with grpc >= [v1.26.0](https://github.com/grpc/grpc-go/releases/tag/v1.26.0), but is not compatible with < v1.26.0 version. -- Use [ServerName as the authority](https://github.com/etcd-io/etcd/pull/11574) after bumping to grpc v1.26.0. Remove workaround in [#11184](https://github.com/etcd-io/etcd/pull/11184). -- Fix [`"hasleader"` metadata embedding](https://github.com/etcd-io/etcd/pull/11687). - - Previously, `clientv3.WithRequireLeader(ctx)` was overwriting existing context keys. -- Fix [watch leak caused by lazy cancellation](https://github.com/etcd-io/etcd/pull/11850). When clients cancel their watches, a cancel request will now be immediately sent to the server instead of waiting for the next watch event. -- Make sure [save snapshot downloads checksum for integrity checks](https://github.com/etcd-io/etcd/pull/11896). -- Fix [auth token invalid after watch reconnects](https://github.com/etcd-io/etcd/pull/12264). Get AuthToken automatically when clientConn is ready. -- Improve [clientv3:get AuthToken gracefully without extra connection](https://github.com/etcd-io/etcd/pull/12165). -- Changed [clientv3 dialing code](https://github.com/etcd-io/etcd/pull/12671) to use grpc resolver API instead of custom balancer. - - Endpoints self identify now as `etcd-endpoints://{id}/#initially={list of endpoints}` e.g. `etcd-endpoints://0xc0009d8540/#initially=[localhost:2079]` -- Make sure [save snapshot downloads checksum for integrity checks](https://github.com/etcd-io/etcd/pull/11896). - -### Package `lease` - -- Fix [memory leak in follower nodes](https://github.com/etcd-io/etcd/pull/11731). - - https://github.com/etcd-io/etcd/issues/11495 - - https://github.com/etcd-io/etcd/issues/11730 -- Make sure [grant/revoke won't be applied repeatedly after restarting etcd](https://github.com/etcd-io/etcd/pull/11935). - -### Package `wal` - -- Add [`etcd_wal_write_bytes_total`](https://github.com/etcd-io/etcd/pull/11738). -- Handle [out-of-range slice bound in `ReadAll` and entry limit in `decodeRecord`](https://github.com/etcd-io/etcd/pull/11793). - -### etcdctl v3 - -- Fix `etcdctl member add` command to prevent potential timeout. ([PR#11194](https://github.com/etcd-io/etcd/pull/11194) and [PR#11638](https://github.com/etcd-io/etcd/pull/11638)) -- Add [`etcdctl watch --progress-notify`](https://github.com/etcd-io/etcd/pull/11462) flag. -- Add [`etcdctl auth status`](https://github.com/etcd-io/etcd/pull/11536) command to check if authentication is enabled -- Add [`etcdctl get --count-only`](https://github.com/etcd-io/etcd/pull/11743) flag for output type `fields`. -- Add [`etcdctl member list -w=json --hex`](https://github.com/etcd-io/etcd/pull/11812) flag to print memberListResponse in hex format json. -- Changed [`etcdctl lock exec-command`](https://github.com/etcd-io/etcd/pull/12829) to return exit code of exec-command. -- [New tool: `etcdutl`](https://github.com/etcd-io/etcd/pull/12971) incorporated functionality of: `etcdctl snapshot status|restore`, `etcdctl backup`, `etcdctl defrag --data-dir ...`. -- [ETCDCTL_API=2 `etcdctl migrate`](https://github.com/etcd-io/etcd/pull/12971) has been decomissioned. Use etcd <=v3.4 to restore v2 storage. - -### gRPC gateway - -- [gRPC gateway](https://github.com/grpc-ecosystem/grpc-gateway) only supports [`/v3`](TODO) endpoint. - - Deprecated [`/v3beta`](https://github.com/etcd-io/etcd/pull/9298). - - `curl -L http://localhost:2379/v3beta/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` does work in v3.5. Use `curl -L http://localhost:2379/v3/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` instead. - -### gRPC Proxy - -- Fix [`panic on error`](https://github.com/etcd-io/etcd/pull/11694) for metrics handler. -- Add [gRPC keepalive related flags](https://github.com/etcd-io/etcd/pull/11711) `grpc-keepalive-min-time`, `grpc-keepalive-interval` and `grpc-keepalive-timeout`. -- [Fix grpc watch proxy hangs when failed to cancel a watcher](https://github.com/etcd-io/etcd/pull/12030) . -- Add [metrics handler for grpcproxy self](https://github.com/etcd-io/etcd/pull/12107). -- Add [health handler for grpcproxy self](https://github.com/etcd-io/etcd/pull/12114). - -### Auth - -- Fix [NoPassword check when adding user through GRPC gateway](https://github.com/etcd-io/etcd/pull/11418) ([issue#11414](https://github.com/etcd-io/etcd/issues/11414)) -- Fix bug where [some auth related messages are logged at wrong level](https://github.com/etcd-io/etcd/pull/11586) -- [Fix a data corruption bug by saving consistent index](https://github.com/etcd-io/etcd/pull/11652). -- [Improve checkPassword performance](https://github.com/etcd-io/etcd/pull/11735). -- [Add authRevision field in AuthStatus](https://github.com/etcd-io/etcd/pull/11659). - -### API - -- Add [`/v3/auth/status`](https://github.com/etcd-io/etcd/pull/11536) endpoint to check if authentication is enabled -- [Add `Linearizable` field to `etcdserverpb.MemberListRequest`](https://github.com/etcd-io/etcd/pull/11639). -- [Learner support Snapshot RPC](https://github.com/etcd-io/etcd/pull/12890/). - -### Package `netutil` - -- Remove [`netutil.DropPort/RecoverPort/SetLatency/RemoveLatency`](https://github.com/etcd-io/etcd/pull/12491). - - These are not used anymore. They were only used for older versions of functional testing. - - Removed to adhere to best security practices, minimize arbitrary shell invocation. - -### `tools/etcd-dump-metrics` - -- Implement [input validation to prevent arbitrary shell invocation](https://github.com/etcd-io/etcd/pull/12491). - -### Dependency - -- Upgrade [`google.golang.org/grpc`](https://github.com/grpc/grpc-go/releases) from [**`v1.23.0`**](https://github.com/grpc/grpc-go/releases/tag/v1.23.0) to [**`v1.37.0`**](https://github.com/grpc/grpc-go/releases/tag/v1.37.0). -- Upgrade [`go.uber.org/zap`](https://github.com/uber-go/zap/releases) from [**`v1.14.1`**](https://github.com/uber-go/zap/releases/tag/v1.14.1) to [**`v1.16.0`**](https://github.com/uber-go/zap/releases/tag/v1.16.0). - -### Platforms - -- etcd now [officially supports `arm64`](https://github.com/etcd-io/etcd/pull/12929). - - See https://github.com/etcd-io/etcd/pull/12928 for adding automated tests with `arm64` EC2 instances (Graviton 2). - - See https://github.com/etcd-io/website/pull/273 for new platform support tier policies. - -### Release - -- Add s390x build support ([PR#11548](https://github.com/etcd-io/etcd/pull/11548) and [PR#11358](https://github.com/etcd-io/etcd/pull/11358)) - -### Go - -- Require [*Go 1.16+*](https://github.com/etcd-io/etcd/pull/11110). -- Compile with [*Go 1.16+*](https://golang.org/doc/devel/release.html#go1.16) -- etcd uses [go modules](https://github.com/etcd-io/etcd/pull/12279) (instead of vendor dir) to track dependencies. - -### Project Governance - -- The etcd team has added, a well defined and openly discussed, project [governance](https://github.com/etcd-io/etcd/pull/11175). - - -
- diff --git a/CHANGELOG-2.3.md b/CHANGELOG/CHANGELOG-2.3.md similarity index 100% rename from CHANGELOG-2.3.md rename to CHANGELOG/CHANGELOG-2.3.md diff --git a/CHANGELOG-3.0.md b/CHANGELOG/CHANGELOG-3.0.md similarity index 100% rename from CHANGELOG-3.0.md rename to CHANGELOG/CHANGELOG-3.0.md diff --git a/CHANGELOG-3.1.md b/CHANGELOG/CHANGELOG-3.1.md similarity index 99% rename from CHANGELOG-3.1.md rename to CHANGELOG/CHANGELOG-3.1.md index 18765392ace..0c97517a7e2 100644 --- a/CHANGELOG-3.1.md +++ b/CHANGELOG/CHANGELOG-3.1.md @@ -1,10 +1,6 @@ -Previous change logs can be found at [CHANGELOG-3.0](https://github.com/etcd-io/etcd/blob/main/CHANGELOG-3.0.md). - - -The minimum recommended etcd versions to run in **production** are 3.1.11+, 3.2.26+, and 3.3.11+. - +Previous change logs can be found at [CHANGELOG-3.0](https://github.com/etcd-io/etcd/blob/main/CHANGELOG/CHANGELOG-3.0.md).
diff --git a/CHANGELOG-3.2.md b/CHANGELOG/CHANGELOG-3.2.md similarity index 99% rename from CHANGELOG-3.2.md rename to CHANGELOG/CHANGELOG-3.2.md index b6b2d2a39cb..095ff6e9f2a 100644 --- a/CHANGELOG-3.2.md +++ b/CHANGELOG/CHANGELOG-3.2.md @@ -1,10 +1,8 @@ -Previous change logs can be found at [CHANGELOG-3.1](https://github.com/etcd-io/etcd/blob/main/CHANGELOG-3.1.md). +Previous change logs can be found at [CHANGELOG-3.1](https://github.com/etcd-io/etcd/blob/main/CHANGELOG/CHANGELOG-3.1.md). -The minimum recommended etcd versions to run in **production** are 3.2.28+, 3.3.18+, and 3.4.2+. - ## v3.2.33 (TBD)
diff --git a/CHANGELOG-3.3.md b/CHANGELOG/CHANGELOG-3.3.md similarity index 97% rename from CHANGELOG-3.3.md rename to CHANGELOG/CHANGELOG-3.3.md index 1f914fad776..8addba112f6 100644 --- a/CHANGELOG-3.3.md +++ b/CHANGELOG/CHANGELOG-3.3.md @@ -1,15 +1,42 @@ -Previous change logs can be found at [CHANGELOG-3.2](https://github.com/etcd-io/etcd/blob/main/CHANGELOG-3.2.md). +Previous change logs can be found at [CHANGELOG-3.2](https://github.com/etcd-io/etcd/blob/main/CHANGELOG/CHANGELOG-3.2.md). +
+ +## v3.3.27 (2021-10-15) -The minimum recommended etcd versions to run in **production** are 3.2.28+, 3.3.18+, and 3.4.2+. +See [code changes](https://github.com/etcd-io/etcd/compare/v3.3.26...v3.3.27) and [v3.3 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_3/) for any breaking changes. + +### Other +- Updated [base image](https://github.com/etcd-io/etcd/pull/13386) from `debian:buster-v1.4.0` to `debian:bullseye-20210927` to fix the following critical CVEs: + - [CVE-2021-3711](https://nvd.nist.gov/vuln/detail/CVE-2021-3711): miscalculation of a buffer size in openssl's SM2 decryption + - [CVE-2021-35942](https://nvd.nist.gov/vuln/detail/CVE-2021-35942): integer overflow flaw in glibc + - [CVE-2019-9893](https://nvd.nist.gov/vuln/detail/CVE-2019-9893): incorrect syscall argument generation in libseccomp + - [CVE-2021-36159](https://nvd.nist.gov/vuln/detail/CVE-2021-36159): libfetch in apk-tools mishandles numeric strings in FTP and HTTP protocols to allow out of bound reads.
+## v3.3.26 (2021-10-03) + +See [code changes](https://github.com/etcd-io/etcd/compare/v3.3.25...v3.3.26) and [v3.3 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_3/) for any breaking changes. + +### Package `clientv3` + +- Fix [auth token invalid after watch reconnects](https://github.com/etcd-io/etcd/pull/12264). Get AuthToken automatically when clientConn is ready. + +### Package `fileutil` + +- Fix [constant](https://github.com/etcd-io/etcd/pull/12440) for linux locking. + +### Go + +- Compile with [*Go 1.12.17*](https://golang.org/doc/devel/release.html#go1.12). + +
-## v3.3.25 (2020 TBD) +## v3.3.25 (2020-08-24) See [code changes](https://github.com/etcd-io/etcd/compare/v3.3.23...v3.3.25) and [v3.3 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_3/) for any breaking changes. @@ -730,7 +757,7 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.3.2...v3.3.3) and - For every compaction period or 1-hour, compactor uses the last revision that was fetched before compaction period, to discard historical data. - The retention window of compaction period moves for every given compaction period or hour. - For instance, when hourly writes are 100 and `etcd --auto-compaction-mode=periodic --auto-compaction-retention=24h`, `v3.2.x`, `v3.3.0`, `v3.3.1`, and `v3.3.2` compact revision 2400, 2640, and 2880 for every 2.4-hour, while `v3.3.3` *or later* compacts revision 2400, 2500, 2600 for every 1-hour. - - Futhermore, when `etcd --auto-compaction-mode=periodic --auto-compaction-retention=30m` and writes per minute are about 1000, `v3.3.0`, `v3.3.1`, and `v3.3.2` compact revision 30000, 33000, and 36000, for every 3-minute, while `v3.3.3` *or later* compacts revision 30000, 60000, and 90000, for every 30-minute. + - Furthermore, when `etcd --auto-compaction-mode=periodic --auto-compaction-retention=30m` and writes per minute are about 1000, `v3.3.0`, `v3.3.1`, and `v3.3.2` compact revision 30000, 33000, and 36000, for every 3-minute, while `v3.3.3` *or later* compacts revision 30000, 60000, and 90000, for every 30-minute. ### Metrics, Monitoring @@ -933,7 +960,7 @@ See [security doc](https://etcd.io/docs/latest/op-guide/security/) for more deta - Periodic compactor continues to record latest revisions for every 1/10 of given compaction period (e.g. 1-hour when `etcd --auto-compaction-mode=periodic --auto-compaction-retention=10h`). - For every 1/10 of given compaction period, compactor uses the last revision that was fetched before compaction period, to discard historical data. - The retention window of compaction period moves for every 1/10 of given compaction period. - - For instance, when hourly writes are 100 and `--auto-compaction-retention=10`, v3.1 compacts revision 1000, 2000, and 3000 for every 10-hour, while v3.2.x, v3.3.0, v3.3.1, and v3.3.2 compact revision 1000, 1100, and 1200 for every 1-hour. Futhermore, when writes per minute are 1000, v3.3.0, v3.3.1, and v3.3.2 with `--auto-compaction-mode=periodic --auto-compaction-retention=30m` compact revision 30000, 33000, and 36000, for every 3-minute with more finer granularity. + - For instance, when hourly writes are 100 and `--auto-compaction-retention=10`, v3.1 compacts revision 1000, 2000, and 3000 for every 10-hour, while v3.2.x, v3.3.0, v3.3.1, and v3.3.2 compact revision 1000, 1100, and 1200 for every 1-hour. Furthermore, when writes per minute are 1000, v3.3.0, v3.3.1, and v3.3.2 with `--auto-compaction-mode=periodic --auto-compaction-retention=30m` compact revision 30000, 33000, and 36000, for every 3-minute with more finer granularity. - Whether compaction succeeds or not, this process repeats for every 1/10 of given compaction period. If compaction succeeds, it just removes compacted revision from historical revision records. - Add [`etcd --grpc-keepalive-min-time`, `etcd --grpc-keepalive-interval`, `etcd --grpc-keepalive-timeout`](https://github.com/etcd-io/etcd/pull/8535) flags to configure server-side keepalive policies. - Serve [`/health` endpoint as unhealthy](https://github.com/etcd-io/etcd/pull/8272) when [alarm (e.g. `NOSPACE`) is raised or there's no leader](https://github.com/etcd-io/etcd/issues/8207). diff --git a/CHANGELOG-3.4.md b/CHANGELOG/CHANGELOG-3.4.md similarity index 82% rename from CHANGELOG-3.4.md rename to CHANGELOG/CHANGELOG-3.4.md index 63926da1eea..6619cc2805d 100644 --- a/CHANGELOG-3.4.md +++ b/CHANGELOG/CHANGELOG-3.4.md @@ -1,9 +1,359 @@ -Previous change logs can be found at [CHANGELOG-3.3](https://github.com/etcd-io/etcd/blob/main/CHANGELOG-3.3.md). +Previous change logs can be found at [CHANGELOG-3.3](https://github.com/etcd-io/etcd/blob/main/CHANGELOG/CHANGELOG-3.3.md). +
+ +## v3.4.36 (TBC) + +### Package `clientv3` +- Fix [runtime panic that occurs when KeepAlive is called with a Context implemented by an uncomparable type](https://github.com/etcd-io/etcd/pull/18936) + +### Dependencies +- Compile binaries using [go 1.22.10](https://github.com/etcd-io/etcd/pull/19005) + +
+ +## v3.4.35 (2024-11-12) + +### etcd server +- Fix [watchserver related goroutine leakage](https://github.com/etcd-io/etcd/pull/18785) +- Fix [panicking occurred due to improper error handling during defragmentation](https://github.com/etcd-io/etcd/pull/18843) +- Fix [close temp file(s) in case an error happens during defragmentation](https://github.com/etcd-io/etcd/pull/18855) + +### Dependencies +- Compile binaries using [go 1.22.9](https://github.com/etcd-io/etcd/pull/18850). + +
+ +## v3.4.34 (2024-09-11) + +### etcd server +- Fix [performance regression issue caused by the `ensureLeadership` in lease renew](https://github.com/etcd-io/etcd/pull/18440). +- [Keep the tombstone during compaction if it happens to be the compaction revision](https://github.com/etcd-io/etcd/pull/18475) + +### Package clientv3 +- [Print gRPC metadata in guaranteed order using the official go fmt pkg](https://github.com/etcd-io/etcd/pull/18311). -The minimum recommended etcd versions to run in **production** are 3.2.28+, 3.3.18+, and 3.4.2+. +### Dependencies +- Compile binaries using [go 1.22.7](https://github.com/etcd-io/etcd/pull/18549). +- Upgrade [bbolt to 1.3.11](https://github.com/etcd-io/etcd/pull/18488). + +
+ +## v3.4.33 (2024-06-13) + +### etcd grpc-proxy +- Fix [Memberlist results not updated when proxy node down](https://github.com/etcd-io/etcd/pull/17896). + +### Dependencies +- Compile binaries using go [1.21.11](https://github.com/etcd-io/etcd/pull/18130). +- Upgrade [bbolt to 1.3.10](https://github.com/etcd-io/etcd/pull/17945). + +
+ +## v3.4.32 (2024-04-25) + +### etcd server +- Fix [LeaseTimeToLive returns error if leader changed](https://github.com/etcd-io/etcd/pull/17705). +- Fix [ignore raft messages if member id mismatch](https://github.com/etcd-io/etcd/pull/17814). +- Update [the compaction log when bootstrap](https://github.com/etcd-io/etcd/pull/17831). +- [Allow new server to join 3.5 cluster if `next-cluster-version-compatible=true`](https://github.com/etcd-io/etcd/pull/17665) +- [Allow updating the cluster version when downgrading from 3.5](https://github.com/etcd-io/etcd/pull/17821). +- Fix [Revision decreasing after panic during compaction](https://github.com/etcd-io/etcd/pull/17864) + +### Package `clientv3` +- Add [requests retry when receiving ErrGPRCNotSupportedForLearner and endpoints > 1](https://github.com/etcd-io/etcd/pull/17692). +- Fix [initialization for epMu in client context](https://github.com/etcd-io/etcd/pull/17714). + +### Dependencies +- Compile binaries using [go 1.21.9](https://github.com/etcd-io/etcd/pull/17709). + +
+ +## v3.4.31 (2024-03-21) + +### etcd server +- Add [mvcc: print backend database size and size in use in compaction logs](https://github.com/etcd-io/etcd/pull/17436). +- Fix leases wrongly revoked by the leader by [ignoring old leader's leases revoking request](https://github.com/etcd-io/etcd/pull/17465). +- Fix [no progress notification being sent for watch that doesn't get any events](https://github.com/etcd-io/etcd/pull/17567). +- Fix [watch event loss after compaction](https://github.com/etcd-io/etcd/pull/17610). +- Add `next-cluster-version-compatible` flag to [allow downgrade from 3.5](https://github.com/etcd-io/etcd/pull/17330). + +### Package `clientv3` +- Add [client backoff and retry config options](https://github.com/etcd-io/etcd/pull/17369). + +### Dependencies +- Upgrade [bbolt to 1.3.9](https://github.com/etcd-io/etcd/pull/17484). +- Compile binaries using [go 1.21.8](https://github.com/etcd-io/etcd/pull/17538). +- Upgrade [google.golang.org/protobuf to v1.33.0 to address CVE-2024-24786](https://github.com/etcd-io/etcd/pull/17554). +- Upgrade github.com/sirupsen/logrus to v1.9.3 to address [PRISMA-2023-0056](https://github.com/etcd-io/etcd/pull/17580). + +### Others +- [Make CGO_ENABLED configurable](https://github.com/etcd-io/etcd/pull/17422). + +
+ +## v3.4.30 (2024-01-31) + +### etcd server +- Fix [nil pointer panicking due to using the wrong log library](https://github.com/etcd-io/etcd/pull/17270) + +### Dependencies +- Compile binaries using go [1.20.13](https://github.com/etcd-io/etcd/pull/17276). +- Upgrade [golang.org/x/crypto to v0.17+ to address CVE-2023-48795](https://github.com/etcd-io/etcd/pull/17347). + +
+ +## v3.4.29 (2024-01-09) + +### etcd server +- [Disable following HTTP redirects in peer communication](https://github.com/etcd-io/etcd/pull/17112) +- [Add livez/readyz HTTP endpoints](https://github.com/etcd-io/etcd/pull/17128) +- Fix [Check if be is nil to avoid panic when be is overriden with nil](https://github.com/etcd-io/etcd/pull/17154) +- Fix [Add missing experimental-enable-lease-checkpoint-persist flag in etcd help](https://github.com/etcd-io/etcd/pull/17189) +- Fix [Don't flock snapshot files](https://github.com/etcd-io/etcd/pull/17208) + +### Dependencies +- Compile binaries using go [1.20.12](https://github.com/etcd-io/etcd/pull/17076). + +
+ +## v3.4.28 (2023-11-23) + +### etcd server +- Improve [Skip getting authInfo from incoming context when auth is disabled](https://github.com/etcd-io/etcd/pull/16240) +- Use [the default write scheduler](https://github.com/etcd-io/etcd/pull/16782) since golang.org/x/net@v0.11.0 started using round-robin scheduler. +- Add [cluster ID check during data corruption detection to prevent false alarm](https://github.com/etcd-io/etcd/issues/15548). +- Add [Learner support Snapshot RPC](https://github.com/etcd-io/etcd/pull/16990/). + +### Package `clientv3` +- Fix [Reset auth token when failing to authenticate due to auth being disabled](https://github.com/etcd-io/etcd/pull/16240). +- [Simplify grpc dialer usage](https://github.com/etcd-io/etcd/issues/11519). +- [Replace balancer with upstream grpc solution](https://github.com/etcd-io/etcd/pull/16844). +- Fix [race condition when accessing cfg.Endpoints in dial()](https://github.com/etcd-io/etcd/pull/16857). +- Fix [invalid authority header issue in single endpoint scenario](https://github.com/etcd-io/etcd/pull/16988). + +### Dependencies +- Compile binaries using [go 1.20.11](https://github.com/etcd-io/etcd/pull/16916). +- Upgrade [bbolt to 1.3.8](https://github.com/etcd-io/etcd/pull/16834). +- Upgrade gRPC to 1.58.3 in https://github.com/etcd-io/etcd/pull/16997 and https://github.com/etcd-io/etcd/pull/16999. Note that gRPC server will reject requests with connection header (refer to https://github.com/grpc/grpc-go/pull/4803). + +
+ +## v3.4.27 (2023-07-11) + +### etcd server +- Fix [corruption check may get a `ErrCompacted` error when server has just been compacted](https://github.com/etcd-io/etcd/pull/16047) +- Improve [Lease put performance for the case that auth is disabled or the user is admin](https://github.com/etcd-io/etcd/pull/16020) +- Fix [embed: nil pointer dereference when stopServer](https://github.com/etcd-io/etcd/pull/16195) + +### etcdctl v3 +- Add [optional --bump-revision and --mark-compacted flag to etcdctl snapshot restore operation](https://github.com/etcd-io/etcd/pull/16193). + +### Dependencies +- Compile binaries using [go 1.19.10](https://github.com/etcd-io/etcd/pull/16038). + +
+ +## v3.4.26 (2023-05-12) + +### etcd server +- Fix [LeaseTimeToLive API may return keys to clients which have no read permission on the keys](https://github.com/etcd-io/etcd/pull/15814). + + +### Dependencies +- Compile binaries using [go 1.19.9](https://github.com/etcd-io/etcd/pull/15823) + +
+ +## v3.4.25 (2023-04-14) + +### etcd server +- Add [`etcd --tls-min-version --tls-max-version`](https://github.com/etcd-io/etcd/pull/15486) to enable support for TLS 1.3. +- Add [`etcd --listen-client-http-urls`](https://github.com/etcd-io/etcd/pull/15620) flag to support separating http server from grpc one, thus giving full immunity to [watch stream starvation under high read load](https://github.com/etcd-io/etcd/issues/15402). +- Change [http2 frame scheduler to random algorithm](https://github.com/etcd-io/etcd/pull/15478) +- Fix [server/embed: fix data race when starting both secure & insecure gRPC servers on the same address](https://github.com/etcd-io/etcd/pull/15518) +- Fix [server/auth: disallow creating empty permission ranges](https://github.com/etcd-io/etcd/pull/15621) +- Fix [wsproxy did not print log in JSON format](https://github.com/etcd-io/etcd/pull/15662). +- Fix [CVE-2021-28235](https://nvd.nist.gov/vuln/detail/CVE-2021-28235) by [clearing password after authenticating the user](https://github.com/etcd-io/etcd/pull/15655). +- Fix [etcdserver may panic when parsing a JWT token without username or revision](https://github.com/etcd-io/etcd/pull/15677). +- Fix [Watch response traveling back in time when reconnecting member downloads snapshot from the leader](https://github.com/etcd-io/etcd/pull/15520). +- Fix [Requested watcher progress notifications are not synchronised with stream](https://github.com/etcd-io/etcd/pull/15697). + +### Package `clientv3` +- Reverted the fix to [auth invalid token and old revision errors in watch](https://github.com/etcd-io/etcd/pull/15542). + +### Dependencies +- Recommend [Go 1.19+](https://github.com/etcd-io/etcd/pull/15337). +- Compile binaries using [Go 1.19.8](https://github.com/etcd-io/etcd/pull/15652). +- Upgrade [golang.org/x/net to v0.7.0](https://github.com/etcd-io/etcd/pull/15333). + +### Docker image +- Fix [etcd docker images all tagged with amd64 architecture](https://github.com/etcd-io/etcd/pull/15681) + +
+ +## v3.4.24 (2023-02-16) + +### etcd server +- Fix [etcdserver might promote a non-started learner](https://github.com/etcd-io/etcd/pull/15097). +- Improve [mvcc: reduce count-only range overhead](https://github.com/etcd-io/etcd/pull/15099) +- Improve [mvcc: push down RangeOptions.limit argv into index tree to reduce memory overhead](https://github.com/etcd-io/etcd/pull/15137) +- Improve [server: set multiple concurrentReadTx instances share one txReadBuffer](https://github.com/etcd-io/etcd/pull/15195) +- Fix [aligning zap log timestamp resolution to microseconds](https://github.com/etcd-io/etcd/pull/15241). Etcd now uses zap timestamp format: `2006-01-02T15:04:05.999999Z0700` (microsecond instead of milliseconds precision). +- Fix [consistently format IPv6 addresses for comparison](https://github.com/etcd-io/etcd/pull/15188) + +### Package `clientv3` +- Fix [etcd might send duplicated events to watch clients](https://github.com/etcd-io/etcd/pull/15275). + +### Dependencies +- Upgrade [bbolt to v1.3.7](https://github.com/etcd-io/etcd/pull/15223). +- Upgrade [github.com/grpc-ecosystem/grpc-gateway](https://github.com/grpc-ecosystem/grpc-gateway/releases) from [v1.9.5](https://github.com/grpc-ecosystem/grpc-gateway/releases/tag/v1.9.5) to [v1.11.0](https://github.com/grpc-ecosystem/grpc-gateway/releases/tag/v1.11.0). + +### Docker image +- Updated [base image from base-debian11 to static-debian11 and removed dependency on busybox](https://github.com/etcd-io/etcd/pull/15038). + +
+ +## v3.4.23 (2022-12-21) + +### etcd server +- Fix [Remove memberID from data corrupt alarm](https://github.com/etcd-io/etcd/pull/14853). +- Fix [nil pointer panic for readonly txn due to nil response](https://github.com/etcd-io/etcd/pull/14900). +- Bumped [some dependencies](https://github.com/etcd-io/etcd/pull/15019) to address some HIGH Vulnerabilities. + +### Package `clientv3` +- Fix [Refreshing token on CommonName based authentication causes segmentation violation in client](https://github.com/etcd-io/etcd/pull/14792). + +### Dependencies +- Recommend [Go 1.17+](https://github.com/etcd-io/etcd/pull/15019). +- Compile binaries using [Go 1.17.13](https://github.com/etcd-io/etcd/pull/15019). + +### Docker image +- Use [distroless base image](https://github.com/etcd-io/etcd/pull/15017) to address critical Vulnerabilities. + +
+ +## v3.4.22 (2022-11-02) + +### etcd server +- Fix [memberID equals zero in corruption alarm](https://github.com/etcd-io/etcd/pull/14530) +- Fix [auth invalid token and old revision errors in watch](https://github.com/etcd-io/etcd/pull/14548) +- Fix [avoid closing a watch with ID 0 incorrectly](https://github.com/etcd-io/etcd/pull/14562) +- Fix [auth: fix data consistency issue caused by recovery from snapshot](https://github.com/etcd-io/etcd/pull/14649) + +### Package `netutil` +- Fix [netutil: add url comparison without resolver to URLStringsEqual](https://github.com/etcd-io/etcd/pull/14577) + +### Package `clientv3` +- Fix [Add backoff before retry when watch stream returns unavailable](https://github.com/etcd-io/etcd/pull/14581). + +### etcd grpc-proxy +- Add [`etcd grpc-proxy start --listen-cipher-suites`](https://github.com/etcd-io/etcd/pull/14601) flag to support adding configurable cipher list. + +
+ +## v3.4.21 (2022-09-15) + +### etcd server +- Fix [Durability API guarantee broken in single node cluster](https://github.com/etcd-io/etcd/pull/14423) +- Fix [Panic due to nil log object](https://github.com/etcd-io/etcd/pull/14420) +- Fix [authentication data not loaded on member startup](https://github.com/etcd-io/etcd/pull/14410) + +### etcdctl v3 + +- Fix [etcdctl move-leader may fail for multiple endpoints](https://github.com/etcd-io/etcd/pull/14441) + +
+ +## v3.4.20 (2022-08-06) + +### Package `clientv3` + +- Fix [filter learners members during autosync](https://github.com/etcd-io/etcd/pull/14236). + +### etcd server +- Add [`etcd --max-concurrent-streams`](https://github.com/etcd-io/etcd/pull/14251) flag to configure the max concurrent streams each client can open at a time, and defaults to math.MaxUint32. +- Add [`etcd --experimental-enable-lease-checkpoint-persist`](https://github.com/etcd-io/etcd/pull/14253) flag to enable checkpoint persisting. +- Fix [Lease checkpoints don't prevent to reset ttl on leader change](https://github.com/etcd-io/etcd/pull/14253), requires enabling checkpoint persisting. +- Fix [Protect rangePermCache with a RW lock correctly](https://github.com/etcd-io/etcd/pull/14230) +- Fix [raft: postpone MsgReadIndex until first commit in the term](https://github.com/etcd-io/etcd/pull/14258) +- Fix [etcdserver: resend ReadIndex request on empty apply request](https://github.com/etcd-io/etcd/pull/14269) +- Fix [remove temp files in snap dir when etcdserver starting](https://github.com/etcd-io/etcd/pull/14246) +- Fix [Etcdserver is still in progress of processing LeaseGrantRequest when it receives a LeaseKeepAliveRequest on the same leaseID](https://github.com/etcd-io/etcd/pull/14177) +- Fix [Grant lease with negative ID can possibly cause db out of sync](https://github.com/etcd-io/etcd/pull/14239) +- Fix [Allow non mutating requests pass through quotaKVServer when NOSPACE](https://github.com/etcd-io/etcd/pull/14254) + +
+ +## v3.4.19 (2022-07-12) + +See [code changes](https://github.com/etcd-io/etcd/compare/v3.4.18...v3.4.19) and [v3.4 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_4/) for any breaking changes. + +### etcd server +- Fix [exclude the same alarm type activated by multiple peers](https://github.com/etcd-io/etcd/pull/13475). +- Fix [Defrag unsets backend options](https://github.com/etcd-io/etcd/pull/13713). +- Fix [lease leak issue due to tokenProvider isn't enabled when restoring auth store from a snapshot](https://github.com/etcd-io/etcd/pull/13206). +- Fix [the race condition between goroutine and channel on the same leases to be revoked](https://github.com/etcd-io/etcd/pull/14150). +- Fix [lessor may continue to schedule checkpoint after stepping down leader role](https://github.com/etcd-io/etcd/pull/14150). + +### Package `clientv3` +- Fix [a bug of not refreshing expired tokens](https://github.com/etcd-io/etcd/pull/13999). + +### Dependency +- Upgrade [go.etcd.io/bbolt](https://github.com/etcd-io/bbolt/releases) from [v1.3.3](https://github.com/etcd-io/bbolt/releases/tag/v1.3.3) to [v1.3.6](https://github.com/etcd-io/bbolt/releases/tag/v1.3.6). + +### Security +- Upgrade [golang.org/x/crypto](https://github.com/etcd-io/etcd/pull/14179) to v0.0.0-20220411220226-7b82a4e95df4 to address [CVE-2022-27191 ](https://github.com/advisories/GHSA-8c26-wmh5-6g9v). +- Upgrade [gopkg.in/yaml.v2](https://github.com/etcd-io/etcd/pull/14192) to v2.4.0 to address [CVE-2019-11254](https://github.com/advisories/GHSA-wxc4-f4m6-wwqv). + +### Go +- Require [Go 1.16+](https://github.com/etcd-io/etcd/pull/14136). +- Compile with [Go 1.16+](https://go.dev/doc/devel/release#go1.16). +- etcd uses [go modules](https://github.com/etcd-io/etcd/pull/14136) (instead of vendor dir) to track dependencies. + +
+ +## v3.4.18 (2021-10-15) + +See [code changes](https://github.com/etcd-io/etcd/compare/v3.4.17...v3.4.18) and [v3.4 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_4/) for any breaking changes. + +### Metrics, Monitoring + +See [List of metrics](https://etcd.io/docs/latest/metrics/) for all metrics per release. + +- Add [`etcd_disk_defrag_inflight`](https://github.com/etcd-io/etcd/pull/13397). + +### Other + +- Updated [base image](https://github.com/etcd-io/etcd/pull/13386) from `debian:buster-v1.4.0` to `debian:bullseye-20210927` to fix the following critical CVEs: + - [CVE-2021-3711](https://nvd.nist.gov/vuln/detail/CVE-2021-3711): miscalculation of a buffer size in openssl's SM2 decryption + - [CVE-2021-35942](https://nvd.nist.gov/vuln/detail/CVE-2021-35942): integer overflow flaw in glibc + - [CVE-2019-9893](https://nvd.nist.gov/vuln/detail/CVE-2019-9893): incorrect syscall argument generation in libseccomp + - [CVE-2021-36159](https://nvd.nist.gov/vuln/detail/CVE-2021-36159): libfetch in apk-tools mishandles numeric strings in FTP and HTTP protocols to allow out of bound reads. + +
+ +## v3.4.17 (2021-10-03) + +See [code changes](https://github.com/etcd-io/etcd/compare/v3.4.16...v3.4.17) and [v3.4 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_4/) for any breaking changes. + +### `etcdctl` + +- Fix [etcdctl check datascale command](https://github.com/etcd-io/etcd/pull/11896) to work with https endpoints. + +### gRPC gateway + +- Add [`MaxCallRecvMsgSize`](https://github.com/etcd-io/etcd/pull/13077) support for http client. + +### Dependency + +- Replace [`github.com/dgrijalva/jwt-go with github.com/golang-jwt/jwt'](https://github.com/etcd-io/etcd/pull/13378). + +### Go + +- Compile with [*Go 1.12.17*](https://golang.org/doc/devel/release.html#go1.12).
@@ -141,6 +491,7 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.4.10...v3.4.11) an ### Metrics, Monitoring - Add [`os_fd_used` and `os_fd_limit` to monitor current OS file descriptors](https://github.com/etcd-io/etcd/pull/12214). +- Add [`etcd_disk_defrag_inflight`](https://github.com/etcd-io/etcd/pull/13397). ### Go @@ -492,7 +843,7 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.3.0...v3.4.0) and - For every compaction period or 1-hour, compactor uses the last revision that was fetched before compaction period, to discard historical data. - The retention window of compaction period moves for every given compaction period or hour. - For instance, when hourly writes are 100 and `etcd --auto-compaction-mode=periodic --auto-compaction-retention=24h`, `v3.2.x`, `v3.3.0`, `v3.3.1`, and `v3.3.2` compact revision 2400, 2640, and 2880 for every 2.4-hour, while `v3.3.3` *or later* compacts revision 2400, 2500, 2600 for every 1-hour. - - Futhermore, when `etcd --auto-compaction-mode=periodic --auto-compaction-retention=30m` and writes per minute are about 1000, `v3.3.0`, `v3.3.1`, and `v3.3.2` compact revision 30000, 33000, and 36000, for every 3-minute, while `v3.3.3` *or later* compacts revision 30000, 60000, and 90000, for every 30-minute. + - Furthermore, when `etcd --auto-compaction-mode=periodic --auto-compaction-retention=30m` and writes per minute are about 1000, `v3.3.0`, `v3.3.1`, and `v3.3.2` compact revision 30000, 33000, and 36000, for every 3-minute, while `v3.3.3` *or later* compacts revision 30000, 60000, and 90000, for every 30-minute. - Improve [lease expire/revoke operation performance](https://github.com/etcd-io/etcd/pull/9418), address [lease scalability issue](https://github.com/etcd-io/etcd/issues/9496). - Make [Lease `Lookup` non-blocking with concurrent `Grant`/`Revoke`](https://github.com/etcd-io/etcd/pull/9229). - Make etcd server return `raft.ErrProposalDropped` on internal Raft proposal drop in [v3 applier](https://github.com/etcd-io/etcd/pull/9549) and [v2 applier](https://github.com/etcd-io/etcd/pull/9558). @@ -838,7 +1189,7 @@ See [security doc](https://etcd.io/docs/latest/op-guide/security/) for more deta - If watch response events exceed this server-side request limit and watch request is created with `fragment` field `true`, the server will split watch events into a set of chunks, each of which is a subset of watch events below server-side request limit. - Useful when client-side has limited bandwidths. - For example, watch response contains 10 events, where each event is 1 MiB. And server `etcd --max-request-bytes` flag value is 1 MiB. Then, server will send 10 separate fragmented events to the client. - - For example, watch response contains 5 events, where each event is 2 MiB. And server `etcd --max-request-bytes` flag value is 1 MiB and `clientv3.Config.MaxCallRecvMsgSize` is 1 MiB. Then, server will try to send 5 separate fragmented events to the client, and the client will error with `"code = ResourceExhausted desc = grpc: received message larger than max (...)"`. + - For example, watch response contains 5 events, where each event is 2 MiB. And server `etcd --max-recv-bytes` flag value is 1 MiB and `clientv3.Config.MaxCallRecvMsgSize` is 1 MiB. Then, server will try to send 5 separate fragmented events to the client, and the client will error with `"code = ResourceExhausted desc = grpc: received message larger than max (...)"`. - Client must implement fragmented watch event merge (which `clientv3` does in etcd v3.4). - Add [`raftAppliedIndex` field to `etcdserverpb.StatusResponse`](https://github.com/etcd-io/etcd/pull/9176) for current Raft applied index. - Add [`errors` field to `etcdserverpb.StatusResponse`](https://github.com/etcd-io/etcd/pull/9206) for server-side error. @@ -972,7 +1323,7 @@ Note: **v3.5 will deprecate `etcd --log-package-levels` flag for `capnslog`**; ` - Now [`(r *raft) Step` returns `raft.ErrProposalDropped`](https://github.com/etcd-io/etcd/pull/9137) if a proposal has been ignored. - e.g. a node is removed from cluster, or [`raftpb.MsgProp` arrives at current leader while there is an ongoing leadership transfer](https://github.com/etcd-io/etcd/issues/8975). - Improve [Raft `becomeLeader` and `stepLeader`](https://github.com/etcd-io/etcd/pull/9073) by keeping track of latest `pb.EntryConfChange` index. - - Previously record `pendingConf` boolean field scanning the entire tail of the log, which can delay hearbeat send. + - Previously record `pendingConf` boolean field scanning the entire tail of the log, which can delay heartbeat send. - Fix [missing learner nodes on `(n *node) ApplyConfChange`](https://github.com/etcd-io/etcd/pull/9116). - Add [`raft.Config.MaxUncommittedEntriesSize`](https://github.com/etcd-io/etcd/pull/10167) to limit the total size of the uncommitted entries in bytes. - Once exceeded, raft returns `raft.ErrProposalDropped` error. diff --git a/CHANGELOG/CHANGELOG-3.5.md b/CHANGELOG/CHANGELOG-3.5.md new file mode 100644 index 00000000000..4512e588002 --- /dev/null +++ b/CHANGELOG/CHANGELOG-3.5.md @@ -0,0 +1,666 @@ + + +Previous change logs can be found at [CHANGELOG-3.4](https://github.com/etcd-io/etcd/blob/main/CHANGELOG/CHANGELOG-3.4.md). +
+ +## v3.5.18 (TBC) + +### etcd server +- [Print warning messages if any of the deprecated v2store related flags is set](https://github.com/etcd-io/etcd/pull/18999) + +### Package `clientv3` +- Fix [runtime panic that occurs when KeepAlive is called with a Context implemented by an uncomparable type](https://github.com/etcd-io/etcd/pull/18937) + + +### etcd grpc-proxy +- Add [`tls min/max version to grpc proxy`](https://github.com/etcd-io/etcd/pull/18829) to support setting TLS min and max version. + +### Dependencies +- Bump [golang-jwt/jwt to 4.5.1 to address GO-2024-3250](https://github.com/etcd-io/etcd/pull/18899). +- Compile binaries using [go 1.22.10](https://github.com/etcd-io/etcd/pull/19004). + +
+ +## v3.5.17 (2024-11-12) + +### etcd server +- Fix [watchserver related goroutine leakage](https://github.com/etcd-io/etcd/pull/18784) +- Fix [risk of a partial write txn being applied](https://github.com/etcd-io/etcd/pull/18799) +- Fix [panicking occurred due to improper error handling during defragmentation](https://github.com/etcd-io/etcd/pull/18842) +- Fix [close temp file(s) in case an error happens during defragmentation](https://github.com/etcd-io/etcd/pull/18854) + +### Dependencies +- Compile binaries using [go 1.22.9](https://github.com/etcd-io/etcd/pull/18849). + +
+ +## v3.5.16 (2024-09-10) + +### etcd server +- Fix [performance regression issue caused by the `ensureLeadership` in lease renew](https://github.com/etcd-io/etcd/pull/18439). +- [Keep the tombstone during compaction if it happens to be the compaction revision](https://github.com/etcd-io/etcd/pull/18474) +- Add [`etcd --experimental-compaction-sleep-interval`](https://github.com/etcd-io/etcd/pull/18514) flag to control the sleep interval between each compaction batch. + +### Dependencies +- Compile binaries using [go 1.22.7](https://github.com/etcd-io/etcd/pull/18550). +- Upgrade [bbolt to v1.3.11](https://github.com/etcd-io/etcd/pull/18489). + +
+ +## v3.5.15 (2024-07-19) + +### etcd server +- Fix [add prometheus metric registration for metric `etcd_disk_wal_write_duration_seconds`](https://github.com/etcd-io/etcd/pull/18174). +- Add [Support multiple values for allowed client and peer TLS identities](https://github.com/etcd-io/etcd/pull/18160) +- Fix [noisy logs from simple auth token expiration by reducing log level to debug](https://github.com/etcd-io/etcd/pull/18245) +- [Differentiate the warning message for rejected client and peer connections](https://github.com/etcd-io/etcd/pull/18319) + +### Package clientv3 +- [Print gRPC metadata in guaranteed order using the official go fmt pkg](https://github.com/etcd-io/etcd/pull/18312). + +### Dependencies +- Compile binaries using [go 1.21.12](https://github.com/etcd-io/etcd/pull/18271). +- [Fully address CVE-2023-45288 and fix govulncheck CI check](https://github.com/etcd-io/etcd/pull/18170) + +## v3.5.14 (2024-05-29) + +### etcd server +- Fix [LeaseTimeToLive returns error if leader changed](https://github.com/etcd-io/etcd/pull/17704). +- Add [metrics `etcd_disk_wal_write_duration_seconds`](https://github.com/etcd-io/etcd/pull/17616). +- Fix [ignore raft messages if member id mismatch](https://github.com/etcd-io/etcd/pull/17813). +- Update [the compaction log when bootstrap](https://github.com/etcd-io/etcd/pull/17830). +- Fix [Revision decreasing after panic during compaction](https://github.com/etcd-io/etcd/pull/17865) +- Add [`etcd --experimental-stop-grpc-service-on-defrag`](https://github.com/etcd-io/etcd/pull/17914) to enable client failover on defrag. +- Add [support for `AllowedCN` and `AllowedHostname` through config file](https://github.com/etcd-io/etcd/pull/18063) + +### etcdutl v3 +- Add [`--initial-memory-map-size` to `snapshot restore` to avoid memory allocation issues](https://github.com/etcd-io/etcd/pull/17977) + +### Package `clientv3` +- Add [requests retry when receiving ErrGPRCNotSupportedForLearner and endpoints > 1](https://github.com/etcd-io/etcd/pull/17641). +- Fix [initialization for mu in client context](https://github.com/etcd-io/etcd/pull/17699). + +### Dependencies +- Compile binaries using [go 1.21.10](https://github.com/etcd-io/etcd/pull/17980). +- Upgrade [bbolt to v1.3.10](https://github.com/etcd-io/etcd/pull/17943). + +
+ +## v3.5.13 (2024-03-29) + +### etcd server +- Fix leases wrongly revoked by the leader by [ignoring old leader's leases revoking request](https://github.com/etcd-io/etcd/pull/17425). +- Fix [no progress notification being sent for watch that doesn't get any events](https://github.com/etcd-io/etcd/pull/17566). +- Fix [watch event loss after compaction](https://github.com/etcd-io/etcd/pull/17612). + +### Package `clientv3` +- Add [client backoff and retry config options](https://github.com/etcd-io/etcd/pull/17363). +- [Ignore SetKeepAlivePeriod errors on OpenBSD](https://github.com/etcd-io/etcd/pull/17387). +- [Support unix/unixs socket in client or peer URLs](https://github.com/etcd-io/etcd/pull/15940) + +### gRPC Proxy +- Add [three flags (see below) for grpc-proxy](https://github.com/etcd-io/etcd/pull/17447) + - `--dial-keepalive-time` + - `--dial-keepalive-timeout` + - `--permit-without-stream` + +### Dependencies +- Upgrade [bbolt to v1.3.9](https://github.com/etcd-io/etcd/pull/17483). +- Compile binaries using [go 1.21.8](https://github.com/etcd-io/etcd/pull/17537). +- Upgrade [google.golang.org/protobuf to v1.33.0 to address CVE-2024-24786](https://github.com/etcd-io/etcd/pull/17553). +- Upgrade github.com/sirupsen/logrus to v1.9.3 to address [PRISMA-2023-0056](https://github.com/etcd-io/etcd/pull/17482). + +### Others +- [Make CGO_ENABLED configurable](https://github.com/etcd-io/etcd/pull/17421). + +
+ +## v3.5.12 (2024-01-31) + +### etcd server +- Fix [not validating database consistent index, and panicking on nil backend](https://github.com/etcd-io/etcd/pull/17151) +- Document [`experimental-enable-lease-checkpoint-persist` flag in etcd help](https://github.com/etcd-io/etcd/pull/17190) +- Fix [needlessly flocking snapshot files when deleting](https://github.com/etcd-io/etcd/pull/17206) +- Add [digest for etcd base image](https://github.com/etcd-io/etcd/pull/17205) +- Fix [delete inconsistencies in read buffer](https://github.com/etcd-io/etcd/pull/17230) +- Add [mvcc: print backend database size and size in use in compaction logs](https://github.com/etcd-io/etcd/pull/17291) + +### Dependencies +- Compile binaries using [go 1.20.13](https://github.com/etcd-io/etcd/pull/17275) +- Upgrade [golang.org/x/crypto to v0.17+ to address CVE-2023-48795](https://github.com/etcd-io/etcd/pull/17346) + +## v3.5.11 (2023-12-07) + +### etcd server +- Fix distributed tracing by ensuring `--experimental-distributed-tracing-sampling-rate` configuration option is available to [set tracing sample rate](https://github.com/etcd-io/etcd/pull/16951). +- Fix [url redirects while checking peer urls during new member addition](https://github.com/etcd-io/etcd/pull/16986) +- Add [livez/readyz HTTP endpoints](https://github.com/etcd-io/etcd/pull/17039) + +### Dependencies +- Compile binaries using [go 1.20.12](https://github.com/etcd-io/etcd/pull/17077) +- Fix [CVE-2023-47108](https://github.com/advisories/GHSA-8pgv-569h-w5rw) by [bumping go.opentelemetry.io/otel to 1.20.0 and go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc to 0.46.0](https://github.com/etcd-io/etcd/pull/16946). + +
+ +## v3.5.10 (2023-10-27) + +### etcd server +- Fix [`--socket-reuse-port` and `--socket-reuse-address` not able to be set in configuration file](https://github.com/etcd-io/etcd/pull/16435). +- Fix [corruption check may get a `ErrCompacted` error when server has just been compacted](https://github.com/etcd-io/etcd/pull/16048) +- Improve [Lease put performance for the case that auth is disabled or the user is admin](https://github.com/etcd-io/etcd/pull/16019) +- Improve [Skip getting authInfo from incoming context when auth is disabled](https://github.com/etcd-io/etcd/pull/16241) +- Fix [Hash and HashKV have duplicated RESTful API](https://github.com/etcd-io/etcd/pull/16490) + +### etcdutl v3 +- Add [optional --bump-revision and --mark-compacted flag to etcdutl snapshot restore operation](https://github.com/etcd-io/etcd/pull/16165). + +### etcdctl v3 +- Add [optional --bump-revision and --mark-compacted flag to etcdctl snapshot restore operation](https://github.com/etcd-io/etcd/pull/16165). + +### etcd grpc-proxy +- Fix [Memberlist results not updated when proxy node down](https://github.com/etcd-io/etcd/pull/15907). + +### Package `clientv3` +- Fix [Multiple endpoints with same prefix got mixed up](https://github.com/etcd-io/etcd/pull/15939) +- Fix [Unexpected blocking when barrier waits on a nonexistent key](https://github.com/etcd-io/etcd/pull/16188) +- Fix [Reset auth token when failing to authenticate due to auth being disabled](https://github.com/etcd-io/etcd/pull/16241) +- Fix [panic in etcd validate secure endpoints](https://github.com/etcd-io/etcd/pull/16565) + +### Dependencies +- Compile binaries using [go 1.20.10](https://github.com/etcd-io/etcd/pull/16745). +- Upgrade gRPC to 1.58.3 in https://github.com/etcd-io/etcd/pull/16625, https://github.com/etcd-io/etcd/pull/16781 and https://github.com/etcd-io/etcd/pull/16790. Note that gRPC server will reject requests with connection header (refer to https://github.com/grpc/grpc-go/pull/4803). +- Upgrade [bbolt to v1.3.8](https://github.com/etcd-io/etcd/pull/16833) + +
+ +## v3.5.9 (2023-05-11) + +### etcd server +- Fix [LeaseTimeToLive API may return keys to clients which have no read permission on the keys](https://github.com/etcd-io/etcd/pull/15815). + +### Dependencies +- Compile binaries using [go 1.19.9](https://github.com/etcd-io/etcd/pull/15822). + +
+ +## v3.5.8 (2023-04-13) + +### etcd server +- Add [`etcd --tls-min-version --tls-max-version`](https://github.com/etcd-io/etcd/pull/15483) to enable support for TLS 1.3. +- Add [`etcd --listen-client-http-urls`](https://github.com/etcd-io/etcd/pull/15589) flag to support separating http server from grpc one, thus giving full immunity to [watch stream starvation under high read load](https://github.com/etcd-io/etcd/issues/15402). +- Change [http2 frame scheduler to random algorithm](https://github.com/etcd-io/etcd/pull/15452) +- Fix [Watch response traveling back in time when reconnecting member downloads snapshot from the leader](https://github.com/etcd-io/etcd/pull/15515) +- Fix [race when starting both secure & insecure gRPC servers on the same address](https://github.com/etcd-io/etcd/pull/15517) +- Fix [server/auth: disallow creating empty permission ranges](https://github.com/etcd-io/etcd/pull/15619) +- Fix [aligning zap log timestamp resolution to microseconds](https://github.com/etcd-io/etcd/pull/15240). Etcd now uses zap timestamp format: `2006-01-02T15:04:05.999999Z0700` (microsecond instead of milliseconds precision). +- Fix [wsproxy did not print log in JSON format](https://github.com/etcd-io/etcd/pull/15661). +- Fix [CVE-2021-28235](https://nvd.nist.gov/vuln/detail/CVE-2021-28235) by [clearing password after authenticating the user](https://github.com/etcd-io/etcd/pull/15653). +- Fix [etcdserver may panic when parsing a JWT token without username or revision](https://github.com/etcd-io/etcd/pull/15676). +- Fix [Requested watcher progress notifications are not synchronised with stream](https://github.com/etcd-io/etcd/pull/15695). + +### Package `netutil` +- Fix [consistently format IPv6 addresses for comparison](https://github.com/etcd-io/etcd/pull/15187). + +### Package `clientv3` +- Fix [etcd might send duplicated events to watch clients](https://github.com/etcd-io/etcd/pull/15274). + +### Dependencies +- Recommend [Go 1.19+](https://github.com/etcd-io/etcd/pull/15337). +- Compile binaries using [go to 1.19.8](https://github.com/etcd-io/etcd/pull/15651) +- Upgrade [golang.org/x/net to v0.7.0](https://github.com/etcd-io/etcd/pull/15337) +- Upgrade [bbolt to v1.3.7](https://github.com/etcd-io/etcd/pull/15222). + +### Docker image +- [Remove nsswitch.conf from docker image](https://github.com/etcd-io/etcd/pull/15161) +- Fix [etcd docker images all tagged with amd64 architecture](https://github.com/etcd-io/etcd/pull/15612) + +
+ +## v3.5.7 (2023-01-20) + +### etcd server +- Fix [Remove memberID from data corrupt alarm](https://github.com/etcd-io/etcd/pull/14852). +- Fix [Allow non mutating requests pass through quotaKVServer when NOSPACE](https://github.com/etcd-io/etcd/pull/14884). +- Fix [nil pointer panic for readonly txn due to nil response](https://github.com/etcd-io/etcd/pull/14899). +- Fix [The last record which was partially synced to disk isn't automatically repaired](https://github.com/etcd-io/etcd/pull/15069). +- Fix [etcdserver might promote a non-started learner](https://github.com/etcd-io/etcd/pull/15096). + +### Package `clientv3` +- Reverted the fix to [auth invalid token and old revision errors in watch](https://github.com/etcd-io/etcd/pull/14995). + +### Dependencies +- Recommend [Go 1.17+](https://github.com/etcd-io/etcd/pull/15019). +- Compile binaries using [Go 1.17.13](https://github.com/etcd-io/etcd/pull/15019) +- Bumped [some dependencies](https://github.com/etcd-io/etcd/pull/15018) to address some HIGH Vulnerabilities. + +### Docker image +- Use [distroless base image](https://github.com/etcd-io/etcd/pull/15016) to address critical Vulnerabilities. +- Updated [base image from base-debian11 to static-debian11 and removed dependency on busybox](https://github.com/etcd-io/etcd/pull/15037). + +
+ +## v3.5.6 (2022-11-21) + +### etcd server +- Fix [auth invalid token and old revision errors in watch](https://github.com/etcd-io/etcd/pull/14547) +- Fix [avoid closing a watch with ID 0 incorrectly](https://github.com/etcd-io/etcd/pull/14563) +- Fix [auth: fix data consistency issue caused by recovery from snapshot](https://github.com/etcd-io/etcd/pull/14648) +- Fix [revision might be inconsistency between members when etcd crashes during processing defragmentation operation](https://github.com/etcd-io/etcd/pull/14733) +- Fix [timestamp in inconsistent format](https://github.com/etcd-io/etcd/pull/14799) +- Fix [Failed resolving host due to lost DNS record](https://github.com/etcd-io/etcd/pull/14573) + +### Package `clientv3` +- Fix [Add backoff before retry when watch stream returns unavailable](https://github.com/etcd-io/etcd/pull/14582). +- Fix [stack overflow error in double barrier](https://github.com/etcd-io/etcd/pull/14658) +- Fix [Refreshing token on CommonName based authentication causes segmentation violation in client](https://github.com/etcd-io/etcd/pull/14790). + +### etcd grpc-proxy +- Add [`etcd grpc-proxy start --listen-cipher-suites`](https://github.com/etcd-io/etcd/pull/14500) flag to support adding configurable cipher list. + +
+ +## v3.5.5 (2022-09-15) + +### Deprecations +- Deprecated [SetKeepAlive and SetKeepAlivePeriod in limitListenerConn](https://github.com/etcd-io/etcd/pull/14366). + +### Package `clientv3` +- Fix [do not overwrite authTokenBundle on dial](https://github.com/etcd-io/etcd/pull/14132). +- Fix [IsOptsWithPrefix returns false even if WithPrefix() is included](https://github.com/etcd-io/etcd/pull/14187). + +### etcd server +- [Build official darwin/arm64 artifacts](https://github.com/etcd-io/etcd/pull/14436). +- Add [`etcd --max-concurrent-streams`](https://github.com/etcd-io/etcd/pull/14219) flag to configure the max concurrent streams each client can open at a time, and defaults to math.MaxUint32. +- Add [`etcd --experimental-compact-hash-check-enabled --experimental-compact-hash-check-time`](https://github.com/etcd-io/etcd/issues/14039) flags to support enabling reliable corruption detection on compacted revisions. +- Fix [unexpected error during txn](https://github.com/etcd-io/etcd/issues/14110). +- Fix [lease leak issue due to tokenProvider isn't enabled when restoring auth store from a snapshot](https://github.com/etcd-io/etcd/pull/13205). +- Fix [the race condition between goroutine and channel on the same leases to be revoked](https://github.com/etcd-io/etcd/pull/14087). +- Fix [lessor may continue to schedule checkpoint after stepping down leader role](https://github.com/etcd-io/etcd/pull/14087). +- Fix [Restrict the max size of each WAL entry to the remaining size of the WAL file](https://github.com/etcd-io/etcd/pull/14127). +- Fix [Protect rangePermCache with a RW lock correctly](https://github.com/etcd-io/etcd/pull/14227) +- Fix [memberID equals zero in corruption alarm](https://github.com/etcd-io/etcd/pull/14272) +- Fix [Durability API guarantee broken in single node cluster](https://github.com/etcd-io/etcd/pull/14424) +- Fix [etcd fails to start after performing alarm list operation and then power off/on](https://github.com/etcd-io/etcd/pull/14429) +- Fix [authentication data not loaded on member startup](https://github.com/etcd-io/etcd/pull/14409) + +### etcdctl v3 + +- Fix [etcdctl move-leader may fail for multiple endpoints](https://github.com/etcd-io/etcd/pull/14434) + + +### Other +- [Bump golang.org/x/crypto to latest version](https://github.com/etcd-io/etcd/pull/13996) to address [CVE-2022-27191](https://github.com/advisories/GHSA-8c26-wmh5-6g9v). +- [Bump OpenTelemetry to 1.0.1 and gRPC to 1.41.0](https://github.com/etcd-io/etcd/pull/14312). + +
+ +## v3.5.4 (2022-04-24) + +### etcd server +- Fix [etcd panic on startup (auth enabled)](https://github.com/etcd-io/etcd/pull/13946) + +### package `client/pkg/v3` + +- [Revert the change of trimming the trailing dot from SRV.Target](https://github.com/etcd-io/etcd/pull/13950) returned by DNS lookup + + +
+ +## v3.5.3 (2022-04-13) + +### etcd server +- Fix [Provide a better liveness probe for when etcd runs as a Kubernetes pod](https://github.com/etcd-io/etcd/pull/13706) +- Fix [inconsistent log format](https://github.com/etcd-io/etcd/pull/13864) +- Fix [Inconsistent revision and data occurs](https://github.com/etcd-io/etcd/pull/13908) +- Fix [Etcdserver is still in progress of processing LeaseGrantRequest when it receives a LeaseKeepAliveRequest on the same leaseID](https://github.com/etcd-io/etcd/pull/13932) +- Fix [consistent_index coming from snapshot is overwritten by the old local value](https://github.com/etcd-io/etcd/pull/13933) +- [Update container base image snapshot](https://github.com/etcd-io/etcd/pull/13862) +- Fix [Defrag unsets backend options](https://github.com/etcd-io/etcd/pull/13701). + +### package `client/pkg/v3` + +- [Trim the suffix dot from the target](https://github.com/etcd-io/etcd/pull/13714) in SRV records returned by DNS lookup + +### etcdctl v3 + +- [Always print the raft_term in decimal](https://github.com/etcd-io/etcd/pull/13727) when displaying member list in json. + +
+ +## [v3.5.2](https://github.com/etcd-io/etcd/releases/tag/v3.5.2) (2022-02-01) + +See [code changes](https://github.com/etcd-io/etcd/compare/v3.5.1...v3.5.2) and [v3.5 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_5/) for any breaking changes. + +### etcd server +- Fix [exclude the same alarm type activated by multiple peers](https://github.com/etcd-io/etcd/pull/13476). +- Add [`etcd --experimental-enable-lease-checkpoint-persist`](https://github.com/etcd-io/etcd/pull/13508) flag to enable checkpoint persisting. +- Fix [Lease checkpoints don't prevent to reset ttl on leader change](https://github.com/etcd-io/etcd/pull/13508), requires enabling checkpoint persisting. +- Fix [assertion failed due to tx closed when recovering v3 backend from a snapshot db](https://github.com/etcd-io/etcd/pull/13501) +- Fix [segmentation violation(SIGSEGV) error due to premature unlocking of watchableStore](https://github.com/etcd-io/etcd/pull/13541) + +
+ +## [v3.5.1](https://github.com/etcd-io/etcd/releases/tag/v3.5.1) (2021-10-15) + +See [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0...v3.5.1) and [v3.5 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_5/) for any breaking changes. + +### etcd server + +- Fix [self-signed-cert-validity parameter cannot be specified in the config file](https://github.com/etcd-io/etcd/pull/13237). +- Fix [ensure that cluster members stored in v2store and backend are in sync](https://github.com/etcd-io/etcd/pull/13348) + +### etcd client + +- [Fix etcd client sends invalid :authority header](https://github.com/etcd-io/etcd/issues/13192) + +### package clientv3 + +- Endpoints self identify now as `etcd-endpoints://{id}/{authority}` where authority is based on first endpoint passed, for example `etcd-endpoints://0xc0009d8540/localhost:2079` + +### Other + +- Updated [base image](https://github.com/etcd-io/etcd/pull/13386) from `debian:buster-v1.4.0` to `debian:bullseye-20210927` to fix the following critical CVEs: + - [CVE-2021-3711](https://nvd.nist.gov/vuln/detail/CVE-2021-3711): miscalculation of a buffer size in openssl's SM2 decryption + - [CVE-2021-35942](https://nvd.nist.gov/vuln/detail/CVE-2021-35942): integer overflow flaw in glibc + - [CVE-2019-9893](https://nvd.nist.gov/vuln/detail/CVE-2019-9893): incorrect syscall argument generation in libseccomp + - [CVE-2021-36159](https://nvd.nist.gov/vuln/detail/CVE-2021-36159): libfetch in apk-tools mishandles numeric strings in FTP and HTTP protocols to allow out of bound reads. + +
+ +## v3.5.0 (2021-06) + +See [code changes](https://github.com/etcd-io/etcd/compare/v3.4.0...v3.5.0) and [v3.5 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_5/) for any breaking changes. + +- [v3.5.0](https://github.com/etcd-io/etcd/releases/tag/v3.5.0) (2021 TBD), see [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0-rc.1...v3.5.0). +- [v3.5.0-rc.1](https://github.com/etcd-io/etcd/releases/tag/v3.5.0-rc.1) (2021-06-10), see [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0-rc.0...v3.5.0-rc.1). +- [v3.5.0-rc.0](https://github.com/etcd-io/etcd/releases/tag/v3.5.0-rc.0) (2021-06-04), see [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0-beta.4...v3.5.0-rc.0). +- [v3.5.0-beta.4](https://github.com/etcd-io/etcd/releases/tag/v3.5.0-beta.4) (2021-05-26), see [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0-beta.3...v3.5.0-beta.4). +- [v3.5.0-beta.3](https://github.com/etcd-io/etcd/releases/tag/v3.5.0-beta.3) (2021-05-18), see [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0-beta.2...v3.5.0-beta.3). +- [v3.5.0-beta.2](https://github.com/etcd-io/etcd/releases/tag/v3.5.0-beta.2) (2021-05-18), see [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0-beta.1...v3.5.0-beta.2). +- [v3.5.0-beta.1](https://github.com/etcd-io/etcd/releases/tag/v3.5.0-beta.1) (2021-05-18), see [code changes](https://github.com/etcd-io/etcd/compare/v3.4.0...v3.5.0-beta.1). + +**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.5 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_5/).** + +### Breaking Changes + +- `go.etcd.io/etcd` Go packages have moved to `go.etcd.io/etcd/{api,pkg,raft,client,etcdctl,server,raft,tests}/v3` to follow the [Go modules](https://github.com/golang/go/wiki/Modules) conventions +- `go.etcd.io/clientv3/snapshot` SnapshotManager class have moved to `go.etcd.io/clientv3/etcdctl`. + The method `snapshot.Save` to download a snapshot from the remote server was preserved in 'go.etcd.io/clientv3/snapshot`. +- `go.etcd.io/client' package got migrated to 'go.etcd.io/client/v2'. +- Changed behavior of clientv3 API [MemberList](https://github.com/etcd-io/etcd/pull/11639). + - Previously, it is directly served with server's local data, which could be stale. + - Now, it is served with linearizable guarantee. If the server is disconnected from quorum, `MemberList` call will fail. +- [gRPC gateway](https://github.com/grpc-ecosystem/grpc-gateway) only supports [`/v3`](TODO) endpoint. + - Deprecated [`/v3beta`](https://github.com/etcd-io/etcd/pull/9298). + - `curl -L http://localhost:2379/v3beta/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` doesn't work in v3.5. Use `curl -L http://localhost:2379/v3/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` instead. +- **`etcd --experimental-enable-v2v3` flag remains experimental and to be deprecated.** + - v2 storage emulation feature will be deprecated in the next release. + - etcd 3.5 is the last version that supports V2 API. Flags `--enable-v2` and `--experimental-enable-v2v3` [are now deprecated](https://github.com/etcd-io/etcd/pull/12940) and will be removed in etcd v3.6 release. +- **`etcd --experimental-backend-bbolt-freelist-type` flag has been deprecated.** Use **`etcd --backend-bbolt-freelist-type`** instead. The default type is hashmap and it is stable now. +- **`etcd --debug` flag has been deprecated.** Use **`etcd --log-level=debug`** instead. +- Remove [`embed.Config.Debug`](https://github.com/etcd-io/etcd/pull/10947). +- **`etcd --log-output` flag has been deprecated.** Use **`etcd --log-outputs`** instead. +- **`etcd --logger=zap --log-outputs=stderr`** is now the default. +- **`etcd --logger=capnslog` flag value has been deprecated.** +- **`etcd --logger=zap --log-outputs=default` flag value is not supported.**. + - Use `etcd --logger=zap --log-outputs=stderr`. + - Or, use `etcd --logger=zap --log-outputs=systemd/journal` to send logs to the local systemd journal. + - Previously, if etcd parent process ID (PPID) is 1 (e.g. run with systemd), `etcd --logger=capnslog --log-outputs=default` redirects server logs to local systemd journal. And if write to journald fails, it writes to `os.Stderr` as a fallback. + - However, even with PPID 1, it can fail to dial systemd journal (e.g. run embedded etcd with Docker container). Then, [every single log write will fail](https://github.com/etcd-io/etcd/pull/9729) and fall back to `os.Stderr`, which is inefficient. + - To avoid this problem, systemd journal logging must be configured manually. +- **`etcd --log-outputs=stderr`** is now the default. +- **`etcd --log-package-levels` flag for `capnslog` has been deprecated.** Now, **`etcd --logger=zap --log-outputs=stderr`** is the default. +- **`[CLIENT-URL]/config/local/log` endpoint has been deprecated, as is `etcd --log-package-levels` flag.** + - `curl http://127.0.0.1:2379/config/local/log -XPUT -d '{"Level":"DEBUG"}'` won't work. + - Please use `etcd --logger=zap --log-outputs=stderr` instead. +- Deprecated `etcd_debugging_mvcc_db_total_size_in_bytes` Prometheus metric. Use `etcd_mvcc_db_total_size_in_bytes` instead. +- Deprecated `etcd_debugging_mvcc_put_total` Prometheus metric. Use `etcd_mvcc_put_total` instead. +- Deprecated `etcd_debugging_mvcc_delete_total` Prometheus metric. Use `etcd_mvcc_delete_total` instead. +- Deprecated `etcd_debugging_mvcc_txn_total` Prometheus metric. Use `etcd_mvcc_txn_total` instead. +- Deprecated `etcd_debugging_mvcc_range_total` Prometheus metric. Use `etcd_mvcc_range_total` instead. +- Main branch `/version` outputs `3.5.0-pre`, instead of `3.4.0+git`. +- Changed `proxy` package function signature to [support structured logger](https://github.com/etcd-io/etcd/pull/11614). + - Previously, `NewClusterProxy(c *clientv3.Client, advaddr string, prefix string) (pb.ClusterServer, <-chan struct{})`, now `NewClusterProxy(lg *zap.Logger, c *clientv3.Client, advaddr string, prefix string) (pb.ClusterServer, <-chan struct{})`. + - Previously, `Register(c *clientv3.Client, prefix string, addr string, ttl int)`, now `Register(lg *zap.Logger, c *clientv3.Client, prefix string, addr string, ttl int) <-chan struct{}`. + - Previously, `NewHandler(t *http.Transport, urlsFunc GetProxyURLs, failureWait time.Duration, refreshInterval time.Duration) http.Handler`, now `NewHandler(lg *zap.Logger, t *http.Transport, urlsFunc GetProxyURLs, failureWait time.Duration, refreshInterval time.Duration) http.Handler`. +- Changed `pkg/flags` function signature to [support structured logger](https://github.com/etcd-io/etcd/pull/11616). + - Previously, `SetFlagsFromEnv(prefix string, fs *flag.FlagSet) error`, now `SetFlagsFromEnv(lg *zap.Logger, prefix string, fs *flag.FlagSet) error`. + - Previously, `SetPflagsFromEnv(prefix string, fs *pflag.FlagSet) error`, now `SetPflagsFromEnv(lg *zap.Logger, prefix string, fs *pflag.FlagSet) error`. +- ClientV3 supports [grpc resolver API](https://github.com/etcd-io/etcd/blob/main/client/v3/naming/resolver/resolver.go). + - Endpoints can be managed using [endpoints.Manager](https://github.com/etcd-io/etcd/blob/main/client/v3/naming/endpoints/endpoints.go) + - Previously supported [GRPCResolver was decomissioned](https://github.com/etcd-io/etcd/pull/12675). Use [resolver](https://github.com/etcd-io/etcd/blob/main/client/v3/naming/resolver/resolver.go) instead. +- Turned on [--pre-vote by default](https://github.com/etcd-io/etcd/pull/12770). Should prevent disrupting RAFT leader by an individual member. +- [ETCD_CLIENT_DEBUG env](https://github.com/etcd-io/etcd/pull/12786): Now supports log levels (debug, info, warn, error, dpanic, panic, fatal). Only when set, overrides application-wide grpc logging settings. +- [Embed Etcd.Close()](https://github.com/etcd-io/etcd/pull/12828) needs to called exactly once and closes Etcd.Err() stream. +- [Embed Etcd does not override global/grpc logger](https://github.com/etcd-io/etcd/pull/12861) be default any longer. If desired, please call `embed.Config::SetupGlobalLoggers()` explicitly. +- [Embed Etcd custom logger should be configured using simpler builder `NewZapLoggerBuilder`](https://github.com/etcd-io/etcd/pull/12973). +- Client errors of `context cancelled` or `context deadline exceeded` are exposed as `codes.Canceled` and `codes.DeadlineExceeded`, instead of `codes.Unknown`. + + +### Storage format changes +- [WAL log's snapshots persists raftpb.ConfState](https://github.com/etcd-io/etcd/pull/12735) +- [Backend persists raftpb.ConfState](https://github.com/etcd-io/etcd/pull/12962) in the `meta` bucket `confState` key. +- [Backend persists applied term](https://github.com/etcd-io/etcd/pull/) in the `meta` bucket. +- Backend persists `downgrade` in the `cluster` bucket + +### Security + +- Add [`TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256` and `TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256` to `etcd --cipher-suites`](https://github.com/etcd-io/etcd/pull/11864). +- Changed [the format of WAL entries related to auth for not keeping password as a plain text](https://github.com/etcd-io/etcd/pull/11943). +- Add third party [Security Audit Report](https://github.com/etcd-io/etcd/pull/12201). +- A [log warning](https://github.com/etcd-io/etcd/pull/12242) is added when etcd uses any existing directory that has a permission different than 700 on Linux and 777 on Windows. +- Add optional [`ClientCertFile` and `ClientKeyFile`](https://github.com/etcd-io/etcd/pull/12705) options for peer and client tls configuration when split certificates are used. + +### Metrics, Monitoring + +See [List of metrics](https://etcd.io/docs/latest/metrics/) for all metrics per release. + +Note that any `etcd_debugging_*` metrics are experimental and subject to change. + +- Deprecated `etcd_debugging_mvcc_db_total_size_in_bytes` Prometheus metric. Use `etcd_mvcc_db_total_size_in_bytes` instead. +- Deprecated `etcd_debugging_mvcc_put_total` Prometheus metric. Use `etcd_mvcc_put_total` instead. +- Deprecated `etcd_debugging_mvcc_delete_total` Prometheus metric. Use `etcd_mvcc_delete_total` instead. +- Deprecated `etcd_debugging_mvcc_txn_total` Prometheus metric. Use `etcd_mvcc_txn_total` instead. +- Deprecated `etcd_debugging_mvcc_range_total` Prometheus metric. Use `etcd_mvcc_range_total` instead. +- Add [`etcd_debugging_mvcc_current_revision`](https://github.com/etcd-io/etcd/pull/11126) Prometheus metric. +- Add [`etcd_debugging_mvcc_compact_revision`](https://github.com/etcd-io/etcd/pull/11126) Prometheus metric. +- Change [`etcd_cluster_version`](https://github.com/etcd-io/etcd/pull/11254) Prometheus metrics to include only major and minor version. +- Add [`etcd_debugging_mvcc_total_put_size_in_bytes`](https://github.com/etcd-io/etcd/pull/11374) Prometheus metric. +- Add [`etcd_server_client_requests_total` with `"type"` and `"client_api_version"` labels](https://github.com/etcd-io/etcd/pull/11687). +- Add [`etcd_wal_write_bytes_total`](https://github.com/etcd-io/etcd/pull/11738). +- Add [`etcd_debugging_auth_revision`](https://github.com/etcd-io/etcd/commit/f14d2a087f7b0fd6f7980b95b5e0b945109c95f3). +- Add [`os_fd_used` and `os_fd_limit` to monitor current OS file descriptors](https://github.com/etcd-io/etcd/pull/12214). +- Add [`etcd_disk_defrag_inflight`](https://github.com/etcd-io/etcd/pull/13395). + +### etcd server + + - Add [don't attempt to grant nil permission to a role](https://github.com/etcd-io/etcd/pull/13086). + - Add [don't activate alarms w/missing AlarmType](https://github.com/etcd-io/etcd/pull/13084). + - Add [`TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256` and `TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256` to `etcd --cipher-suites`](https://github.com/etcd-io/etcd/pull/11864). + - Automatically [create parent directory if it does not exist](https://github.com/etcd-io/etcd/pull/9626) (fix [issue#9609](https://github.com/etcd-io/etcd/issues/9609)). + - v4.0 will configure `etcd --enable-v2=true --enable-v2v3=/aaa` to enable v2 API server that is backed by **v3 storage**. +- [`etcd --backend-bbolt-freelist-type`] flag is now stable. + - `etcd --experimental-backend-bbolt-freelist-type` has been deprecated. +- Support [downgrade API](https://github.com/etcd-io/etcd/pull/11715). +- Deprecate v2 apply on cluster version. [Use v3 request to set cluster version and recover cluster version from v3 backend](https://github.com/etcd-io/etcd/pull/11427). +- [Use v2 api to update cluster version to support mixed version cluster during upgrade](https://github.com/etcd-io/etcd/pull/12988). +- [Fix corruption bug in defrag](https://github.com/etcd-io/etcd/pull/11613). +- Fix [quorum protection logic when promoting a learner](https://github.com/etcd-io/etcd/pull/11640). +- Improve [peer corruption checker](https://github.com/etcd-io/etcd/pull/11621) to work when peer mTLS is enabled. +- Log [`[CLIENT-PORT]/health` check in server side](https://github.com/etcd-io/etcd/pull/11704). +- Log [successful etcd server-side health check in debug level](https://github.com/etcd-io/etcd/pull/12677). +- Improve [compaction performance when latest index is greater than 1-million](https://github.com/etcd-io/etcd/pull/11734). +- [Refactor consistentindex](https://github.com/etcd-io/etcd/pull/11699). +- [Add log when etcdserver failed to apply command](https://github.com/etcd-io/etcd/pull/11670). +- Improve [count-only range performance](https://github.com/etcd-io/etcd/pull/11771). +- Remove [redundant storage restore operation to shorten the startup time](https://github.com/etcd-io/etcd/pull/11779). + - With 40 million key test data,it can shorten the startup time from 5 min to 2.5 min. +- [Fix deadlock bug in mvcc](https://github.com/etcd-io/etcd/pull/11817). +- Fix [inconsistency between WAL and server snapshot](https://github.com/etcd-io/etcd/pull/11888). + - Previously, server restore fails if it had crashed after persisting raft hard state but before saving snapshot. + - See https://github.com/etcd-io/etcd/issues/10219 for more. + - Add [missing CRC checksum check in WAL validate method otherwise causes panic](https://github.com/etcd-io/etcd/pull/11924). + - See https://github.com/etcd-io/etcd/issues/11918. +- Improve logging around snapshot send and receive. +- [Push down RangeOptions.limit argv into index tree to reduce memory overhead](https://github.com/etcd-io/etcd/pull/11990). +- Add [reason field for /health response](https://github.com/etcd-io/etcd/pull/11983). +- Add [exclude alarms from health check conditionally](https://github.com/etcd-io/etcd/pull/12880). +- Add [`etcd --unsafe-no-fsync`](https://github.com/etcd-io/etcd/pull/11946) flag. + - Setting the flag disables all uses of fsync, which is unsafe and will cause data loss. This flag makes it possible to run an etcd node for testing and development without placing lots of load on the file system. +- Add [`etcd --auth-token-ttl`](https://github.com/etcd-io/etcd/pull/11980) flag to customize `simpleTokenTTL` settings. +- Improve [`runtime.FDUsage` call pattern to reduce objects malloc of Memory Usage and CPU Usage](https://github.com/etcd-io/etcd/pull/11986). +- Improve [mvcc.watchResponse channel Memory Usage](https://github.com/etcd-io/etcd/pull/11987). +- Log [expensive request info in UnaryInterceptor](https://github.com/etcd-io/etcd/pull/12086). +- [Fix invalid Go type in etcdserverpb](https://github.com/etcd-io/etcd/pull/12000). +- [Improve healthcheck by using v3 range request and its corresponding timeout](https://github.com/etcd-io/etcd/pull/12195). +- Add [`etcd --experimental-watch-progress-notify-interval`](https://github.com/etcd-io/etcd/pull/12216) flag to make watch progress notify interval configurable. +- Fix [server panic in slow writes warnings](https://github.com/etcd-io/etcd/issues/12197). + - Fixed via [PR#12238](https://github.com/etcd-io/etcd/pull/12238). +- [Fix server panic](https://github.com/etcd-io/etcd/pull/12288) when force-new-cluster flag is enabled in a cluster which had learner node. +- Add [`etcd --self-signed-cert-validity`](https://github.com/etcd-io/etcd/pull/12429) flag to support setting certificate expiration time. + - Notice, certificates generated by etcd are valid for 1 year by default when specifying the auto-tls or peer-auto-tls option. +- Add [`etcd --experimental-warning-apply-duration`](https://github.com/etcd-io/etcd/pull/12448) flag which allows apply duration threshold to be configurable. +- Add [`etcd --experimental-memory-mlock`](https://github.com/etcd-io/etcd/pull/TODO) flag which prevents etcd memory pages to be swapped out. +- Add [`etcd --socket-reuse-port`](https://github.com/etcd-io/etcd/pull/12702) flag + - Setting this flag enables `SO_REUSEPORT` which allows rebind of a port already in use. User should take caution when using this flag to ensure flock is properly enforced. +- Add [`etcd --socket-reuse-address`](https://github.com/etcd-io/etcd/pull/12702) flag + - Setting this flag enables `SO_REUSEADDR` which allows binding to an address in `TIME_WAIT` state, improving etcd restart time. +- Reduce [around 30% memory allocation by logging range response size without marshal](https://github.com/etcd-io/etcd/pull/12871). +- `ETCD_VERIFY="all"` environment triggers [additional verification of consistency](https://github.com/etcd-io/etcd/pull/12901) of etcd data-dir files. +- Add [`etcd --enable-log-rotation`](https://github.com/etcd-io/etcd/pull/12774) boolean flag which enables log rotation if true. +- Add [`etcd --log-rotation-config-json`](https://github.com/etcd-io/etcd/pull/12774) flag which allows passthrough of JSON config to configure log rotation for a file output target. +- Add experimental distributed tracing boolean flag [`--experimental-enable-distributed-tracing`](https://github.com/etcd-io/etcd/pull/12919) which enables tracing. +- Add [`etcd --experimental-distributed-tracing-address`](https://github.com/etcd-io/etcd/pull/12919) string flag which allows configuring the OpenTelemetry collector address. +- Add [`etcd --experimental-distributed-tracing-service-name`](https://github.com/etcd-io/etcd/pull/12919) string flag which allows changing the default "etcd" service name. +- Add [`etcd --experimental-distributed-tracing-instance-id`](https://github.com/etcd-io/etcd/pull/12919) string flag which configures an instance ID, which must be unique per etcd instance. +- Add [`--experimental-bootstrap-defrag-threshold-megabytes`](https://github.com/etcd-io/etcd/pull/12941) which configures a threshold for the unused db size and etcdserver will automatically perform defragmentation on bootstrap when it exceeds this value. The functionality is disabled if the value is 0. + +### Package `runtime` + +- Optimize [`runtime.FDUsage` by removing unnecessary sorting](https://github.com/etcd-io/etcd/pull/12214). + +### Package `embed` + +- Remove [`embed.Config.Debug`](https://github.com/etcd-io/etcd/pull/10947). + - Use `embed.Config.LogLevel` instead. +- Add [`embed.Config.ZapLoggerBuilder`](https://github.com/etcd-io/etcd/pull/11147) to allow creating a custom zap logger. +- Replace [global `*zap.Logger` with etcd server logger object](https://github.com/etcd-io/etcd/pull/12212). +- Add [`embed.Config.EnableLogRotation`](https://github.com/etcd-io/etcd/pull/12774) which enables log rotation if true. +- Add [`embed.Config.LogRotationConfigJSON`](https://github.com/etcd-io/etcd/pull/12774) to allow passthrough of JSON config to configure log rotation for a file output target. +- Add [`embed.Config.ExperimentalEnableDistributedTracing`](https://github.com/etcd-io/etcd/pull/12919) which enables experimental distributed tracing if true. +- Add [`embed.Config.ExperimentalDistributedTracingAddress`](https://github.com/etcd-io/etcd/pull/12919) which allows overriding default collector address. +- Add [`embed.Config.ExperimentalDistributedTracingServiceName`](https://github.com/etcd-io/etcd/pull/12919) which allows overriding default "etcd" service name. +- Add [`embed.Config.ExperimentalDistributedTracingServiceInstanceID`](https://github.com/etcd-io/etcd/pull/12919) which allows configuring an instance ID, which must be uniquer per etcd instance. + +### Package `clientv3` + +- Remove [excessive watch cancel logging messages](https://github.com/etcd-io/etcd/pull/12187). + - See [kubernetes/kubernetes#93450](https://github.com/kubernetes/kubernetes/issues/93450). +- Add [`TryLock`](https://github.com/etcd-io/etcd/pull/11104) method to `clientv3/concurrency/Mutex`. A non-blocking method on `Mutex` which does not wait to get lock on the Mutex, returns immediately if Mutex is locked by another session. +- Fix [client balancer failover against multiple endpoints](https://github.com/etcd-io/etcd/pull/11184). + - Fix [`"kube-apiserver: failover on multi-member etcd cluster fails certificate check on DNS mismatch"`](https://github.com/kubernetes/kubernetes/issues/83028). +- Fix [IPv6 endpoint parsing in client](https://github.com/etcd-io/etcd/pull/11211). + - Fix ["1.16: etcd client does not parse IPv6 addresses correctly when members are joining" (kubernetes#83550)](https://github.com/kubernetes/kubernetes/issues/83550). +- Fix [errors caused by grpc changing balancer/resolver API](https://github.com/etcd-io/etcd/pull/11564). This change is compatible with grpc >= [v1.26.0](https://github.com/grpc/grpc-go/releases/tag/v1.26.0), but is not compatible with < v1.26.0 version. +- Use [ServerName as the authority](https://github.com/etcd-io/etcd/pull/11574) after bumping to grpc v1.26.0. Remove workaround in [#11184](https://github.com/etcd-io/etcd/pull/11184). +- Fix [`"hasleader"` metadata embedding](https://github.com/etcd-io/etcd/pull/11687). + - Previously, `clientv3.WithRequireLeader(ctx)` was overwriting existing context keys. +- Fix [watch leak caused by lazy cancellation](https://github.com/etcd-io/etcd/pull/11850). When clients cancel their watches, a cancel request will now be immediately sent to the server instead of waiting for the next watch event. +- Make sure [save snapshot downloads checksum for integrity checks](https://github.com/etcd-io/etcd/pull/11896). +- Fix [auth token invalid after watch reconnects](https://github.com/etcd-io/etcd/pull/12264). Get AuthToken automatically when clientConn is ready. +- Improve [clientv3:get AuthToken gracefully without extra connection](https://github.com/etcd-io/etcd/pull/12165). +- Changed [clientv3 dialing code](https://github.com/etcd-io/etcd/pull/12671) to use grpc resolver API instead of custom balancer. + - Endpoints self identify now as `etcd-endpoints://{id}/#initially={list of endpoints}` e.g. `etcd-endpoints://0xc0009d8540/#initially=[localhost:2079]` +- Make sure [save snapshot downloads checksum for integrity checks](https://github.com/etcd-io/etcd/pull/11896). + +### Package `lease` + +- Fix [memory leak in follower nodes](https://github.com/etcd-io/etcd/pull/11731). + - https://github.com/etcd-io/etcd/issues/11495 + - https://github.com/etcd-io/etcd/issues/11730 +- Make sure [grant/revoke won't be applied repeatedly after restarting etcd](https://github.com/etcd-io/etcd/pull/11935). + +### Package `wal` + +- Add [`etcd_wal_write_bytes_total`](https://github.com/etcd-io/etcd/pull/11738). +- Handle [out-of-range slice bound in `ReadAll` and entry limit in `decodeRecord`](https://github.com/etcd-io/etcd/pull/11793). + +### etcdctl v3 + +- Fix `etcdctl member add` command to prevent potential timeout. ([PR#11194](https://github.com/etcd-io/etcd/pull/11194) and [PR#11638](https://github.com/etcd-io/etcd/pull/11638)) +- Add [`etcdctl watch --progress-notify`](https://github.com/etcd-io/etcd/pull/11462) flag. +- Add [`etcdctl auth status`](https://github.com/etcd-io/etcd/pull/11536) command to check if authentication is enabled +- Add [`etcdctl get --count-only`](https://github.com/etcd-io/etcd/pull/11743) flag for output type `fields`. +- Add [`etcdctl member list -w=json --hex`](https://github.com/etcd-io/etcd/pull/11812) flag to print memberListResponse in hex format json. +- Changed [`etcdctl lock exec-command`](https://github.com/etcd-io/etcd/pull/12829) to return exit code of exec-command. +- [New tool: `etcdutl`](https://github.com/etcd-io/etcd/pull/12971) incorporated functionality of: `etcdctl snapshot status|restore`, `etcdctl backup`, `etcdctl defrag --data-dir ...`. +- [ETCDCTL_API=3 `etcdctl migrate`](https://github.com/etcd-io/etcd/pull/12971) has been decommissioned. Use etcd <=v3.4 to restore v2 storage. + +### gRPC gateway + +- [gRPC gateway](https://github.com/grpc-ecosystem/grpc-gateway) only supports [`/v3`](TODO) endpoint. + - Deprecated [`/v3beta`](https://github.com/etcd-io/etcd/pull/9298). + - `curl -L http://localhost:2379/v3beta/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` does work in v3.5. Use `curl -L http://localhost:2379/v3/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` instead. +- Set [`enable-grpc-gateway`](https://github.com/etcd-io/etcd/pull/12297) flag to true when using a config file to keep the defaults the same as the command line configuration. + +### gRPC Proxy + +- Fix [`panic on error`](https://github.com/etcd-io/etcd/pull/11694) for metrics handler. +- Add [gRPC keepalive related flags](https://github.com/etcd-io/etcd/pull/11711) `grpc-keepalive-min-time`, `grpc-keepalive-interval` and `grpc-keepalive-timeout`. +- [Fix grpc watch proxy hangs when failed to cancel a watcher](https://github.com/etcd-io/etcd/pull/12030) . +- Add [metrics handler for grpcproxy self](https://github.com/etcd-io/etcd/pull/12107). +- Add [health handler for grpcproxy self](https://github.com/etcd-io/etcd/pull/12114). + +### Auth + +- Fix [NoPassword check when adding user through GRPC gateway](https://github.com/etcd-io/etcd/pull/11418) ([issue#11414](https://github.com/etcd-io/etcd/issues/11414)) +- Fix bug where [some auth related messages are logged at wrong level](https://github.com/etcd-io/etcd/pull/11586) +- [Fix a data corruption bug by saving consistent index](https://github.com/etcd-io/etcd/pull/11652). +- [Improve checkPassword performance](https://github.com/etcd-io/etcd/pull/11735). +- [Add authRevision field in AuthStatus](https://github.com/etcd-io/etcd/pull/11659). +- Fix [a bug of not refreshing expired tokens](https://github.com/etcd-io/etcd/pull/13308). +- +### API + +- Add [`/v3/auth/status`](https://github.com/etcd-io/etcd/pull/11536) endpoint to check if authentication is enabled +- [Add `Linearizable` field to `etcdserverpb.MemberListRequest`](https://github.com/etcd-io/etcd/pull/11639). +- [Learner support Snapshot RPC](https://github.com/etcd-io/etcd/pull/12890/). + +### Package `netutil` + +- Remove [`netutil.DropPort/RecoverPort/SetLatency/RemoveLatency`](https://github.com/etcd-io/etcd/pull/12491). + - These are not used anymore. They were only used for older versions of functional testing. + - Removed to adhere to best security practices, minimize arbitrary shell invocation. + +### `tools/etcd-dump-metrics` + +- Implement [input validation to prevent arbitrary shell invocation](https://github.com/etcd-io/etcd/pull/12491). + +### Dependency + +- Upgrade [`google.golang.org/grpc`](https://github.com/grpc/grpc-go/releases) from [**`v1.23.0`**](https://github.com/grpc/grpc-go/releases/tag/v1.23.0) to [**`v1.37.0`**](https://github.com/grpc/grpc-go/releases/tag/v1.37.0). +- Upgrade [`go.uber.org/zap`](https://github.com/uber-go/zap/releases) from [**`v1.14.1`**](https://github.com/uber-go/zap/releases/tag/v1.14.1) to [**`v1.16.0`**](https://github.com/uber-go/zap/releases/tag/v1.16.0). + +### Platforms + +- etcd now [officially supports `arm64`](https://github.com/etcd-io/etcd/pull/12929). + - See https://github.com/etcd-io/etcd/pull/12928 for adding automated tests with `arm64` EC2 instances (Graviton 2). + - See https://github.com/etcd-io/website/pull/273 for new platform support tier policies. + +### Release + +- Add s390x build support ([PR#11548](https://github.com/etcd-io/etcd/pull/11548) and [PR#11358](https://github.com/etcd-io/etcd/pull/11358)) + +### Go + +- Require [*Go 1.16+*](https://github.com/etcd-io/etcd/pull/11110). +- Compile with [*Go 1.16+*](https://golang.org/doc/devel/release.html#go1.16) +- etcd uses [go modules](https://github.com/etcd-io/etcd/pull/12279) (instead of vendor dir) to track dependencies. + +### Project Governance + +- The etcd team has added, a well defined and openly discussed, project [governance](https://github.com/etcd-io/etcd/pull/11175). + + +
+ diff --git a/CHANGELOG/CHANGELOG-3.6.md b/CHANGELOG/CHANGELOG-3.6.md new file mode 100644 index 00000000000..c6569365d97 --- /dev/null +++ b/CHANGELOG/CHANGELOG-3.6.md @@ -0,0 +1,111 @@ + + +Previous change logs can be found at [CHANGELOG-3.5](https://github.com/etcd-io/etcd/blob/main/CHANGELOG/CHANGELOG-3.5.md). + +
+ +## v3.6.0 (TBD) + +See [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0...v3.6.0). + +### Breaking Changes + +- `etcd` will no longer start on data dir created by newer versions (for example etcd v3.6 will not run on v3.7+ data dir). To downgrade data dir please check out `etcdutl migrate` command. +- `etcd` doesn't support serving client requests on the peer listen endpoints (--listen-peer-urls). See [pull/13565](https://github.com/etcd-io/etcd/pull/13565). +- `etcdctl` will sleep(2s) in case of range delete without `--range` flag. See [pull/13747](https://github.com/etcd-io/etcd/pull/13747) +- Applications which depend on etcd v3.6 packages must be built with go version >= v1.18. + +### Deprecations + +- Deprecated [V2 discovery](https://etcd.io/docs/v3.5/dev-internal/discovery_protocol/). +- Deprecated [SetKeepAlive and SetKeepAlivePeriod in limitListenerConn](https://github.com/etcd-io/etcd/pull/14356). +- Removed [etcdctl defrag --data-dir](https://github.com/etcd-io/etcd/pull/13793). +- Removed [etcdctl snapshot status](https://github.com/etcd-io/etcd/pull/13809). +- Removed [etcdctl snapshot restore](https://github.com/etcd-io/etcd/pull/13809). +- Removed [etcdutl snapshot save](https://github.com/etcd-io/etcd/pull/13809). + + +### etcdctl v3 + +- Add command to generate [shell completion](https://github.com/etcd-io/etcd/pull/13133). +- When print endpoint status, [show db size in use](https://github.com/etcd-io/etcd/pull/13639) +- [Always print the raft_term in decimal](https://github.com/etcd-io/etcd/pull/13711) when displaying member list in json. +- [Add one more field `storageVersion`](https://github.com/etcd-io/etcd/pull/13773) into the response of command `etcdctl endpoint status`. +- Add [`--max-txn-ops`](https://github.com/etcd-io/etcd/pull/14340) flag to make-mirror command. +- Add [`--consistency`](https://github.com/etcd-io/etcd/pull/15261) flag to member list command. +- Display [field `hash_revision`](https://github.com/etcd-io/etcd/pull/14812) for `etcdctl endpoint hash` command. +- Add [`--max-request-bytes` and `--max-recv-bytes`](https://github.com/etcd-io/etcd/pull/18718) global flags. + +### etcdutl v3 + +- Add command to generate [shell completion](https://github.com/etcd-io/etcd/pull/13142). +- Add `migrate` command for downgrading/upgrading etcd data dir files. +- Add [optional --bump-revision and --mark-compacted flag to etcdutl snapshot restore operation](https://github.com/etcd-io/etcd/pull/16029). +- Add [hashkv](https://github.com/etcd-io/etcd/pull/15965) command to print hash of keys and values up to given revision +- Removed [legacy etcdutl backup](https://github.com/etcd-io/etcd/pull/16662) + +### Package `clientv3` + +- [Support serializable `MemberList` operation](https://github.com/etcd-io/etcd/pull/15261). + +### Package `server` + +- Package `mvcc` was moved to `storage/mvcc` +- Package `mvcc/backend` was moved to `storage/backend` +- Package `mvcc/buckets` was moved to `storage/schema` +- Package `wal` was moved to `storage/wal` +- Package `datadir` was moved to `storage/datadir` + +### Package `raft` +- [Decouple raft from etcd](https://github.com/etcd-io/etcd/issues/14713). Migrated raft to a separate [repository](https://github.com/etcd-io/raft), and renamed raft module to `go.etcd.io/raft/v3`. + +### etcd server + +- Add [`etcd --log-format`](https://github.com/etcd-io/etcd/pull/13339) flag to support log format. +- Add [`etcd --experimental-max-learners`](https://github.com/etcd-io/etcd/pull/13377) flag to allow configuration of learner max membership. +- Add [`etcd --experimental-enable-lease-checkpoint-persist`](https://github.com/etcd-io/etcd/pull/13508) flag to handle upgrade from v3.5.2 clusters with this feature enabled. +- Add [`etcdctl make-mirror --rev`](https://github.com/etcd-io/etcd/pull/13519) flag to support incremental mirror. +- Add [v3 discovery](https://github.com/etcd-io/etcd/pull/13635) to bootstrap a new etcd cluster. +- Add [field `storage`](https://github.com/etcd-io/etcd/pull/13772) into the response body of endpoint `/version`. +- Add [`etcd --max-concurrent-streams`](https://github.com/etcd-io/etcd/pull/14169) flag to configure the max concurrent streams each client can open at a time, and defaults to math.MaxUint32. +- Add [`etcd grpc-proxy --experimental-enable-grpc-logging`](https://github.com/etcd-io/etcd/pull/14266) flag to logging all grpc requests and responses. +- Add [`etcd --experimental-compact-hash-check-enabled --experimental-compact-hash-check-time`](https://github.com/etcd-io/etcd/issues/14039) flags to support enabling reliable corruption detection on compacted revisions. +- Add [Protection on maintenance request when auth is enabled](https://github.com/etcd-io/etcd/pull/14663). +- Graduated [`--experimental-warning-unary-request-duration` to `--warning-unary-request-duration`](https://github.com/etcd-io/etcd/pull/14414). Note the experimental flag is deprecated and will be decommissioned in v3.7. +- Add [field `hash_revision` into `HashKVResponse`](https://github.com/etcd-io/etcd/pull/14537). +- Add [`etcd --experimental-snapshot-catch-up-entries`](https://github.com/etcd-io/etcd/pull/15033) flag to configure number of entries for a slow follower to catch up after compacting the raft storage entries and defaults to 5k. +- Decreased [`--snapshot-count` default value from 100,000 to 10,000](https://github.com/etcd-io/etcd/pull/15408) +- Add [`etcd --tls-min-version --tls-max-version`](https://github.com/etcd-io/etcd/pull/15156) to enable support for TLS 1.3. +- Add [quota to endpoint status response](https://github.com/etcd-io/etcd/pull/17877) +- Add ['etcd --experimental-set-member-localaddr'](https://github.com/etcd-io/etcd/pull/17661) to enable using the first specified and non-loopback local address from initial-advertise-peer-urls as the local address when communicating with a peer. +- Add [Support multiple values for allowed client and peer TLS identities](https://github.com/etcd-io/etcd/pull/18015) +- Add [`embed.Config.GRPCAdditionalServerOptions`](https://github.com/etcd-io/etcd/pull/14066) to support updating the default internal gRPC configuration for embedded use cases. + +### etcd grpc-proxy + +- Add [`etcd grpc-proxy start --endpoints-auto-sync-interval`](https://github.com/etcd-io/etcd/pull/14354) flag to enable and configure interval of auto sync of endpoints with server. +- Add [`etcd grpc-proxy start --listen-cipher-suites`](https://github.com/etcd-io/etcd/pull/14308) flag to support adding configurable cipher list. +- Add [`tls min/max version to grpc proxy`](https://github.com/etcd-io/etcd/pull/18816) to support setting TLS min and max version. + +### tools/benchmark + +- [Add etcd client autoSync flag](https://github.com/etcd-io/etcd/pull/13416) + +### Metrics, Monitoring + +See [List of metrics](https://etcd.io/docs/latest/metrics/) for all metrics per release. + +- Add [`etcd_disk_defrag_inflight`](https://github.com/etcd-io/etcd/pull/13371). +- Add [`etcd_debugging_server_alarms`](https://github.com/etcd-io/etcd/pull/14276). +- Add [`etcd_server_range_duration_seconds`](https://github.com/etcd-io/etcd/pull/17983). + +### Go +- Require [Go 1.23+](https://github.com/etcd-io/etcd/pull/16594). +- Compile with [Go 1.23+](https://go.dev/doc/devel/release#go1.21.minor). Please refer to [gc-guide](https://go.dev/doc/gc-guide) to configure `GOGC` and `GOMEMLIMIT` properly. + +### Other + +- Use Distroless as base image to make the image less vulnerable and reduce image size. +- [Upgrade grpc-gateway from v1 to v2](https://github.com/etcd-io/etcd/pull/16595). + +
diff --git a/CHANGELOG-4.0.md b/CHANGELOG/CHANGELOG-4.0.md similarity index 85% rename from CHANGELOG-4.0.md rename to CHANGELOG/CHANGELOG-4.0.md index 6b15f723719..860e5efd072 100644 --- a/CHANGELOG-4.0.md +++ b/CHANGELOG/CHANGELOG-4.0.md @@ -1,14 +1,9 @@ -Previous change logs can be found at [CHANGELOG-3.x](https://github.com/etcd-io/etcd/blob/main/CHANGELOG-3.x.md). - - -The minimum recommended etcd versions to run in **production** are 3.2.28+, 3.3.18+, and 3.4.2+. - +Previous change logs can be found at [CHANGELOG-3.x](https://github.com/etcd-io/etcd/blob/main/CHANGELOG/CHANGELOG-3.x.md).
- ## v4.0.0 (TBD) See [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0...v4.0.0) and [v4.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_4_0/) for any breaking changes. @@ -18,10 +13,6 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0...v4.0.0) and ### Breaking Changes - [Secure etcd by default](https://github.com/etcd-io/etcd/issues/9475)? -- Change `/health` endpoint output. - - Previously, `{"health":"true"}`. - - Now, `{"health":true}`. - - Breaks [Kubernetes `kubectl get componentstatuses` command](https://github.com/kubernetes/kubernetes/issues/58240). - Deprecate [`etcd --proxy*`](TODO) flags; **no more v2 proxy**. - Deprecate [v2 storage backend](https://github.com/etcd-io/etcd/issues/9232); **no more v2 store**. - v2 API is still supported via [v2 emulation](TODO). diff --git a/CHANGELOG/README.md b/CHANGELOG/README.md new file mode 100644 index 00000000000..8448414b9b7 --- /dev/null +++ b/CHANGELOG/README.md @@ -0,0 +1,21 @@ +# Change logs + +## Production recommendation + +The minimum recommended etcd versions to run in **production** are v3.4.22+ and v3.5.6+. Refer to the [versioning policy](https://etcd.io/docs/v3.5/op-guide/versioning/) for more details. + +### v3.5 data corruption issue + +Running etcd v3.5.2, v3.5.1 and v3.5.0 under high load can cause a data corruption issue. +If etcd process is killed, occasionally some committed transactions are not reflected on all the members. +Recommendation is to upgrade to v3.5.4+. + +If you have encountered data corruption, please follow instructions on https://etcd.io/docs/v3.5/op-guide/data_corruption/. + +## Change log rules +1. Each patch release only includes changes against previous patch release. +For example, the change log of v3.5.5 should only include items which are new to v3.5.4. +2. For the first release (e.g. 3.4.0, 3.5.0, 3.6.0, 4.0.0 etc.) for each minor or major +version, it only includes changes which are new to the first release of previous minor +or major version. For example, v3.5.0 should only include items which are new to v3.4.0, +and v3.6.0 should only include items which are new to v3.5.0. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3b1d78dcfa9..5af3a32ea52 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,47 +1,164 @@ # 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. +etcd is Apache 2.0 licensed and accepts contributions via GitHub pull requests. +This document outlines the basics of contributing to etcd. -# Email and chat +This is a rough outline of what a contributor's workflow looks like: +* [Find something to work on](#Find-something-to-work-on) + * [Check for flaky tests](#Check-for-flaky-tests) +* [Set up development environment](#Set-up-development-environment) +* [Implement your change](#Implement-your-change) +* [Commit your change](#Commit-your-change) +* [Create a pull request](#Create-a-pull-request) +* [Get your pull request reviewed](#Get-your-pull-request-reviewed) -- 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 -- Slack: [#etcd](https://kubernetes.slack.com/messages/C3HD8ARJ5/details/) +If you have any questions, please reach out using one of the methods listed in [contact]. -## Getting started +[contact]: ./README.md#Contact -- Fork the repository on GitHub -- Read the README.md for build instructions +## Learn more about etcd -## Reporting bugs and creating issues +Before making a change please look through the resources below to learn more about etcd and tools used for development. -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://etcd.io/docs/latest/reporting_bugs) 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. +* Please learn about [Git](https://github.com/git-guides) version control system used in etcd. +* Read the [etcd learning resources](https://etcd.io/docs/v3.5/learning/) +* Read the [etcd community membership](/Documentation/contributor-guide/community-membership.md) +* Watch [etcd deep dive](https://www.youtube.com/watch?v=D2pm6ufIt98&t=927s) +* Watch [etcd code walkthrough](https://www.youtube.com/watch?v=H3XaSF6wF7w) -## Contribution flow +## Find something to work on -This is a rough outline of what a contributor's workflow looks like: +All the work in the etcd project is tracked in [GitHub issue tracker]. +Issues should be properly labeled making it easy to find something for you. -- Create a topic branch from where to base the contribution. This is usually main. -- 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. +Depending on your interest and experience you should check different labels: +* If you are just starting, check issues labeled with [good first issue]. +* When you feel more comfortable in your contributions, check out [help wanted]. +* Advanced contributors can try to help with issues labeled [priority/important] covering the most relevant work at the time. -Thanks for contributing! +If any of the aforementioned labels don't have unassigned issues, please [contact] one of the [maintainers] asking to triage more issues. + +[github issue tracker]: https://github.com/etcd-io/etcd/issues +[good first issue]: https://github.com/search?type=issues&q=org%3Aetcd-io+state%3Aopen++label%3A%22good+first+issue%22 +[help wanted]: https://github.com/search?type=issues&q=org%3Aetcd-io+state%3Aopen++label%3A%22help+wanted%22 +[maintainers]: https://github.com/etcd-io/etcd/blob/main/OWNERS +[priority/important]: https://github.com/search?type=issues&q=org%3Aetcd-io+state%3Aopen++label%3A%22priority%2Fimportant%22 + +### Check for flaky tests + +The project could always use some help to deflake tests. [These](https://github.com/etcd-io/etcd/issues?q=is%3Aissue+is%3Aopen+label%3Atype%2Fflake) are the currently open flaky test issues. + +For more, because etcd uses Kubernetes' prow infrastructure to run CI jobs, the past test results can be viewed at [testgrid](https://testgrid.k8s.io/sig-etcd). + +| Tests | Status | +| ----- | ------ | +| periodics e2e-amd64 | [![sig-etcd-periodics/ci-etcd-e2e-amd64](https://testgrid.k8s.io/q/summary/sig-etcd-periodics/ci-etcd-e2e-amd64/tests_status?style=svg)](https://testgrid.k8s.io/q/summary/sig-etcd-periodics/ci-etcd-e2e-amd64) | +| presubmit build | [![sig-etcd-presubmits/pull-etcd-build](https://testgrid.k8s.io/q/summary/sig-etcd-presubmits/pull-etcd-build/tests_status?style=svg)](https://testgrid.k8s.io/q/summary/sig-etcd-presubmits/pull-etcd-build) | +| presubmit e2e-amd64 | [![sig-etcd-presubmits/pull-etcd-e2e-amd64](https://testgrid.k8s.io/q/summary/sig-etcd-presubmits/pull-etcd-e2e-amd64/tests_status?style=svg)](https://testgrid.k8s.io/q/summary/sig-etcd-presubmits/pull-etcd-e2e-amd64) | +| presubmit unit-test | [![sig-etcd-presubmits/pull-etcd-unit-test](https://testgrid.k8s.io/q/summary/sig-etcd-presubmits/pull-etcd-unit-test/tests_status?style=svg)](https://testgrid.k8s.io/q/summary/sig-etcd-presubmits/pull-etcd-unit-test) | +| presubmit verify | [![sig-etcd-presubmits/pull-etcd-verify](https://testgrid.k8s.io/q/summary/sig-etcd-presubmits/pull-etcd-verify/tests_status?style=svg)](https://testgrid.k8s.io/q/summary/sig-etcd-presubmits/pull-etcd-verify) | +| postsubmit build | [![sig-etcd-postsubmits/post-etcd-build](https://testgrid.k8s.io/q/summary/sig-etcd-postsubmits/post-etcd-build/tests_status?style=svg)](https://testgrid.k8s.io/q/summary/sig-etcd-postsubmits/post-etcd-build) | + +If you find any flaky tests on testgrid, please + +1. Check [existing issues](https://github.com/etcd-io/etcd/issues?q=is%3Aissue+is%3Aopen+label%3Atype%2Fflake) to see if an issue has already been opened for this test. If not, open an issue with the `type/flake` label. +2. Try to reproduce the flaky test on your machine via [`stress`](https://pkg.go.dev/golang.org/x/tools/cmd/stress), for example, to reproduce the failure of `TestPeriodicSkipRevNotChange`: + +```bash +# install the stress utility +go install golang.org/x/tools/cmd/stress@latest +cd server/etcdserver/api/v3compactor +# compile the test +go test -v -c -count 1 +# run the compiled test file using stress +stress -p=8 ./v3compactor.test -test.run “^TestPeriodicSkipRevNotChange$” +``` +3. Fix it. + +## Set up development environment + +The etcd project supports two options for development: + + 1. Manually set up the local environment. + 2. Automatically set up [devcontainer](https://containers.dev). + +For both options, the only supported architecture is `linux-amd64`. Bug reports for other environments will generally be ignored. Supporting new environments requires the introduction of proper tests and maintainer support that is currently lacking in the etcd project. + +If you would like etcd to support your preferred environment you can [file an issue]. + +### Option 1 - Manually set up the local environment + +This is the original etcd development environment, is most supported, and is backward compatible for the development of older etcd versions. + +Follow the steps below to set up the environment: + +- [Clone the repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) +- Install Go by following [installation](https://go.dev/doc/install). Please check the minimal go version in [go.mod file](./go.mod#L3). +- Install build tools: + - [`make`](https://www.gnu.org/software/make/): For Debian-based distributions + you can run `sudo apt-get install build-essential` + - [`protoc`](https://protobuf.dev/): You can download it for your os. Use + version + [`v3.20.3`](https://github.com/protocolbuffers/protobuf/releases/tag/v3.20.3). + - [`yamllint`](https://www.yamllint.com/): For Debian-based distribution you + can run `sudo apt-get install yamllint` + - [`jq`](https://jqlang.github.io/jq/): For Debian-based distribution you can + run `sudo apt-get install jq` + - [`xz`](https://tukaani.org/xz/): For Debian-based distribution you can run + `sudo apt-get install xz-utils` +- Verify that everything is installed by running `make build` -### Code style +Note: `make build` runs with `-v`. Other build flags can be added through env `GO_BUILD_FLAGS`, **if required**. Eg., +```console +GO_BUILD_FLAGS="-buildmode=pie" make build +``` + +### Option 2 - Automatically set up devcontainer + +This is a more recently added environment that aims to make it faster for new contributors to get started with etcd. This option is supported for etcd versions 3.6 onwards. + +This option can be [used locally](https://code.visualstudio.com/docs/devcontainers/tutorial) on a system running Visual Studio Code and Docker, or in a remote cloud-based [Codespaces](https://github.com/features/codespaces) environment. + +To get started, create a codespace for this repository by clicking this 👇 + +[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=11225014) + +A codespace will open in a web-based version of Visual Studio Code. The [dev container](.devcontainer/devcontainer.json) is fully configured with the software needed for this project. + +**Note**: Dev containers is an open spec which is supported by [GitHub Codespaces](https://github.com/codespaces) and [other tools](https://containers.dev/supporting). + +[file an issue]: https://github.com/etcd-io/etcd/issues/new/choose + +## Implement your change + +etcd code should follow the coding style suggested by the Golang community. +See the [style doc](https://go.dev/wiki/CodeReviewComments) for details. -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 ensure that your change passes static analysis (requires +[golangci-lint](https://golangci-lint.run/welcome/install/)): +- `make verify` to verify if all checks pass. +- `make verify-*` to verify a single check, for example, `make verify-bom` to verify if `bill-of-materials.json` file is up-to-date. +- `make fix` to fix all checks. +- `make fix-*` to fix a single check, for example, `make fix-bom` to update `bill-of-materials.json`. -Please follow this style to make etcd easy to review, maintain and develop. +Please ensure that your change passes tests. +- `make test-unit` to run unit tests. +- `make test-integration` to run integration tests. +- `make test-e2e` to run e2e tests. -### Format of the commit message +All changes are expected to come with a unit test. +All new features are expected to have either e2e or integration tests. -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. +## Commit your change +etcd follows a rough convention for commit messages: +* First line: + * Should start with the name of the package (for example `etcdserver`, `etcdctl`) followed by the `:` character. + * Describe the `what` behind the change +* Optionally, the author might provide the `why` behind the change in the main commit message body. +* Last line should be `Signed-off-by: firstname lastname ` (can be automatically generate by providing `--signoff` to git commit command). + +Example of commit message: ``` etcdserver: add grpc interceptor to log info on incoming requests @@ -51,44 +168,30 @@ 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 +Signed-off-by: FirstName LastName ``` -The format can be described more formally as follows: +## Create a pull request -``` -: - - - -