Skip to content

[release-3.6] Add write-only-skip-check option for --v2-deprecation to bypass the v2 content check#21850

Merged
ahrtr merged 1 commit into
etcd-io:release-3.6from
sahilpatel09:skip-v2-datastore-check-for-3.6
Jun 2, 2026
Merged

[release-3.6] Add write-only-skip-check option for --v2-deprecation to bypass the v2 content check#21850
ahrtr merged 1 commit into
etcd-io:release-3.6from
sahilpatel09:skip-v2-datastore-check-for-3.6

Conversation

@sahilpatel09
Copy link
Copy Markdown
Contributor

Takes over #21250

I saw #21848 PR to my understanding it was closed due to it targeting the main and AssertNoV2StoreContent has already been removed

I have backported it to 3.6 with the changes from #21250

While reproducing locally with no snapshot I saw these errors for WAL check due to 3.6 replaying v2 WAL entries and panics.

{"level":"panic","ts":"2026-05-29T10:03:47.719549-0400","caller":"schedule/schedule.go:202","msg":"execute job failed","job":"server_applyAll","panic":"detected disallowed v2 WAL for stage --v2-deprecation=write-only","stacktrace":"go.etcd.io/etcd/pkg/v3/schedule.(*fifo).executeJob.func1\n\tgo.etcd.io/etcd/pkg/v3@v3.6.11/schedule/schedule.go:202\nruntime.gopanic\n\truntime/panic.go:783\ngo.uber.org/zap/zapcore.CheckWriteAction.OnWrite\n\tgo.uber.org/zap@v1.27.0/zapcore/entry.go:196\ngo.uber.org/zap/zapcore.(*CheckedEntry).Write\n\tgo.uber.org/zap@v1.27.0/zapcore/entry.go:262\ngo.uber.org/zap.(*Logger).Panic\n\tgo.uber.org/zap@v1.27.0/logger.go:285\ngo.etcd.io/etcd/server/v3/etcdserver.v2ToV3Request\n\tgo.etcd.io/etcd/server/v3/etcdserver/apply_v2.go:31\ngo.etcd.io/etcd/server/v3/etcdserver.(*EtcdServer).applyEntryNormal\n\tgo.etcd.io/etcd/server/v3/etcdserver/server.go:1983\ngo.etcd.io/etcd/server/v3/etcdserver.(*EtcdServer).apply\n\tgo.etcd.io/etcd/server/v3/etcdserver/server.go:1924\ngo.etcd.io/etcd/server/v3/etcdserver.(*EtcdServer).applyEntries\n\tgo.etcd.io/etcd/server/v3/etcdserver/server.go:1210\ngo.etcd.io/etcd/server/v3/etcdserver.(*EtcdServer).applyAll\n\tgo.etcd.io/etcd/server/v3/etcdserver/server.go:985\ngo.etcd.io/etcd/server/v3/etcdserver.(*EtcdServer).run.func6\n\tgo.etcd.io/etcd/server/v3/etcdserver/server.go:855\ngo.etcd.io/etcd/pkg/v3/schedule.job.Do\n\tgo.etcd.io/etcd/pkg/v3@v3.6.11/schedule/schedule.go:41\ngo.etcd.io/etcd/pkg/v3/schedule.(*fifo).executeJob\n\tgo.etcd.io/etcd/pkg/v3@v3.6.11/schedule/schedule.go:206\ngo.etcd.io/etcd/pkg/v3/schedule.(*fifo).run\n\tgo.etcd.io/etcd/pkg/v3@v3.6.11/schedule/schedule.go:187"}
panic: detected disallowed v2 WAL for stage --v2-deprecation=write-only [recovered]
        panic: execute job failed

I did not include any changes for this as it is beyond the scope of original PR but open to a discussion to implement it.

@k8s-ci-robot
Copy link
Copy Markdown

Hi @sahilpatel09. Thanks for your PR.

I'm waiting for a etcd-io member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@sahilpatel09 sahilpatel09 force-pushed the skip-v2-datastore-check-for-3.6 branch from e57c9bb to 35dbf17 Compare May 29, 2026 14:11
@sahilpatel09
Copy link
Copy Markdown
Contributor Author

/cc @ahrtr

@k8s-ci-robot k8s-ci-robot requested a review from ahrtr May 29, 2026 14:12
Comment thread server/storage/util.go Outdated
@ahrtr
Copy link
Copy Markdown
Member

ahrtr commented May 29, 2026

I saw #21848 PR to my understanding it was closed due to it targeting the main and AssertNoV2StoreContent has already been removed

We still need #21848, otherwise when users upgrade from 3.6 to 3.7, it may break.

@ahrtr
Copy link
Copy Markdown
Member

ahrtr commented May 29, 2026

pls squash commits.

@sahilpatel09 sahilpatel09 force-pushed the skip-v2-datastore-check-for-3.6 branch from c1b8003 to fb51250 Compare May 29, 2026 14:50
@ahrtr
Copy link
Copy Markdown
Member

ahrtr commented May 29, 2026

/ok-to-test

@ahrtr
Copy link
Copy Markdown
Member

ahrtr commented May 29, 2026

Pls update this PR per ahrtr@3d12fea, which I manually verified.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

❌ Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.81%. Comparing base (8b95963) to head (4233958).

Files with missing lines Patch % Lines
server/storage/util.go 0.00% 3 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
server/config/v2_deprecation.go 92.30% <100.00%> (ø)
server/etcdmain/config.go 76.08% <100.00%> (+0.26%) ⬆️
server/storage/util.go 76.54% <0.00%> (-2.95%) ⬇️

... and 24 files with indirect coverage changes

@@               Coverage Diff               @@
##           release-3.6   #21850      +/-   ##
===============================================
- Coverage        68.92%   68.81%   -0.12%     
===============================================
  Files              420      420              
  Lines            35868    35873       +5     
===============================================
- Hits             24722    24685      -37     
- Misses            9699     9735      +36     
- Partials          1447     1453       +6     

Continue to review full report in Codecov by Sentry.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ahrtr ahrtr changed the title Add V2Depr1WriteOnlySkipCheck to bypass the v2 data store check [release-3.6] Add write-only-skip-check option for --v2-deprecation to bypass the v2 content check May 29, 2026
@sahilpatel09 sahilpatel09 force-pushed the skip-v2-datastore-check-for-3.6 branch from fb51250 to c54c4c1 Compare May 29, 2026 15:25
@ahrtr
Copy link
Copy Markdown
Member

ahrtr commented May 29, 2026

cc @fuweid @serathius

@ahrtr
Copy link
Copy Markdown
Member

ahrtr commented May 29, 2026

pls add an item

'write-only-skip-check'  // Custom v2 state is not allowed similar to 'write-only', but bypass the v2 content check. WARNING: Users should read the 3.5 -> 3.6 upgrade guide and use this option at their own risk.

right after 'write-only'

'write-only' // Custom v2 state is not allowed (default in v3.6)

Co-authored-by: Benjamin Wang <benjamin.wang@broadcom.com>
Signed-off-by: Sahil Patel <smppatel999@gmail.com>
@sahilpatel09 sahilpatel09 force-pushed the skip-v2-datastore-check-for-3.6 branch from c54c4c1 to 4233958 Compare May 29, 2026 19:13
@ahrtr ahrtr requested review from fuweid and ivanvc May 30, 2026 08:14
@ahrtr
Copy link
Copy Markdown
Member

ahrtr commented Jun 2, 2026

We missed this change in 3.6.12, let's get it included in 3.6.13. cc @fuweid @ivanvc @serathius

Copy link
Copy Markdown
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@k8s-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahrtr, fuweid, sahilpatel09

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ahrtr ahrtr merged commit 4fc29de into etcd-io:release-3.6 Jun 2, 2026
31 checks passed
@ahrtr
Copy link
Copy Markdown
Member

ahrtr commented Jun 2, 2026

can you add a changelog item under https://github.com/etcd-io/etcd/blob/main/CHANGELOG/CHANGELOG-3.6.md#etcd-server? thx

sahilpatel09 added a commit to sahilpatel09/etcd that referenced this pull request Jun 3, 2026
Signed-off-by: Sahil Patel <smppatel999@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants