-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doc for upgrading to v3.6 from v3.5 #967
base: main
Are you sure you want to change the base?
Conversation
Hi @shivamgcodes. 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 Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
a6fd77f
to
706c0de
Compare
/ok-to-test |
Thanks for your pull request, @shivamgcodes! I would like to suggest iterating on the progress of this document. Other pull requests are failing due to the file not existing yet, and with every release candidate release that we've been doing, we've had to wipe out the link to this page. So, to speed up the review and the merge, I think we should trim this pull request down to the basics (i.e., like what I proposed in #966).
Please refer initially to https://github.com/etcd-io/etcd/blob/main/CHANGELOG/CHANGELOG-3.6.md#deprecations (and etcd-io/etcd#19492). Thanks again :) |
Sorry, I'm a bit confused. Should I trim down the PR to only include the core changes as outlined in #966 and then add the deprecated flags according to the linked changelog? Or is there something else you'd like me to adjust? |
Signed-off-by: shivamgcodes <[email protected]>
Signed-off-by: Shivam Gupta [email protected] Signed-off-by: shivamgcodes <[email protected]>
Signed-off-by: Shivam Gupta [email protected] Signed-off-by: shivamgcodes <[email protected]>
Signed-off-by: Shivam Gupta [email protected] Signed-off-by: shivamgcodes <[email protected]>
Signed-off-by: Shivam Gupta [email protected] Signed-off-by: shivamgcodes <[email protected]>
ba9db9d
to
e9a377d
Compare
Signed-off-by: shivamgcodes <[email protected]>
fixed the linting issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the work on this @shivamgcodes, I think it's a great start that we can iterate on once merged to finalise the details for each section.
|
||
#### Downgrade | ||
|
||
If all members have been upgraded to v3.6, the cluster will be upgraded to v3.6, and downgrade from this completed state is **not possible**. If any single member is still v3.5, however, the cluster and its operations remains "v3.5", and it is possible from this mixed cluster state to return to using a v3.5 etcd binary on all members. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think we need to refresh this given the recent work on downgrade support. We can do this as a follow-up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing this out. I’ll look into it and follow up.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jmhbnz, shivamgcodes The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Co-authored-by: James Blair <[email protected]> Signed-off-by: shivamgcodes <[email protected]>
e8b5726
to
0dc06f7
Compare
Co-authored-by: James Blair <[email protected]> Signed-off-by: shivamgcodes <[email protected]>
a056548
to
0a0f4c9
Compare
I see the title still has "draft", please remove the "draft" if it's ready to review. Please also squash the commits.
|
Got it, I'm on it. I have exams until March 8th, so I'll need until around March 10th to complete this. |
I think that's all. I'll follow up with the |
|
||
**NOTE:** When [migrating from v2 with no v3 data](https://github.com/etcd-io/etcd/issues/9480), etcd server v3.2+ panics when etcd restores from existing snapshots but no v3 `ETCD_DATA_DIR/member/snap/db` file. This happens when the server had migrated from v2 with no previous v3 data. This also prevents accidental v3 data loss (e.g. `db` file might have been moved). etcd requires that post v3 migration can only happen with v3 data. Do not upgrade to newer v3 versions until v3.0 server contains v3 data. | ||
|
||
Highlighted breaking changes in 3.5. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be 3.6?
And this should capture the breaking changes introduced in v3.6. For example, there has been many flag migrations happened in v3.6, we need to call out that information here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could refer: #965
|
||
### Upgrade checklists | ||
|
||
**NOTE:** When [migrating from v2 with no v3 data](https://github.com/etcd-io/etcd/issues/9480), etcd server v3.2+ panics when etcd restores from existing snapshots but no v3 `ETCD_DATA_DIR/member/snap/db` file. This happens when the server had migrated from v2 with no previous v3 data. This also prevents accidental v3 data loss (e.g. `db` file might have been moved). etcd requires that post v3 migration can only happen with v3 data. Do not upgrade to newer v3 versions until v3.0 server contains v3 data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still relevant? If we feel this is still a concern, I think this could also include the migration guide here suggesting how etcd-v2 user could migrate data to etcd-v3 -- https://etcd.io/docs/v3.6/tutorials/how-to-migrate/?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
If all members have been upgraded to v3.6, the cluster will be upgraded to v3.6, and downgrade from this completed state is **not possible**. If any single member is still v3.5, however, the cluster and its operations remains "v3.5", and it is possible from this mixed cluster state to return to using a v3.5 etcd binary on all members. | ||
|
||
Please [download the snapshot backup](../../op-guide/maintenance/#snapshot-backup) to make downgrading the cluster possible even after it has been completely upgraded. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think we could make this clear as "Before upgrading your etcd cluster, please create a snapshot backup of your etcd cluster. . If you need to downgrade the cluster to 3.5 after a complete upgrade, you can use this snapshot to restore an etcd instance to its 3.5 state."
```diff | ||
-etcd-old --name s1 \ | ||
+etcd-new --name s1 \ | ||
--data-dir /tmp/etcd/s1 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-etcd-old --name ${name} \
+etcd-new --name ${name} \
--data-dir /path/to/${name}.etcd \
..
instead?
COMMENT | ||
``` | ||
|
||
#### Step 3: stop one existing etcd server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ahrtr / @siyuanfoundation -- do you think, upgrade guide could benefit by adding "If the server to be stopped is the leader, you can avoid some downtime by move-leader
to another server before stopping this server." step here as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"If the server to be stopped is the leader, you can avoid some downtime by
move-leader
to another server before stopping this server."
Yes, it's nice to have, but not mandatory. It's also better to upgrade the leader last (similar to https://github.com/ahrtr/etcd-defrag), otherwise you will need to move-leader multiple times. But again it isn't mandatory.
Created the draft doc for upgrading to etcd version 3.6 from etcd version 3.5
Did not yet put the deprecated flags (if any)
Fixes #963