Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
hallyn committed Sep 30, 2023
1 parent 4cc8661 commit 9e4629b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pkg/provider/kvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,14 @@ func (m KVMMachine) RunInstall() error {

fmt.Printf("Starting %q for install\n", m.Name)
if err := m.Start(); err != nil {
return errors.Wrapf(err, "Failed starting %q to provision", m.Name)
return errors.Wrapf(err, "Failed starting %q to install", m.Name)
}

fmt.Printf("Waiting for %q to start for install\n", m.Name)
if err := m.waitForState(RUNNING); err != nil {
return errors.Wrapf(err, "Error waiting for provisioning to begin")
fmt.Println("failed waiting for install. Check it out!")
time.Sleep(time.Hour)
return errors.Wrapf(err, "Error waiting for install to begin")
}

home, err := os.UserHomeDir()
Expand All @@ -268,7 +270,7 @@ func (m KVMMachine) RunInstall() error {
}

if err := m.waitForState(STOPPED); err != nil {
return errors.Wrapf(err, "Machine did not shut down after provision")
return errors.Wrapf(err, "Machine did not shut down after install")
}

if err := m.updateForBoot(); err != nil {
Expand Down Expand Up @@ -308,6 +310,7 @@ func (m KVMMachine) state(desired string) bool {
return false
}

fmt.Printf("Waiting for %q, output is %q\n", desired, output)
return strings.Contains(string(output), desired)
}

Expand Down

0 comments on commit 9e4629b

Please sign in to comment.