Skip to content
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

[Disk Manager] use word 'ydb' instead of 'kikimr' #138

Merged
merged 1 commit into from
Jan 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func setupEnvironment(

endpoint := fmt.Sprintf(
"localhost:%v",
os.Getenv("DISK_MANAGER_RECIPE_KIKIMR_PORT"),
os.Getenv("DISK_MANAGER_RECIPE_YDB_PORT"),
)
database := "/Root"
rootPath := "disk_manager"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GO_TEST_FOR(cloud/disk_manager/internal/pkg/dataplane/snapshot/storage/chunks)

SET(RECIPE_ARGS --kikimr-only)
SET(RECIPE_ARGS --ydb-only)
INCLUDE(${ARCADIA_ROOT}/cloud/disk_manager/test/recipe/recipe.inc)

SIZE(MEDIUM)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ func updateYDBBlobChecksum(f *fixture, chunkID string, checksum uint32) {
func newYDB(ctx context.Context) (*persistence.YDBClient, error) {
endpoint := fmt.Sprintf(
"localhost:%v",
os.Getenv("DISK_MANAGER_RECIPE_KIKIMR_PORT"),
os.Getenv("DISK_MANAGER_RECIPE_YDB_PORT"),
)
database := "/Root"
rootPath := "disk_manager"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GO_TEST_FOR(cloud/disk_manager/internal/pkg/dataplane/snapshot/storage)

SET(RECIPE_ARGS --kikimr-only)
SET(RECIPE_ARGS --ydb-only)
INCLUDE(${ARCADIA_ROOT}/cloud/disk_manager/test/recipe/recipe.inc)

IF (RACE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ func fillDisk(
func newYDB(ctx context.Context) (*persistence.YDBClient, error) {
endpoint := fmt.Sprintf(
"localhost:%v",
os.Getenv("DISK_MANAGER_RECIPE_KIKIMR_PORT"),
os.Getenv("DISK_MANAGER_RECIPE_YDB_PORT"),
)
database := "/Root"
connectionTimeout := "10s"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ func CreateImage(
func newYDB(ctx context.Context) (*persistence.YDBClient, error) {
endpoint := fmt.Sprintf(
"localhost:%v",
os.Getenv("DISK_MANAGER_RECIPE_KIKIMR_PORT"),
os.Getenv("DISK_MANAGER_RECIPE_YDB_PORT"),
)

// Should be in sync with settings from PersistenceConfig in test recipe.
Expand Down
2 changes: 1 addition & 1 deletion cloud/disk_manager/internal/pkg/resources/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func newContext() context.Context {
func newYDB(ctx context.Context) (*persistence.YDBClient, error) {
endpoint := fmt.Sprintf(
"localhost:%v",
os.Getenv("DISK_MANAGER_RECIPE_KIKIMR_PORT"),
os.Getenv("DISK_MANAGER_RECIPE_YDB_PORT"),
)
database := "/Root"
rootPath := "disk_manager"
Expand Down
2 changes: 1 addition & 1 deletion cloud/disk_manager/internal/pkg/resources/tests/ya.make
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GO_TEST_FOR(cloud/disk_manager/internal/pkg/resources)

SET_APPEND(RECIPE_ARGS --kikimr-only)
SET_APPEND(RECIPE_ARGS --ydb-only)
INCLUDE(${ARCADIA_ROOT}/cloud/disk_manager/test/recipe/recipe.inc)

IF (RACE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func newContext() context.Context {
func newYDB(ctx context.Context) (*persistence.YDBClient, error) {
endpoint := fmt.Sprintf(
"localhost:%v",
os.Getenv("DISK_MANAGER_RECIPE_KIKIMR_PORT"),
os.Getenv("DISK_MANAGER_RECIPE_YDB_PORT"),
)
database := "/Root"
rootPath := "disk_manager"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GO_TEST_FOR(cloud/disk_manager/internal/pkg/services/pools/storage)

SET(RECIPE_ARGS --kikimr-only)
SET(RECIPE_ARGS --ydb-only)
INCLUDE(${ARCADIA_ROOT}/cloud/disk_manager/test/recipe/recipe.inc)

IF (RACE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def start(argv):
for i in range(0, NODES_COUNT):
nodes.append(NodeLauncher(
"localhost{}".format(i),
os.getenv("DISK_MANAGER_RECIPE_KIKIMR_PORT"),
os.getenv("DISK_MANAGER_RECIPE_YDB_PORT"),
i
))
nodes[-1].start()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GO_TEST()

SET(RECIPE_ARGS --kikimr-only)
SET(RECIPE_ARGS --ydb-only)
INCLUDE(${ARCADIA_ROOT}/cloud/disk_manager/test/recipe/recipe.inc)

INCLUDE(${ARCADIA_ROOT}/cloud/disk_manager/internal/pkg/tasks/acceptance_tests/recipe/recipe.inc)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GO_TEST_FOR(cloud/disk_manager/internal/pkg/tasks/persistence)

SET(RECIPE_ARGS --kikimr-only)
SET(RECIPE_ARGS --ydb-only)
INCLUDE(${ARCADIA_ROOT}/cloud/disk_manager/test/recipe/recipe.inc)

SIZE(MEDIUM)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func newContext() context.Context {
func newYDB(ctx context.Context) (*YDBClient, error) {
endpoint := fmt.Sprintf(
"localhost:%v",
os.Getenv("DISK_MANAGER_RECIPE_KIKIMR_PORT"),
os.Getenv("DISK_MANAGER_RECIPE_YDB_PORT"),
)
database := "/Root"
rootPath := "disk_manager"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func newContext() context.Context {
func newYDB(ctx context.Context) (*persistence.YDBClient, error) {
endpoint := fmt.Sprintf(
"localhost:%v",
os.Getenv("DISK_MANAGER_RECIPE_KIKIMR_PORT"),
os.Getenv("DISK_MANAGER_RECIPE_YDB_PORT"),
)
database := "/Root"
rootPath := "disk_manager"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GO_TEST_FOR(cloud/disk_manager/internal/pkg/tasks/storage)

SET_APPEND(RECIPE_ARGS --kikimr-only)
SET_APPEND(RECIPE_ARGS --ydb-only)
INCLUDE(${ARCADIA_ROOT}/cloud/disk_manager/test/recipe/recipe.inc)

IF (RACE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func newContext() context.Context {
func newYDB(ctx context.Context) (*persistence.YDBClient, error) {
endpoint := fmt.Sprintf(
"localhost:%v",
os.Getenv("DISK_MANAGER_RECIPE_KIKIMR_PORT"),
os.Getenv("DISK_MANAGER_RECIPE_YDB_PORT"),
)
database := "/Root"
rootPath := "disk_manager"
Expand Down
2 changes: 1 addition & 1 deletion cloud/disk_manager/internal/pkg/tasks/tasks_tests/ya.make
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GO_TEST()

SET(RECIPE_ARGS --kikimr-only)
SET(RECIPE_ARGS --ydb-only)
INCLUDE(${ARCADIA_ROOT}/cloud/disk_manager/test/recipe/recipe.inc)

GO_XTEST_SRCS(
Expand Down
64 changes: 32 additions & 32 deletions cloud/disk_manager/test/recipe/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

from cloud.disk_manager.test.recipe.compute_launcher import ComputeLauncher
from cloud.disk_manager.test.recipe.disk_manager_launcher import DiskManagerLauncher
from cloud.disk_manager.test.recipe.kikimr_launcher import KikimrLauncher
from cloud.disk_manager.test.recipe.kms_launcher import KmsLauncher
from cloud.disk_manager.test.recipe.metadata_service_launcher import MetadataServiceLauncher
from cloud.disk_manager.test.recipe.nbs_launcher import NbsLauncher
from cloud.disk_manager.test.recipe.nfs_launcher import NfsLauncher
from cloud.disk_manager.test.recipe.s3_launcher import S3Launcher
from cloud.disk_manager.test.recipe.ydb_launcher import YDBLauncher

S3_CREDENTIALS_FILE = """
{
Expand All @@ -26,7 +26,7 @@ def parse_args(args):
parser = argparse.ArgumentParser()
parser.add_argument("--certs-only", action=argparse.BooleanOptionalAction)
parser.add_argument("--nemesis", action=argparse.BooleanOptionalAction)
parser.add_argument("--kikimr-only", action=argparse.BooleanOptionalAction)
parser.add_argument("--ydb-only", action=argparse.BooleanOptionalAction)
parser.add_argument("--encryption", action=argparse.BooleanOptionalAction)
parser.add_argument("--multiple-nbs", action=argparse.BooleanOptionalAction)
parser.add_argument("--nbs-only", action=argparse.BooleanOptionalAction)
Expand Down Expand Up @@ -59,16 +59,16 @@ def start(argv):
s3.start()
set_env("DISK_MANAGER_RECIPE_S3_PORT", str(s3.port))

kikimr_binary_path = yatest_common.binary_path("contrib/ydb/apps/ydbd/ydbd")
ydb_binary_path = yatest_common.binary_path("contrib/ydb/apps/ydbd/ydbd")
nbs_binary_path = yatest_common.binary_path("cloud/blockstore/apps/server/nbsd")
nfs_binary_path = yatest_common.binary_path("cloud/filestore/apps/server/filestore-server")
disk_manager_binary_path = yatest_common.binary_path(args.disk_manager_binary_path)

kikimr = KikimrLauncher(kikimr_binary_path=kikimr_binary_path)
kikimr.start()
set_env("DISK_MANAGER_RECIPE_KIKIMR_PORT", str(kikimr.port))
ydb = YDBLauncher(ydb_binary_path=ydb_binary_path)
ydb.start()
set_env("DISK_MANAGER_RECIPE_YDB_PORT", str(ydb.port))

if args.kikimr_only:
if args.ydb_only:
return

compute_port = 0,
Expand All @@ -84,51 +84,51 @@ def start(argv):
kms_port = kms.port

nbs = NbsLauncher(
kikimr.port,
kikimr.domains_txt,
kikimr.dynamic_storage_pools,
ydb.port,
ydb.domains_txt,
ydb.dynamic_storage_pools,
root_certs_file,
cert_file,
cert_key_file,
kikimr_binary_path=kikimr_binary_path,
ydb_binary_path=ydb_binary_path,
nbs_binary_path=nbs_binary_path,
kikimr_client=kikimr.client,
ydb_client=ydb.client,
compute_port=compute_port,
kms_port=kms_port)
nbs.start()
set_env("DISK_MANAGER_RECIPE_NBS_PORT", str(nbs.port))

if args.multiple_nbs:
kikimr2 = KikimrLauncher(kikimr_binary_path=kikimr_binary_path)
kikimr2.start()
ydb2 = YDBLauncher(ydb_binary_path=ydb_binary_path)
ydb2.start()

nbs2 = NbsLauncher(
kikimr2.port,
kikimr2.domains_txt,
kikimr2.dynamic_storage_pools,
ydb2.port,
ydb2.domains_txt,
ydb2.dynamic_storage_pools,
root_certs_file,
cert_file,
cert_key_file,
kikimr_binary_path=kikimr_binary_path,
ydb_binary_path=ydb_binary_path,
nbs_binary_path=nbs_binary_path,
kikimr_client=kikimr2.client,
ydb_client=ydb2.client,
compute_port=compute_port,
kms_port=kms_port)
nbs2.start()

kikimr3 = KikimrLauncher(kikimr_binary_path=kikimr_binary_path)
kikimr3.start()
ydb3 = YDBLauncher(ydb_binary_path=ydb_binary_path)
ydb3.start()

nbs3 = NbsLauncher(
kikimr3.port,
kikimr3.domains_txt,
kikimr3.dynamic_storage_pools,
ydb3.port,
ydb3.domains_txt,
ydb3.dynamic_storage_pools,
root_certs_file,
cert_file,
cert_key_file,
kikimr_binary_path=kikimr_binary_path,
ydb_binary_path=ydb_binary_path,
nbs_binary_path=nbs_binary_path,
kikimr_client=kikimr3.client,
ydb_client=ydb3.client,
compute_port=compute_port,
kms_port=kms_port)
nbs3.start()
Expand All @@ -142,9 +142,9 @@ def start(argv):
return

nfs = NfsLauncher(
kikimr_port=kikimr.port,
domains_txt=kikimr.domains_txt,
names_txt=kikimr.names_txt,
ydb_port=ydb.port,
domains_txt=ydb.domains_txt,
names_txt=ydb.names_txt,
nfs_binary_path=nfs_binary_path)
nfs.start()
set_env("DISK_MANAGER_RECIPE_NFS_PORT", str(nfs.port))
Expand Down Expand Up @@ -173,7 +173,7 @@ def start(argv):
idx = len(disk_managers)
disk_manager = DiskManagerLauncher(
hostname="localhost{}".format(idx),
kikimr_port=kikimr.port,
ydb_port=ydb.port,
nbs_port=nbs.port,
nbs2_port=nbs2.port,
nbs3_port=nbs3.port,
Expand All @@ -196,7 +196,7 @@ def start(argv):
idx = len(disk_managers)
disk_manager = DiskManagerLauncher(
hostname="localhost{}".format(idx),
kikimr_port=kikimr.port,
ydb_port=ydb.port,
nbs_port=nbs.port,
nbs2_port=nbs2.port,
nbs3_port=nbs3.port,
Expand Down Expand Up @@ -224,7 +224,7 @@ def stop(argv):
NbsLauncher.stop()
KmsLauncher.stop()
ComputeLauncher.stop()
KikimrLauncher.stop()
YDBLauncher.stop()
S3Launcher.stop()


Expand Down
12 changes: 6 additions & 6 deletions cloud/disk_manager/test/recipe/disk_manager_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
FolderId: "DiskManagerFolderId"
>
PersistenceConfig: <
Endpoint: "localhost:{kikimr_port}"
Endpoint: "localhost:{ydb_port}"
Database: "/Root"
RootPath: "disk_manager/recipe"
>
Expand Down Expand Up @@ -254,15 +254,15 @@
MetadataUrl: "{metadata_url}"
>
PersistenceConfig: <
Endpoint: "localhost:{kikimr_port}"
Endpoint: "localhost:{ydb_port}"
Database: "/Root"
RootPath: "disk_manager/recipe"
>
DataplaneConfig: <
SnapshotConfig: <
LegacyStorageFolder: "legacy_snapshot"
PersistenceConfig: <
Endpoint: "localhost:{kikimr_port}"
Endpoint: "localhost:{ydb_port}"
Database: "/Root"
S3Config: <
Endpoint: "http://localhost:{s3_port}"
Expand Down Expand Up @@ -321,7 +321,7 @@ class DiskManagerLauncher:
def __init__(
self,
hostname,
kikimr_port,
ydb_port,
nbs_port,
nbs2_port,
nbs3_port,
Expand Down Expand Up @@ -374,7 +374,7 @@ def __init__(
monitoring_port=self.__monitoring_port,
restarts_count_file=self.__restarts_count_file,
metadata_url=metadata_url,
kikimr_port=kikimr_port,
ydb_port=ydb_port,
s3_port=s3_port,
s3_credentials_file=s3_credentials_file
))
Expand All @@ -394,7 +394,7 @@ def __init__(
restarts_count_file=self.__restarts_count_file,
metadata_url=metadata_url,
access_service_port=access_service_port,
kikimr_port=kikimr_port
ydb_port=ydb_port
)
f.write(self.__server_config)

Expand Down
Loading
Loading