From 5c554d3fba5bf090bdd25fd573daf06d82e05f16 Mon Sep 17 00:00:00 2001 From: Mneme Nolting Date: Tue, 30 Jan 2024 13:51:56 -0500 Subject: [PATCH 1/2] [IA-4804] Turn on verbose logging for gcloud compute ssh in SSH.scala --- .../org/broadinstitute/dsde/workbench/leonardo/SSH.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/automation/src/test/scala/org/broadinstitute/dsde/workbench/leonardo/SSH.scala b/automation/src/test/scala/org/broadinstitute/dsde/workbench/leonardo/SSH.scala index 60e10f23612..16ec586e9c0 100644 --- a/automation/src/test/scala/org/broadinstitute/dsde/workbench/leonardo/SSH.scala +++ b/automation/src/test/scala/org/broadinstitute/dsde/workbench/leonardo/SSH.scala @@ -144,7 +144,7 @@ object SSH { // This method is the main one for any interaction with GCP VMs def executeGoogleCommand(project: GoogleProject, zone: String, runtimeName: RuntimeName, cmd: String): IO[String] = { val dummyCommand = - s"gcloud compute ssh --zone '${zone}' '${LeonardoConfig.GCS.leonardoServiceAccountUsername}@${runtimeName.asString}' --project '${project.value}' --tunnel-through-iap -q --command=\"ls\" -- -tt" + s"gcloud compute ssh --zone '${zone}' --ssh-flag='-vvv' '${LeonardoConfig.GCS.leonardoServiceAccountUsername}@${runtimeName.asString}' --project '${project.value}' --tunnel-through-iap -q --command=\"ls\" -- -tt" // This command is a bit special. // It needs to go through 4 layers of interpolation: @@ -157,7 +157,7 @@ object SSH { // For example, to use command with echo that is executed in bash at layer 3 with quotes that persist into layer 4 `sudo docker exec -it jupyter-server bash -c "echo \\\"this should save\\\" > /home/jupyter/test.txt"` val sshCommand = s""" - gcloud compute ssh --zone '${zone}' '${LeonardoConfig.GCS.leonardoServiceAccountUsername}@${runtimeName.asString}' --project '${project.value}' --tunnel-through-iap -q --verbosity=error --command='$cmd' -- -tt + gcloud compute ssh --zone '${zone}' --ssh-flag='-vvv' '${LeonardoConfig.GCS.leonardoServiceAccountUsername}@${runtimeName.asString}' --project '${project.value}' --tunnel-through-iap -q --verbosity=error --command='$cmd' -- -tt """ val outWriter = new StringBuilder From bf7e1187c28a924aa919ca0ba1c3e9ad789563a1 Mon Sep 17 00:00:00 2001 From: Justin Canas Date: Thu, 1 Feb 2024 11:05:46 -0800 Subject: [PATCH 2/2] Update SSH.scala add troubleshoot --- .../scala/org/broadinstitute/dsde/workbench/leonardo/SSH.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automation/src/test/scala/org/broadinstitute/dsde/workbench/leonardo/SSH.scala b/automation/src/test/scala/org/broadinstitute/dsde/workbench/leonardo/SSH.scala index 16ec586e9c0..d49a4ff56ee 100644 --- a/automation/src/test/scala/org/broadinstitute/dsde/workbench/leonardo/SSH.scala +++ b/automation/src/test/scala/org/broadinstitute/dsde/workbench/leonardo/SSH.scala @@ -144,7 +144,7 @@ object SSH { // This method is the main one for any interaction with GCP VMs def executeGoogleCommand(project: GoogleProject, zone: String, runtimeName: RuntimeName, cmd: String): IO[String] = { val dummyCommand = - s"gcloud compute ssh --zone '${zone}' --ssh-flag='-vvv' '${LeonardoConfig.GCS.leonardoServiceAccountUsername}@${runtimeName.asString}' --project '${project.value}' --tunnel-through-iap -q --command=\"ls\" -- -tt" + s"gcloud compute ssh --zone '${zone}' --ssh-flag='-vvv' --troubleshoot '${LeonardoConfig.GCS.leonardoServiceAccountUsername}@${runtimeName.asString}' --project '${project.value}' --tunnel-through-iap -q --command=\"ls\" -- -tt" // This command is a bit special. // It needs to go through 4 layers of interpolation: