Skip to content

Commit

Permalink
fix: fix nil pointer error when getting reverse proxy from the cluster (
Browse files Browse the repository at this point in the history
#1980)

## Description:
fix nil pointer error when getting reverse proxy from the cluster it's
happening when the reverse proxy container is not present

## Is this change user facing?
YES

## References (if applicable):
<!-- Add relevant Github Issues, Discord threads, or other helpful
information. -->
  • Loading branch information
leoporoli committed Dec 19, 2023
1 parent 5f29a12 commit f20c290
Showing 1 changed file with 7 additions and 3 deletions.
Expand Up @@ -240,13 +240,17 @@ func getDockerKurtosisBackend(
return nil, stacktrace.Propagate(err, "An error occurred while getting the logs collector object for enclave '%v'; This is a bug in Kurtosis", enclaveUuid)
}

reverseProxy, err := reverse_proxy_functions.GetReverseProxy(ctx, dockerManager)
maybeReverseProxy, err := reverse_proxy_functions.GetReverseProxy(ctx, dockerManager)
if err != nil {
return nil, stacktrace.Propagate(err, "An error occurred while getting the reverse proxy, This is a bug in Kurtosis")
}
reverseProxyEnclaveNetworkIpAddress, found := reverseProxy.GetEnclaveNetworksIpAddress()[network.GetId()]
if maybeReverseProxy == nil {
return nil, stacktrace.Propagate(err, "The reverse proxy is not running, This is a bug in Kurtosis")
}

reverseProxyEnclaveNetworkIpAddress, found := maybeReverseProxy.GetEnclaveNetworksIpAddress()[network.GetId()]
if !found {
return nil, stacktrace.NewError("An error occured while getting the reverse proxy enclave network IP address for enclave '%v', This is a bug in Kurtosis", enclaveUuid)
return nil, stacktrace.NewError("An error occurred while getting the reverse proxy enclave network IP address for enclave '%v', This is a bug in Kurtosis", enclaveUuid)
}

alreadyTakenIps := map[string]bool{
Expand Down

0 comments on commit f20c290

Please sign in to comment.