-
Notifications
You must be signed in to change notification settings - Fork 324
Revise https://etcd.io/docs/v3.5/tutorials/how-to-create-locks/ #985
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
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ronaldngounou The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @ronaldngounou. 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. |
cc. @etcd-io/maintainers-website Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Add section Embedding etcd in a Go Application Signed-off-by: Ronald Ngounou <[email protected]> Fix markdown lint errors Signed-off-by: Ronald Ngounou <[email protected]> rewrite Quickstart for local etcd setup Signed-off-by: Ronald Ngounou <[email protected]> Fix quickstart page to respect markdownlint normalization rules Signed-off-by: Ronald Ngounou <[email protected]> Add package json to gitignore Signed-off-by: Ronald Ngounou <[email protected]> Fix lint error related to website references Signed-off-by: Ronald Ngounou <[email protected]> Fix lint error: files should end with a single line character Signed-off-by: Ronald Ngounou <[email protected]> issue980 Revise the Whats next section to focus on two separate paths Signed-off-by: Ronald Ngounou <[email protected]>
Signed-off-by: Ronald Ngounou <[email protected]>
a1639e4
to
f4d25d7
Compare
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 the only file in this PR.
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.
Great start! Here's what needs to happen next:
- Remove all the extraneous files from the PR
- Base it on revising 3.6 docs, and backport to 3.5
- Add information about unlocking
Here's a great blog post which gives more information on lock/unlock via the Go libraries: https://hemaks.org/posts/building-a-distributed-lock-system-with-go-and-etcd-a-step-by-step-guide/
@@ -1,16 +1,67 @@ | |||
--- | |||
title: How to create locks | |||
description: Guide to creating distributed locks in etcd | |||
description: |
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.
Why no description?
|
||
## Releasing a lock | ||
|
||
When using the `etcdctl lock` command, the lock is released as soon as the command completes. |
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.
Not correct. If the client doesn't die, then the lock needs to be explicitly released with an unlock command. You'll want to cover the unlock operation here as well.
@ronaldngounou I'm just curious, if we put this tutorial under https://etcd.io/docs/v3.5/tutorials/how-to-create-locks/, will it auto update for https://etcd.io/docs/v3.6/tutorials/how-to-create-locks/ as well? (cause the latest release is v3.6 so I just thought should we keep the tutorial for latest release updated rather than the old one?) |
Yes it should be under v3.6 |
This PR introduces a guide on how to use etcdctl for distributed locking. This PR contributes to isssue #794.
It covers:
etcdctl
installed.Test
npm run serve
etcdctl lock
commands on a virtual machine