Skip to content

Commit a7fefc2

Browse files
authored
fix: Fix calls to stacktrace in the reverse proxy module (#2100)
## Description: A user reported a Go panic in the reverse proxy module when the reverse proxy container is missing. The reverse proxy is missing because of the lack of support for podman. ## Is this change user facing? NO ## References (if applicable): https://discord.com/channels/783719264308953108/1139207537959391232/1201943594714542171
1 parent 9320513 commit a7fefc2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/reverse_proxy_functions/create_reverse_proxy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func CreateReverseProxy(
4949
logrus.Debugf("Something failed while trying to create the reverse proxy object using container with ID '%s'. Error was:\n%s", proxyDockerContainer.GetId(), getProxyObjErr.Error())
5050
logrus.Debugf("Destroying the failing reverse proxy to create a new one...")
5151
if destroyProxyContainerErr := destroyReverseProxyWithContainerId(ctx, dockerManager, proxyDockerContainer.GetId()); destroyProxyContainerErr != nil {
52-
return nil, nil, stacktrace.Propagate(err, "an error occurred destroying the current reverse proxy that was failing to create a new one")
52+
return nil, nil, stacktrace.Propagate(destroyProxyContainerErr, "an error occurred destroying the current reverse proxy that was failing to create a new one")
5353
}
5454
logrus.Debugf("... current reverse proxy successfully destroyed, starting a new one now.")
5555
}

container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/reverse_proxy_functions/network_reverse_proxy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func ConnectReverseProxyToNetwork(ctx context.Context, dockerManager *docker_man
2525
}
2626

2727
if maybeReverseProxyObject == nil {
28-
return stacktrace.Propagate(err, "An error occurred while connecting the reverse proxy to the enclave network '%v' because no reverse proxy was found", networkId)
28+
return stacktrace.NewError("An error occurred while connecting the reverse proxy to the enclave network '%v' because no reverse proxy was found", networkId)
2929
}
3030

3131
_, found := maybeReverseProxyObject.GetEnclaveNetworksIpAddress()[networkId]
@@ -48,7 +48,7 @@ func DisconnectReverseProxyFromNetwork(ctx context.Context, dockerManager *docke
4848
}
4949

5050
if maybeReverseProxyObject == nil {
51-
return stacktrace.Propagate(err, "An error occurred while disconnecting the reverse proxy from the enclave network '%v' because no reverse proxy was found", networkId)
51+
return stacktrace.NewError("An error occurred while disconnecting the reverse proxy from the enclave network '%v' because no reverse proxy was found", networkId)
5252
}
5353

5454
_, found := maybeReverseProxyObject.GetEnclaveNetworksIpAddress()[networkId]

0 commit comments

Comments
 (0)