Skip to content

Commit 2e6dbaa

Browse files
committed
Added cmdline option to pass a authentication key for Mercury configuration to provdb_admin. This is part of work to resolve VNI issues when running with cxi transport on Frontier.
1 parent 723b378 commit 2e6dbaa

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

app/provdb_admin.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,15 @@ struct ProvdbArgs{
141141
bool db_in_mem; //database is in-memory not written to disk, for testing
142142
std::string db_base_config;
143143
std::string db_margo_config;
144-
144+
std::string db_mercury_auth_key;
145+
145146
bool db_use_aggregator; /**< Use the aggregator backend*/
146147
int db_batch_size; /**< Batch size for "aggregator" backend*/
147148

148149
bool db_bypass_unqlite;
149150

150151
ProvdbArgs(): engine("ofi+tcp"), autoshutdown(true), server_instance(0), ninstances(1), nshards(1), db_type("unqlite"), db_commit_freq(10000), db_write_dir("."), db_in_mem(false), db_base_config(""), db_margo_config(""),
151-
db_use_aggregator(false), db_batch_size(64), db_bypass_unqlite(true){}
152+
db_use_aggregator(false), db_batch_size(64), db_bypass_unqlite(true), db_mercury_auth_key(""){}
152153
};
153154

154155

@@ -176,6 +177,7 @@ int main(int argc, char** argv) {
176177
addOptionalCommandLineArg(parser, db_in_mem, "Use an in-memory database rather than writing to disk (*unqlite backend only*) (default false)");
177178
addOptionalCommandLineArg(parser, db_base_config, "Provide the *absolute path* to a JSON file to use as the base configuration of the Sonata databases. The database path will be appended automatically (default \"\" - not used)");
178179
addOptionalCommandLineArg(parser, db_margo_config, "Provide the *absolute path* to a JSON file containing the Margo configuration (default \"\" - not used)");
180+
addOptionalCommandLineArg(parser, db_mercury_auth_key, "Provide an authentication key for the Mercury configuration (default \"\" - not used)");
179181
addOptionalCommandLineArg(parser, db_use_aggregator, "Use the \"aggregator\" backend layer (default false)");
180182
addOptionalCommandLineArg(parser, db_batch_size, "Provide the batch size for the \"aggregator\" backend if in use (default 64)");
181183
addOptionalCommandLineArg(parser, db_bypass_unqlite, "Use Sonata's bypass method for faster unqlite stores (default true)");
@@ -244,7 +246,12 @@ int main(int argc, char** argv) {
244246

245247
free(config); //yuck c-strings
246248
margo_finalize(margo_id);
247-
249+
250+
//Apply auth_key if provided
251+
if(args.db_mercury_auth_key.size()){
252+
config_j["mercury"]["auth_key"] = args.db_mercury_auth_key;
253+
}
254+
248255
//Initial number of pools should be 1: the primary pool
249256
assert(config_j["argobots"]["pools"].size() == 1);
250257

0 commit comments

Comments
 (0)