-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ffd6450
commit 1693e94
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# purpose | ||
|
||
Endpoint is an abstraction for interaction with existing volumes. | ||
StartEndpoint creates unix socket which is used for communication | ||
between nbs server and client to configure specified device(e.g. nbd/vhost) | ||
|
||
# grpc api | ||
|
||
Available methods: | ||
|
||
1. ListEndpoints | ||
2. StartEndpoint | ||
3. StopEndpoint | ||
4. DescribeEndpoint | ||
5. RefreshEndpoint - reconfigure device with new volume size | ||
6. KickEndpoint - implementation of this method calls StartEndpoint for existing endpoint. | ||
keyring id is used to find the endpoint. | ||
|
||
* UnixSocketPath is mandatory parameter to start new endpoint. | ||
* UnixSocketPath is used as an "endpoint id" for | ||
StopEndpoint, DescribeEndpoint, RefreshEndpoint methods | ||
|
||
[proto file](https://github.com/ydb-platform/nbs/blob/main/cloud/blockstore/public/api/protos/endpoints.proto) | ||
|
||
# restoring endpoints | ||
|
||
NBS endpoints can be persistent if Persistent flag is set in StartEndpoint. | ||
NBS server can use [file storage](https://github.com/ydb-platform/nbs/blob/main/cloud/storage/core/libs/endpoints/fs/fs_endpoints.h) or [keyring storage](https://github.com/ydb-platform/nbs/blob/main/cloud/storage/core/libs/endpoints/keyring/keyring_endpoints.h) to store information about endpoints. | ||
|
||
NBS server restores all active persistence endpoints after server restart. | ||
|
||
ListEndpoints response contains additional flag EndpointsWereRestored to specify | ||
that endpoints are restored already. | ||
|
||
# mount conflicts | ||
It is not possible to start two different Read-Write endpoints for the same volume. | ||
In this case StartEndpoint returns MOUNT_CONFLICT error. |