fix: accept live talos config apply
This commit is contained in:
parent
fee116b055
commit
cc52263625
|
|
@ -198,12 +198,9 @@ func copyDir(source, destination string) error {
|
|||
|
||||
func waitForTalosReboot(dir string, cfg config.Config) error {
|
||||
deadline := time.Now().Add(5 * time.Minute)
|
||||
offline := false
|
||||
for time.Now().Before(deadline) {
|
||||
output, err := utils.RunCommandQuietOutputInDir(dir, "talosctl", "get", "machinestatus", "--output=json", "--talosconfig=./clusterconfig/talosconfig", "--endpoints="+cfg.Talos.BootstrapEndpoint, "--nodes="+cfg.Talos.BootstrapNode)
|
||||
if err != nil {
|
||||
offline = true
|
||||
} else if offline && strings.Contains(string(output), `"stage": "running"`) {
|
||||
if err == nil && strings.Contains(string(output), `"stage": "running"`) {
|
||||
return nil
|
||||
}
|
||||
time.Sleep(2 * time.Second)
|
||||
|
|
|
|||
Loading…
Reference in a new issue