Skip to content

Commit 4b28ad0

Browse files
committed
cluster: wait for ssh connectivity before check for pull-secret
During CI failure it is observe sometime following error happen when checking the pull secret present on the disk. This PR make sure that ssh connectivity is present before checking pull-secret. ``` DEBU SSH command results: err: ssh: unexpected packet in response to channel open: <nil>, output: DEBU error: Temporary error: ssh command error: ```
1 parent 3d4da0a commit 4b28ad0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/crc/cluster/cluster.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,9 @@ func (p *PullSecretMemoizer) Value() (string, error) {
447447
func WaitForPullSecretPresentOnInstanceDisk(ctx context.Context, sshRunner *ssh.Runner) error {
448448
logging.Info("Waiting until the user's pull secret is written to the instance disk...")
449449
pullSecretPresentFunc := func() error {
450+
if err := sshRunner.WaitForConnectivity(ctx, 30*time.Second); err != nil {
451+
return err
452+
}
450453
stdout, stderr, err := sshRunner.RunPrivate(fmt.Sprintf("sudo cat %s", vmPullSecretPath))
451454
if err != nil {
452455
return fmt.Errorf("failed to read %s file: %v: %s", vmPullSecretPath, err, stderr)

0 commit comments

Comments
 (0)