Skip to content

Commit 4089bad

Browse files
authored
Fix -d /Root in ydb admin cluster dump (#16943)
1 parent eece934 commit 4089bad

File tree

4 files changed

+21
-2
lines changed

4 files changed

+21
-2
lines changed

ydb/apps/ydb/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* YDB CLI help message improvements. Different display for detailed help and brief help.
66
* Support coordination nodes in `ydb scheme rmdir --recursive`.
77
* Fixed return code of command `ydb workload * run --check-canonical` for the case when benchmark query results differ from canonical ones.
8+
* Fixed scheme error in `ydb admin cluster dump` when specifying a domain database.
89

910
## 2.20.0 ##
1011

ydb/library/backup/backup.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1474,8 +1474,12 @@ void BackupCluster(const TDriver& driver, TFsPath folderPath) {
14741474

14751475
BackupClusterRoot(driver, folderPath);
14761476
auto databases = ListDatabases(driver);
1477+
TDriverConfig dbDriverCfg = driver.GetConfig();
14771478
for (const auto& database : databases.GetPaths()) {
1478-
BackupDatabaseImpl(driver, TString(database), folderPath.Child("." + database), {
1479+
dbDriverCfg.SetDatabase(database);
1480+
TDriver dbDriver(dbDriverCfg);
1481+
1482+
BackupDatabaseImpl(dbDriver, TString(database), folderPath.Child("." + database), {
14791483
.WithRegularUsers = false,
14801484
.WithContent = false,
14811485
});

ydb/tests/functional/ydb_cli/test_ydb_backup.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1299,7 +1299,14 @@ def test_restore_no_data(self):
12991299
class BaseTestClusterBackupInFiles(object):
13001300
@classmethod
13011301
def setup_class(cls):
1302-
cls.cluster = KiKiMR(KikimrConfigGenerator(extra_feature_flags=["enable_resource_pools"]))
1302+
cls.cluster = KiKiMR(KikimrConfigGenerator(
1303+
extra_feature_flags=[
1304+
"enable_strict_acl_check",
1305+
"enable_strict_user_management",
1306+
"enable_database_admin"
1307+
],
1308+
domain_login_only=False,
1309+
))
13031310
cls.cluster.start()
13041311

13051312
cls.root_dir = "/Root"
@@ -1366,6 +1373,7 @@ def create_backup(cls, command, expected_files, additional_args=[]):
13661373
def create_cluster_backup(cls, expected_files, additional_args=[]):
13671374
cls.create_backup(
13681375
[
1376+
"--database", cls.root_dir,
13691377
"admin", "cluster", "dump",
13701378
],
13711379
expected_files,

ydb/tests/library/harness/kikimr_config.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ def __init__(
165165
enable_resource_pools=None,
166166
grouped_memory_limiter_config=None,
167167
query_service_config=None,
168+
domain_login_only=None,
168169
):
169170
if extra_feature_flags is None:
170171
extra_feature_flags = []
@@ -349,6 +350,11 @@ def __init__(
349350
if auth_config_path:
350351
self.yaml_config["auth_config"] = _load_yaml_config(auth_config_path)
351352

353+
if domain_login_only is not None:
354+
if "auth_config" not in self.yaml_config:
355+
self.yaml_config["auth_config"] = dict()
356+
self.yaml_config["auth_config"]["domain_login_only"] = domain_login_only
357+
352358
if fq_config_path:
353359
self.yaml_config["federated_query_config"] = _load_yaml_config(fq_config_path)
354360

0 commit comments

Comments
 (0)