Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IA-4804] Turn on verbose logging for gcloud compute ssh in SSH.scala #4158

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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' --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:
Expand All @@ -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
Expand Down
Loading