Skip to content

Commit 1e97ca1

Browse files
committed
start: Delay pull secret on disk check to end
In current scenario MCO is patched with user provided pull secret and just after, we check if pull secret is part of disk which takes ~1 min since MCD make that change and the report to MCO. In this PR we are delaying this pull secret check to end because instead of blocking it for ~1 min better to execute other part and at the end check if pull secret is part of disk image. With this PR (crc start time, 6 runs) ``` real 4m9.247s user 0m0.557s sys 0m0.165s real 4m0.455s user 0m0.619s sys 0m0.168s real 4m5.962s user 0m0.445s sys 0m0.154s real 3m59.594s user 0m0.661s sys 0m0.179s real 4m3.958s user 0m0.563s sys 0m0.177s real 4m28.806s user 0m0.460s sys 0m0.171s ``` Without this PR ``` real 5m7.235s user 0m0.797s sys 0m0.181s real 4m28.741s user 0m0.891s sys 0m0.195s real 6m6.815s user 0m0.747s sys 0m0.194s real 5m1.733s user 0m0.395s sys 0m0.199s real 4m30.551s user 0m0.466s sys 0m0.173s real 4m31.067s user 0m0.673s sys 0m0.183s ```
1 parent 0c5b687 commit 1e97ca1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/crc/machine/start.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -580,10 +580,6 @@ func (client *client) Start(ctx context.Context, startConfig types.StartConfig)
580580
return nil, errors.Wrap(err, "Failed to update ssh public key to machine config")
581581
}
582582

583-
if err := cluster.WaitForPullSecretPresentOnInstanceDisk(ctx, sshRunner); err != nil {
584-
return nil, errors.Wrap(err, "Failed to update pull secret on the disk")
585-
}
586-
587583
if err := cluster.UpdateUserPasswords(ctx, ocConfig, startConfig.KubeAdminPassword, startConfig.DeveloperPassword); err != nil {
588584
return nil, errors.Wrap(err, "Failed to update kubeadmin user password")
589585
}
@@ -614,6 +610,10 @@ func (client *client) Start(ctx context.Context, startConfig types.StartConfig)
614610
logging.Warnf("Cluster is not ready: %v", err)
615611
}
616612

613+
if err := cluster.WaitForPullSecretPresentOnInstanceDisk(ctx, sshRunner); err != nil {
614+
return nil, errors.Wrap(err, "Failed to update pull secret on the disk")
615+
}
616+
617617
waitForProxyPropagation(ctx, ocConfig, proxyConfig)
618618

619619
clusterConfig, err := getClusterConfig(vm.bundle)

0 commit comments

Comments
 (0)