recovery: Add retries and increase timeout for SSH client creation [infra/infra : main]

0 views
Skip to first unread message

Alexandr Astrouski (Gerrit)

unread,
Jul 23, 2026, 6:36:22 AM (yesterday) Jul 23
to Chen-Jie Tsai (xWF), Otabek Kasimov, Bryan Ni, chromium...@chromium.org, infra-rev...@chromium.org
Attention needed from Bryan Ni, Chen-Jie Tsai (xWF) and Otabek Kasimov

Alexandr Astrouski added 2 comments

File go/src/infra/cros/recovery/internal/localtlw/ssh/config.go
Line 35, Patchset 1 (Latest): Timeout: 5 * time.Second,
Alexandr Astrouski . unresolved

This wouldn't be approved, need to modify that value somewhere closer to wifi/bt preipherals code.

File go/src/infra/cros/recovery/internal/localtlw/ssh/ssh_client.go
Line 214, Patchset 1 (Latest): for curAttempt := range 3 {
Alexandr Astrouski . unresolved

As you mention in proposal, pls make that 3 as sshConfig option, so it could be provided, and for wifi/bt peripherals set that value to 3 and keep default to 1.

Open in Gerrit

Related details

Attention is currently required from:
  • Bryan Ni
  • Chen-Jie Tsai (xWF)
  • Otabek Kasimov
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: infra/infra
Gerrit-Branch: main
Gerrit-Change-Id: I6988a53cf8157b2d287e07899e06c3808b9ca150
Gerrit-Change-Number: 8138319
Gerrit-PatchSet: 1
Gerrit-Owner: Chen-Jie Tsai (xWF) <cjt...@google.com>
Gerrit-Reviewer: Bryan Ni <bni...@google.com>
Gerrit-Reviewer: Otabek Kasimov <ota...@google.com>
Gerrit-CC: Alexandr Astrouski <astr...@google.com>
Gerrit-Attention: Chen-Jie Tsai (xWF) <cjt...@google.com>
Gerrit-Attention: Otabek Kasimov <ota...@google.com>
Gerrit-Attention: Bryan Ni <bni...@google.com>
Gerrit-Comment-Date: Thu, 23 Jul 2026 10:36:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Alexandr Astrouski (Gerrit)

unread,
Jul 23, 2026, 8:21:15 AM (yesterday) Jul 23
to Chen-Jie Tsai (xWF), Otabek Kasimov, Bryan Ni, chromium...@chromium.org, infra-rev...@chromium.org
Attention needed from Bryan Ni, Chen-Jie Tsai (xWF) and Otabek Kasimov

Alexandr Astrouski added 1 comment

File go/src/infra/cros/recovery/internal/localtlw/ssh/ssh_client.go
Line 228, Patchset 1 (Latest): if curAttempt < 2 {
Alexandr Astrouski . unresolved

here change 2 to be maxRetries - 1

Gerrit-Comment-Date: Thu, 23 Jul 2026 12:21:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Alexandr Astrouski (Gerrit)

unread,
Jul 23, 2026, 8:44:33 AM (24 hours ago) Jul 23
to Chen-Jie Tsai (xWF), Otabek Kasimov, Bryan Ni, chromium...@chromium.org, infra-rev...@chromium.org
Attention needed from Bryan Ni, Chen-Jie Tsai (xWF) and Otabek Kasimov

Alexandr Astrouski added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Alexandr Astrouski . resolved

To clarify that CL.
There is a comment https://buganizer.corp.google.com/issues/524118960#comment8 which shows that adding clientPool was a very good change, but we still hit that issue sometimes, so adding some retries or longer delay should completely eliminate that issue from repair jobs.

Gerrit-Comment-Date: Thu, 23 Jul 2026 12:44:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Otabek Kasimov (Gerrit)

unread,
Jul 23, 2026, 12:12:07 PM (20 hours ago) Jul 23
to Chen-Jie Tsai (xWF), Bryan Ni, Alexandr Astrouski, chromium...@chromium.org, infra-rev...@chromium.org
Attention needed from Bryan Ni and Chen-Jie Tsai (xWF)

Otabek Kasimov added 3 comments

Patchset-level comments
Otabek Kasimov . resolved

please address all Alexandr comments first.

File go/src/infra/cros/recovery/internal/localtlw/ssh/config.go
Line 35, Patchset 1 (Latest): Timeout: 5 * time.Second,
Alexandr Astrouski . unresolved

This wouldn't be approved, need to modify that value somewhere closer to wifi/bt preipherals code.

Otabek Kasimov

+1 do not change it. if we need then we have issue in the lab.

File go/src/infra/cros/recovery/internal/localtlw/ssh/ssh_client.go
Line 214, Patchset 1 (Latest): for curAttempt := range 3 {
Alexandr Astrouski . unresolved

As you mention in proposal, pls make that 3 as sshConfig option, so it could be provided, and for wifi/bt peripherals set that value to 3 and keep default to 1.

Otabek Kasimov

why we changing the core here? is there issue in the lab with client creation?

Open in Gerrit

Related details

Attention is currently required from:
  • Bryan Ni
  • Chen-Jie Tsai (xWF)
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: infra/infra
Gerrit-Branch: main
Gerrit-Change-Id: I6988a53cf8157b2d287e07899e06c3808b9ca150
Gerrit-Change-Number: 8138319
Gerrit-PatchSet: 1
Gerrit-Owner: Chen-Jie Tsai (xWF) <cjt...@google.com>
Gerrit-Reviewer: Bryan Ni <bni...@google.com>
Gerrit-Reviewer: Otabek Kasimov <ota...@google.com>
Gerrit-CC: Alexandr Astrouski <astr...@google.com>
Gerrit-Attention: Chen-Jie Tsai (xWF) <cjt...@google.com>
Gerrit-Attention: Bryan Ni <bni...@google.com>
Gerrit-Comment-Date: Thu, 23 Jul 2026 16:12:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Alexandr Astrouski <astr...@google.com>
unsatisfied_requirement
open
diffy

Alexandr Astrouski (Gerrit)

unread,
Jul 23, 2026, 12:23:00 PM (20 hours ago) Jul 23
to Chen-Jie Tsai (xWF), Otabek Kasimov, Bryan Ni, chromium...@chromium.org, infra-rev...@chromium.org
Attention needed from Bryan Ni and Chen-Jie Tsai (xWF)

Alexandr Astrouski added 1 comment

File go/src/infra/cros/recovery/internal/localtlw/ssh/ssh_client.go
Line 214, Patchset 1 (Latest): for curAttempt := range 3 {
Alexandr Astrouski . unresolved

As you mention in proposal, pls make that 3 as sshConfig option, so it could be provided, and for wifi/bt peripherals set that value to 3 and keep default to 1.

Otabek Kasimov

why we changing the core here? is there issue in the lab with client creation?

Alexandr Astrouski

I share details on why we would like to change current approach a bit. We still hit client creation from time to time (much lower rate then it was after clientPool added). Repair jobs shows that it may timeout to create client on first call, but after 2 sec it was managed to create a client, that's why it would be nice to retry couple times. To affect only wifi/bt peripherals we suggest to add that option in sshConfiguration, so we can easily control that.

Gerrit-Comment-Date: Thu, 23 Jul 2026 16:22:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Alexandr Astrouski <astr...@google.com>
Comment-In-Reply-To: Otabek Kasimov <ota...@google.com>
unsatisfied_requirement
open
diffy

Otabek Kasimov (Gerrit)

unread,
Jul 23, 2026, 12:55:09 PM (20 hours ago) Jul 23
to Chen-Jie Tsai (xWF), Bryan Ni, Alexandr Astrouski, chromium...@chromium.org, infra-rev...@chromium.org
Attention needed from Bryan Ni and Chen-Jie Tsai (xWF)

Otabek Kasimov added 1 comment

File go/src/infra/cros/recovery/internal/localtlw/ssh/ssh_client.go
Line 214, Patchset 1 (Latest): for curAttempt := range 3 {
Alexandr Astrouski . unresolved

As you mention in proposal, pls make that 3 as sshConfig option, so it could be provided, and for wifi/bt peripherals set that value to 3 and keep default to 1.

Otabek Kasimov

why we changing the core here? is there issue in the lab with client creation?

Alexandr Astrouski

I share details on why we would like to change current approach a bit. We still hit client creation from time to time (much lower rate then it was after clientPool added). Repair jobs shows that it may timeout to create client on first call, but after 2 sec it was managed to create a client, that's why it would be nice to retry couple times. To affect only wifi/bt peripherals we suggest to add that option in sshConfiguration, so we can easily control that.

Otabek Kasimov

I recommend limiting the retries to exactly one to avoid excessive attempts. Please refer to the sshpool implementation within the infra codebase for a cleaner structural approach. Let me know if you would prefer that I adjust this implementation myself.

Gerrit-Comment-Date: Thu, 23 Jul 2026 16:55:06 +0000
unsatisfied_requirement
open
diffy

Alexandr Astrouski (Gerrit)

unread,
Jul 23, 2026, 2:39:18 PM (18 hours ago) Jul 23
to Chen-Jie Tsai (xWF), Otabek Kasimov, Bryan Ni, chromium...@chromium.org, infra-rev...@chromium.org
Attention needed from Bryan Ni and Chen-Jie Tsai (xWF)

Alexandr Astrouski added 1 comment

File go/src/infra/cros/recovery/internal/localtlw/ssh/ssh_client.go
Line 214, Patchset 1 (Latest): for curAttempt := range 3 {
Alexandr Astrouski . unresolved

As you mention in proposal, pls make that 3 as sshConfig option, so it could be provided, and for wifi/bt peripherals set that value to 3 and keep default to 1.

Otabek Kasimov

why we changing the core here? is there issue in the lab with client creation?

Alexandr Astrouski

I share details on why we would like to change current approach a bit. We still hit client creation from time to time (much lower rate then it was after clientPool added). Repair jobs shows that it may timeout to create client on first call, but after 2 sec it was managed to create a client, that's why it would be nice to retry couple times. To affect only wifi/bt peripherals we suggest to add that option in sshConfiguration, so we can easily control that.

Otabek Kasimov

I recommend limiting the retries to exactly one to avoid excessive attempts. Please refer to the sshpool implementation within the infra codebase for a cleaner structural approach. Let me know if you would prefer that I adjust this implementation myself.

Alexandr Astrouski
Gerrit-Comment-Date: Thu, 23 Jul 2026 18:39:12 +0000
unsatisfied_requirement
open
diffy

Otabek Kasimov (Gerrit)

unread,
Jul 23, 2026, 2:57:26 PM (17 hours ago) Jul 23
to Chen-Jie Tsai (xWF), Bryan Ni, Alexandr Astrouski, chromium...@chromium.org, infra-rev...@chromium.org
Attention needed from Bryan Ni and Chen-Jie Tsai (xWF)

Otabek Kasimov added 1 comment

File go/src/infra/cros/recovery/internal/localtlw/ssh/ssh_client.go
Line 214, Patchset 1 (Latest): for curAttempt := range 3 {
Alexandr Astrouski . unresolved

As you mention in proposal, pls make that 3 as sshConfig option, so it could be provided, and for wifi/bt peripherals set that value to 3 and keep default to 1.

Otabek Kasimov

why we changing the core here? is there issue in the lab with client creation?

Alexandr Astrouski

I share details on why we would like to change current approach a bit. We still hit client creation from time to time (much lower rate then it was after clientPool added). Repair jobs shows that it may timeout to create client on first call, but after 2 sec it was managed to create a client, that's why it would be nice to retry couple times. To affect only wifi/bt peripherals we suggest to add that option in sshConfiguration, so we can easily control that.

Otabek Kasimov

I recommend limiting the retries to exactly one to avoid excessive attempts. Please refer to the sshpool implementation within the infra codebase for a cleaner structural approach. Let me know if you would prefer that I adjust this implementation myself.

Alexandr Astrouski

There is already a ssh with retries for proxies, why can't we have similar for regular clients? https://source.corp.google.com/h/chromium/infra/infra_superproject/+/main:infra/go/src/infra/cros/recovery/internal/localtlw/ssh/ssh_client.go;l=175

Otabek Kasimov

i am not telling we cannot not, just need to make it more explicit and clear to the reader.

Gerrit-Comment-Date: Thu, 23 Jul 2026 18:57:22 +0000
unsatisfied_requirement
open
diffy

Chen-Jie Tsai (xWF) (Gerrit)

unread,
3:58 AM (4 hours ago) 3:58 AM
to Otabek Kasimov, Bryan Ni, Alexandr Astrouski, chromium...@chromium.org, infra-rev...@chromium.org
Attention needed from Alexandr Astrouski, Bryan Ni and Otabek Kasimov

Chen-Jie Tsai (xWF) added 2 comments

File go/src/infra/cros/recovery/internal/localtlw/ssh/config.go
Line 35, Patchset 1: Timeout: 5 * time.Second,
Alexandr Astrouski . unresolved

This wouldn't be approved, need to modify that value somewhere closer to wifi/bt preipherals code.

Otabek Kasimov

+1 do not change it. if we need then we have issue in the lab.

Chen-Jie Tsai (xWF)

Updated, the timeout will be extend to 5 on router/pcap/btpeer only

File go/src/infra/cros/recovery/internal/localtlw/ssh/ssh_client.go
Line 214, Patchset 1: for curAttempt := range 3 {
Alexandr Astrouski . unresolved

As you mention in proposal, pls make that 3 as sshConfig option, so it could be provided, and for wifi/bt peripherals set that value to 3 and keep default to 1.

Otabek Kasimov

why we changing the core here? is there issue in the lab with client creation?

Alexandr Astrouski

I share details on why we would like to change current approach a bit. We still hit client creation from time to time (much lower rate then it was after clientPool added). Repair jobs shows that it may timeout to create client on first call, but after 2 sec it was managed to create a client, that's why it would be nice to retry couple times. To affect only wifi/bt peripherals we suggest to add that option in sshConfiguration, so we can easily control that.

Otabek Kasimov

I recommend limiting the retries to exactly one to avoid excessive attempts. Please refer to the sshpool implementation within the infra codebase for a cleaner structural approach. Let me know if you would prefer that I adjust this implementation myself.

Alexandr Astrouski

There is already a ssh with retries for proxies, why can't we have similar for regular clients? https://source.corp.google.com/h/chromium/infra/infra_superproject/+/main:infra/go/src/infra/cros/recovery/internal/localtlw/ssh/ssh_client.go;l=175

Otabek Kasimov

i am not telling we cannot not, just need to make it more explicit and clear to the reader.

Chen-Jie Tsai (xWF)

ConnectionAttempts only for wifi/bt peripherals

Open in Gerrit

Related details

Attention is currently required from:
  • Alexandr Astrouski
  • Bryan Ni
  • Otabek Kasimov
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: infra/infra
Gerrit-Branch: main
Gerrit-Change-Id: I6988a53cf8157b2d287e07899e06c3808b9ca150
Gerrit-Change-Number: 8138319
Gerrit-PatchSet: 1
Gerrit-Owner: Chen-Jie Tsai (xWF) <cjt...@google.com>
Gerrit-Reviewer: Bryan Ni <bni...@google.com>
Gerrit-Reviewer: Otabek Kasimov <ota...@google.com>
Gerrit-CC: Alexandr Astrouski <astr...@google.com>
Gerrit-Attention: Alexandr Astrouski <astr...@google.com>
Gerrit-Attention: Otabek Kasimov <ota...@google.com>
Gerrit-Attention: Bryan Ni <bni...@google.com>
Gerrit-Comment-Date: Fri, 24 Jul 2026 07:58:02 +0000
unsatisfied_requirement
open
diffy

Alexandr Astrouski (Gerrit)

unread,
5:11 AM (3 hours ago) 5:11 AM
to Chen-Jie Tsai (xWF), Otabek Kasimov, Bryan Ni, chromium...@chromium.org, infra-rev...@chromium.org
Attention needed from Bryan Ni, Chen-Jie Tsai (xWF) and Otabek Kasimov

Alexandr Astrouski added 1 comment

File go/src/infra/cros/recovery/internal/localtlw/ssh/config.go
Line 419, Patchset 2 (Latest): peripheralSSHConfig := `
Alexandr Astrouski . unresolved

this wouldn't be approved, pls update Config creation somewhere closer too wifi/btpeers execs.

Open in Gerrit

Related details

Attention is currently required from:
  • Bryan Ni
  • Chen-Jie Tsai (xWF)
  • Otabek Kasimov
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: infra/infra
Gerrit-Branch: main
Gerrit-Change-Id: I6988a53cf8157b2d287e07899e06c3808b9ca150
Gerrit-Change-Number: 8138319
Gerrit-PatchSet: 2
Gerrit-Owner: Chen-Jie Tsai (xWF) <cjt...@google.com>
Gerrit-Reviewer: Bryan Ni <bni...@google.com>
Gerrit-Reviewer: Otabek Kasimov <ota...@google.com>
Gerrit-CC: Alexandr Astrouski <astr...@google.com>
Gerrit-Attention: Chen-Jie Tsai (xWF) <cjt...@google.com>
Gerrit-Attention: Otabek Kasimov <ota...@google.com>
Gerrit-Attention: Bryan Ni <bni...@google.com>
Gerrit-Comment-Date: Fri, 24 Jul 2026 09:11:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages