Skip to content

Commit

Permalink
issue-463: start nbd-endpoint with any connected nbd-device
Browse files Browse the repository at this point in the history
  • Loading branch information
sanek325 committed Mar 19, 2024
1 parent ad0d642 commit fd74c64
Show file tree
Hide file tree
Showing 9 changed files with 894 additions and 231 deletions.
10 changes: 8 additions & 2 deletions cloud/blockstore/libs/daemon/common/bootstrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <cloud/blockstore/libs/endpoints_spdk/spdk_server.h>
#include <cloud/blockstore/libs/endpoints_vhost/external_vhost_server.h>
#include <cloud/blockstore/libs/endpoints_vhost/vhost_server.h>
#include <cloud/blockstore/libs/nbd/device.h>
#include <cloud/blockstore/libs/nbd/server.h>
#include <cloud/blockstore/libs/nvme/nvme.h>
#include <cloud/blockstore/libs/rdma/iface/client.h>
Expand Down Expand Up @@ -496,6 +497,11 @@ void TBootstrapBase::Init()
}
STORAGE_INFO("EndpointStorage initialized");

TEndpointManagerOptions endpointManagerOptions = {
.ClientConfig = Configs->EndpointConfig->GetClientConfig(),
.NbdSocketSuffix = Configs->ServerConfig->GetNbdSocketSuffix(),
};

EndpointManager = CreateEndpointManager(
Timer,
Scheduler,
Expand All @@ -508,8 +514,8 @@ void TBootstrapBase::Init()
std::move(sessionManager),
std::move(endpointStorage),
std::move(endpointListeners),
Configs->EndpointConfig->GetClientConfig(),
Configs->ServerConfig->GetNbdSocketSuffix());
NBD::CreateDeviceConnectionFactory(Logging, TDuration::Days(1)),
std::move(endpointManagerOptions));

STORAGE_INFO("EndpointManager initialized");

Expand Down
Loading

0 comments on commit fd74c64

Please sign in to comment.