diff --git a/fdbbackup/backup.actor.cpp b/fdbbackup/backup.actor.cpp index 6b986a510a9..a8dd6a8f4e4 100644 --- a/fdbbackup/backup.actor.cpp +++ b/fdbbackup/backup.actor.cpp @@ -4076,6 +4076,7 @@ int main(int argc, char* argv[]) { .detail("CommandLine", commandLine) .setMaxFieldLength(0) .detail("MemoryLimit", memLimit) + .detail("Proxy", proxy.orDefault("")) .trackLatest("ProgramStart"); // Ordinarily, this is done when the network is run. However, network thread should be set before TraceEvents diff --git a/fdbclient/BackupContainer.actor.cpp b/fdbclient/BackupContainer.actor.cpp index 416d15c5484..1c3a8906d9f 100644 --- a/fdbclient/BackupContainer.actor.cpp +++ b/fdbclient/BackupContainer.actor.cpp @@ -270,11 +270,20 @@ Reference IBackupContainer::openContainer(const std::string& u r = makeReference(url, encryptionKeyFileName); } else if (u.startsWith("blobstore://"_sr)) { std::string resource; + Optional blobstoreProxy; + + // If no proxy is passed down to the openContainer method, try to fallback to the + // fileBackupAgentProxy which is a global variable and will be set for the backup_agent. + if (proxy.present()) { + blobstoreProxy = proxy.get(); + } else if (fileBackupAgentProxy.present()) { + blobstoreProxy = fileBackupAgentProxy.get(); + } // The URL parameters contain blobstore endpoint tunables as well as possible backup-specific options. S3BlobStoreEndpoint::ParametersT backupParams; Reference bstore = - S3BlobStoreEndpoint::fromString(url, proxy, &resource, &lastOpenError, &backupParams); + S3BlobStoreEndpoint::fromString(url, blobstoreProxy, &resource, &lastOpenError, &backupParams); if (resource.empty()) throw backup_invalid_url(); diff --git a/fdbclient/BackupContainerFileSystem.actor.cpp b/fdbclient/BackupContainerFileSystem.actor.cpp index 634cba1c15e..1a1e1fcedbf 100644 --- a/fdbclient/BackupContainerFileSystem.actor.cpp +++ b/fdbclient/BackupContainerFileSystem.actor.cpp @@ -1516,11 +1516,20 @@ Reference BackupContainerFileSystem::openContainerFS( r = makeReference(url, encryptionKeyFileName); } else if (u.startsWith("blobstore://"_sr)) { std::string resource; + Optional blobstoreProxy; + + // If no proxy is passed down to the openContainer method, try to fallback to the + // fileBackupAgentProxy which is a global variable and will be set for the backup_agent. + if (proxy.present()) { + blobstoreProxy = proxy.get(); + } else if (fileBackupAgentProxy.present()) { + blobstoreProxy = fileBackupAgentProxy.get(); + } // The URL parameters contain blobstore endpoint tunables as well as possible backup-specific options. S3BlobStoreEndpoint::ParametersT backupParams; Reference bstore = - S3BlobStoreEndpoint::fromString(url, proxy, &resource, &lastOpenError, &backupParams); + S3BlobStoreEndpoint::fromString(url, blobstoreProxy, &resource, &lastOpenError, &backupParams); if (resource.empty()) throw backup_invalid_url(); diff --git a/fdbclient/S3BlobStore.actor.cpp b/fdbclient/S3BlobStore.actor.cpp index 446c8792f86..eec2c6f3a87 100644 --- a/fdbclient/S3BlobStore.actor.cpp +++ b/fdbclient/S3BlobStore.actor.cpp @@ -714,7 +714,8 @@ ACTOR Future connect_impl(ReferencegetPeerAddress()) - .detail("ExpiresIn", rconn.expirationTime - now()); + .detail("ExpiresIn", rconn.expirationTime - now()) + .detail("Proxy", b->proxyHost.orDefault("")); return rconn; } } @@ -747,7 +748,8 @@ ACTOR Future connect_impl(ReferencegetPeerAddress()) - .detail("ExpiresIn", b->knobs.max_connection_life); + .detail("ExpiresIn", b->knobs.max_connection_life) + .detail("Proxy", b->proxyHost.orDefault("")); if (b->lookupKey || b->lookupSecret || b->knobs.sdk_auth) wait(b->updateSecret()); @@ -960,7 +962,10 @@ ACTOR Future> doRequest_impl(Referencehost); - event.detail("Verb", verb).detail("Resource", resource).detail("ThisTry", thisTry); + event.detail("Verb", verb) + .detail("Resource", resource) + .detail("ThisTry", thisTry) + .detail("Proxy", bstore->proxyHost.orDefault("")); // If r is not valid or not code 429 then increment the try count. 429's will not count against the attempt // limit.