From 0852d0b0a4c5b289646e63b698b97e7e05ce8d81 Mon Sep 17 00:00:00 2001 From: Matt Craddock <5796417+craddm@users.noreply.github.com> Date: Mon, 18 Sep 2023 12:32:24 +0000 Subject: [PATCH 1/3] add timeout for guac postgres queries --- data_safe_haven/infrastructure/stacks/sre/remote_desktop.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data_safe_haven/infrastructure/stacks/sre/remote_desktop.py b/data_safe_haven/infrastructure/stacks/sre/remote_desktop.py index e90c2b1b9b..8d98e622df 100644 --- a/data_safe_haven/infrastructure/stacks/sre/remote_desktop.py +++ b/data_safe_haven/infrastructure/stacks/sre/remote_desktop.py @@ -290,6 +290,9 @@ def __init__( containerinstance.EnvironmentVariableArgs( name="POSTGRESQL_SSL_MODE", value="require" ), + containerinstance.EnvironmentVariableArgs( + name="POSTGRES_SOCKET_TIMEOUT", value=5 + ), containerinstance.EnvironmentVariableArgs( name="POSTGRES_USER", value=Output.concat( From 0ca6acb7a7f91cde6e3df362c3345c344faad955 Mon Sep 17 00:00:00 2001 From: Matt Craddock <5796417+craddm@users.noreply.github.com> Date: Tue, 19 Sep 2023 08:36:50 +0000 Subject: [PATCH 2/3] Use variable from documentation --- data_safe_haven/infrastructure/stacks/sre/remote_desktop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data_safe_haven/infrastructure/stacks/sre/remote_desktop.py b/data_safe_haven/infrastructure/stacks/sre/remote_desktop.py index 8d98e622df..e19bd2d4e5 100644 --- a/data_safe_haven/infrastructure/stacks/sre/remote_desktop.py +++ b/data_safe_haven/infrastructure/stacks/sre/remote_desktop.py @@ -291,7 +291,7 @@ def __init__( name="POSTGRESQL_SSL_MODE", value="require" ), containerinstance.EnvironmentVariableArgs( - name="POSTGRES_SOCKET_TIMEOUT", value=5 + name="POSTGRESQL_SOCKET_TIMEOUT", value=5 ), containerinstance.EnvironmentVariableArgs( name="POSTGRES_USER", From efe83e770675bffc6c2bbcebfa5f48cfba77cbb3 Mon Sep 17 00:00:00 2001 From: James Robinson Date: Tue, 19 Sep 2023 13:12:39 +0100 Subject: [PATCH 3/3] :bug: Use string variable instead of int --- data_safe_haven/infrastructure/stacks/sre/remote_desktop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data_safe_haven/infrastructure/stacks/sre/remote_desktop.py b/data_safe_haven/infrastructure/stacks/sre/remote_desktop.py index e19bd2d4e5..74eaa178c7 100644 --- a/data_safe_haven/infrastructure/stacks/sre/remote_desktop.py +++ b/data_safe_haven/infrastructure/stacks/sre/remote_desktop.py @@ -291,7 +291,7 @@ def __init__( name="POSTGRESQL_SSL_MODE", value="require" ), containerinstance.EnvironmentVariableArgs( - name="POSTGRESQL_SOCKET_TIMEOUT", value=5 + name="POSTGRESQL_SOCKET_TIMEOUT", value="5" ), containerinstance.EnvironmentVariableArgs( name="POSTGRES_USER",