Skip to content

Commit 7c04a37

Browse files
authored
Rename config-store to config-dir (#14998)
1 parent 9029d02 commit 7c04a37

File tree

8 files changed

+19
-19
lines changed

8 files changed

+19
-19
lines changed

ydb/core/blobstorage/nodewarden/node_warden.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace NKikimr {
2222
NKikimrConfig::TStaticNameserviceConfig NameserviceConfig;
2323
std::optional<NKikimrConfig::TDomainsConfig> DomainsConfig;
2424
std::optional<NKikimrConfig::TSelfManagementConfig> SelfManagementConfig;
25-
TString ConfigStorePath;
25+
TString ConfigDirPath;
2626
std::optional<NKikimrBlobStorage::TYamlConfig> YamlConfig;
2727
TString StartupConfigYaml;
2828
std::optional<TString> StartupStorageYaml;

ydb/core/blobstorage/nodewarden/node_warden_impl.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ void TNodeWarden::ProcessShredStatus(ui64 cookie, ui64 generation, std::optional
633633

634634
void TNodeWarden::PersistConfig(std::optional<TString> mainYaml, ui64 mainYamlVersion, std::optional<TString> storageYaml,
635635
std::optional<ui64> storageYamlVersion) {
636-
if (!Cfg->ConfigStorePath) {
636+
if (!Cfg->ConfigDirPath) {
637637
// no storage directory specified
638638
return;
639639
} else if (auto *appData = AppData(); appData->DynamicNameserviceConfig &&
@@ -658,7 +658,7 @@ void TNodeWarden::PersistConfig(std::optional<TString> mainYaml, ui64 mainYamlVe
658658
}
659659

660660
struct TSaveContext {
661-
TString ConfigStorePath;
661+
TString ConfigDirPath;
662662
std::optional<TString> MainYaml;
663663
ui64 MainYamlVersion;
664664
std::optional<TString> StorageYaml;
@@ -669,7 +669,7 @@ void TNodeWarden::PersistConfig(std::optional<TString> mainYaml, ui64 mainYamlVe
669669
};
670670

671671
auto saveCtx = std::make_shared<TSaveContext>(TSaveContext{
672-
.ConfigStorePath = Cfg->ConfigStorePath,
672+
.ConfigDirPath = Cfg->ConfigDirPath,
673673
.MainYaml = std::move(mainYaml),
674674
.MainYamlVersion = mainYamlVersion,
675675
.StorageYaml = std::move(storageYaml),
@@ -682,16 +682,16 @@ void TNodeWarden::PersistConfig(std::optional<TString> mainYaml, ui64 mainYamlVe
682682
EnqueueSyncOp([this, saveCtx](const TActorContext&) {
683683
bool success = true;
684684
try {
685-
MakePathIfNotExist(saveCtx->ConfigStorePath.c_str());
685+
MakePathIfNotExist(saveCtx->ConfigDirPath.c_str());
686686
} catch (const yexception& e) {
687687
STLOG(PRI_ERROR, BS_NODE, NW91, "Failed to create config store path", (Error, e.what()));
688688
success = false;
689689
}
690690

691691
auto saveConfig = [&](const TString& yaml, const TString& configFileName) -> bool {
692692
try {
693-
TString tempPath = TStringBuilder() << saveCtx->ConfigStorePath << "/temp_" << configFileName;
694-
TString configPath = TStringBuilder() << saveCtx->ConfigStorePath << "/" << configFileName;
693+
TString tempPath = TStringBuilder() << saveCtx->ConfigDirPath << "/temp_" << configFileName;
694+
TString configPath = TStringBuilder() << saveCtx->ConfigDirPath << "/" << configFileName;
695695

696696
{
697697
TFileOutput tempFile(tempPath);
@@ -725,7 +725,7 @@ void TNodeWarden::PersistConfig(std::optional<TString> mainYaml, ui64 mainYamlVe
725725
}
726726

727727
if (saveCtx->DeleteStorage) {
728-
std::filesystem::remove(std::filesystem::path(saveCtx->ConfigStorePath.c_str()) / StorageConfigFileName);
728+
std::filesystem::remove(std::filesystem::path(saveCtx->ConfigDirPath.c_str()) / StorageConfigFileName);
729729
} else if (success && saveCtx->UpdateStorage) {
730730
success = saveConfig(*saveCtx->StorageYaml, StorageConfigFileName);
731731
if (success) {

ydb/core/blobstorage/nodewarden/node_warden_pipe.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ void TNodeWarden::SendRegisterNode() {
102102
}
103103
}
104104

105-
if (!Cfg->ConfigStorePath.empty() && YamlConfig) {
105+
if (!Cfg->ConfigDirPath.empty() && YamlConfig) {
106106
ev->Record.SetMainConfigVersion(YamlConfig->GetMainConfigVersion());
107107
ev->Record.SetMainConfigHash(NYaml::GetConfigHash(YamlConfig->GetMainConfig()));
108108
if (YamlConfig->HasStorageConfigVersion()) {

ydb/core/config/init/init_impl.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ struct TCommonAppOptions {
332332
TString PathToInterconnectPrivateKeyFile;
333333
TString PathToInterconnectCaFile;
334334
TString YamlConfigFile;
335-
TString ConfigStorePath;
335+
TString ConfigDirPath;
336336
bool SysLogEnabled = false;
337337
bool TcpEnabled = false;
338338
bool SuppressVersionCheck = false;
@@ -427,7 +427,7 @@ struct TCommonAppOptions {
427427
opts.AddLongOption("body", "body name (used to describe dynamic node location)")
428428
.RequiredArgument("NUM").StoreResult(&Body);
429429
opts.AddLongOption("yaml-config", "Yaml config").OptionalArgument("PATH").StoreResult(&YamlConfigFile);
430-
opts.AddLongOption("config-store", "Directory to store Yaml config").RequiredArgument("PATH").StoreResult(&ConfigStorePath);
430+
opts.AddLongOption("config-dir", "Directory to store Yaml config").RequiredArgument("PATH").StoreResult(&ConfigDirPath);
431431

432432
opts.AddLongOption("tiny-mode", "Start in a tiny mode")
433433
.NoArgument().SetFlag(&TinyMode);
@@ -1068,10 +1068,10 @@ class TInitialConfiguratorImpl
10681068
TString storageYamlConfigFile;
10691069
bool loadedFromStore = false;
10701070

1071-
if (CommonAppOptions.ConfigStorePath) {
1072-
AppConfig.SetConfigStorePath(CommonAppOptions.ConfigStorePath);
1071+
if (CommonAppOptions.ConfigDirPath) {
1072+
AppConfig.SetConfigDirPath(CommonAppOptions.ConfigDirPath);
10731073

1074-
auto dir = fs::path(CommonAppOptions.ConfigStorePath.c_str());
1074+
auto dir = fs::path(CommonAppOptions.ConfigDirPath.c_str());
10751075

10761076
if (auto path = dir / STORAGE_CONFIG_NAME; fs::is_regular_file(path)) {
10771077
storageYamlConfigFile = path.string();

ydb/core/driver_lib/run/kikimr_services_initializers.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -949,8 +949,8 @@ void TBSNodeWardenInitializer::InitializeServices(NActors::TActorSystemSetup* se
949949
nodeWardenConfig->SelfManagementConfig.emplace(Config.GetSelfManagementConfig());
950950
}
951951

952-
if (Config.HasConfigStorePath()) {
953-
nodeWardenConfig->ConfigStorePath = Config.GetConfigStorePath();
952+
if (Config.HasConfigDirPath()) {
953+
nodeWardenConfig->ConfigDirPath = Config.GetConfigDirPath();
954954
}
955955

956956
if (Config.HasStoredConfigYaml()) {

ydb/core/protos/config.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2260,7 +2260,7 @@ message TAppConfig {
22602260
optional TConfigVersion Version = 102;
22612261
repeated TLabel Labels = 103;
22622262

2263-
optional string ConfigStorePath = 104;
2263+
optional string ConfigDirPath = 104;
22642264
optional NKikimrBlobStorage.TYamlConfig StoredConfigYaml = 105;
22652265
optional string StartupConfigYaml = 107;
22662266
optional string StartupStorageYaml = 108;

ydb/tests/functional/config/test_generate_dynamic_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def test_generate_dynamic_config(self):
6565
)
6666

6767

68-
class TestGenerateDynamicConfigFromConfigStore(AbstractKiKiMRTest):
68+
class TestGenerateDynamicConfigFromConfigDir(AbstractKiKiMRTest):
6969
erasure = Erasure.BLOCK_4_2
7070

7171
@classmethod

ydb/tests/library/harness/kikimr_runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def __make_run_command(self):
134134
command.append("--suppress-version-check")
135135

136136
if self.__configurator.use_config_store:
137-
command.append("--config-store=%s" % self.__config_path)
137+
command.append("--config-dir=%s" % self.__config_path)
138138
else:
139139
command.append("--yaml-config=%s" % os.path.join(self.__config_path, "config.yaml"))
140140

0 commit comments

Comments
 (0)