Set the address in consistency check processes in the same way we set it for clients so that it shows up in trace logs. Disallow specifying a public address for consistency check processes.

This commit is contained in:
A.J. Beamon 2018-03-06 15:40:04 -08:00
parent 26d2c5d1c6
commit 232bd496bf
1 changed files with 10 additions and 0 deletions

View File

@ -1314,6 +1314,16 @@ int main(int argc, char* argv[]) {
flushAndExit(FDB_EXIT_ERROR);
}
if(role == ConsistencyCheck) {
if(publicAddressStr != "") {
fprintf(stderr, "ERROR: Public address cannot be specified for consistency check processes\n");
printHelpTeaser(argv[0]);
flushAndExit(FDB_EXIT_ERROR);
}
auto publicIP = determinePublicIPAutomatically(connectionFile->getConnectionString());
publicAddress = NetworkAddress(publicIP, ::getpid());
}
if (listenAddressStr == "public")
listenAddress = publicAddress;
else {