diff --git a/kola/tests/misc/nfs.go b/kola/tests/misc/nfs.go index 054035c72..c136f6f92 100644 --- a/kola/tests/misc/nfs.go +++ b/kola/tests/misc/nfs.go @@ -79,8 +79,6 @@ func testNFS(c cluster.TestCluster, nfsversion int, remotePath string) { c.Fatalf("Cluster.NewMachine: %s", err) } - defer m1.Destroy() - c.Log("NFS server booted.") /* poke a file in /tmp */ @@ -126,8 +124,6 @@ systemd: c.Fatalf("Cluster.NewMachine: %s", err) } - defer m2.Destroy() - c.Log("NFS client booted.") checkmount := func() error { diff --git a/kola/tests/misc/ntp.go b/kola/tests/misc/ntp.go index d9990e95e..df5eabc7d 100644 --- a/kola/tests/misc/ntp.go +++ b/kola/tests/misc/ntp.go @@ -47,7 +47,6 @@ func NTP(c cluster.TestCluster) { if err != nil { c.Fatalf("Cluster.NewMachine: %s", err) } - defer m.Destroy() out := c.MustSSH(m, "networkctl status eth0") if !bytes.Contains(out, []byte("NTP: 10.0.0.1")) { diff --git a/kola/tests/systemd/journald.go b/kola/tests/systemd/journald.go index b5f2b3918..765b9f381 100644 --- a/kola/tests/systemd/journald.go +++ b/kola/tests/systemd/journald.go @@ -75,7 +75,6 @@ func journalRemote(c cluster.TestCluster) { if err != nil { c.Fatalf("Cluster.NewMachine: %s", err) } - defer gateway.Destroy() // log a unique message on gatewayd machine msg := "supercalifragilisticexpialidocious" @@ -86,7 +85,6 @@ func journalRemote(c cluster.TestCluster) { if err != nil { c.Fatalf("Cluster.NewMachine: %s", err) } - defer collector.Destroy() // collect logs from gatewayd machine cmd := fmt.Sprintf("sudo systemd-run --unit systemd-journal-remote-client /usr/lib/systemd/systemd-journal-remote --url http://%s:19531", gateway.PrivateIP()) diff --git a/platform/local/dnsmasq.go b/platform/local/dnsmasq.go index 64f4d7bfb..e30fbc518 100644 --- a/platform/local/dnsmasq.go +++ b/platform/local/dnsmasq.go @@ -187,6 +187,8 @@ func NewDnsmasq() (*Dnsmasq, error) { return nil, err } + plog.Debugf("dnsmasq PID (manual cleanup needed if --remove=false): %v", dm.dnsmasq.Pid()) + var configTemplate *template.Template if plog.LevelAt(capnslog.DEBUG) { diff --git a/platform/machine/qemu/cluster.go b/platform/machine/qemu/cluster.go index 5a906aa2c..aa7f60111 100644 --- a/platform/machine/qemu/cluster.go +++ b/platform/machine/qemu/cluster.go @@ -118,7 +118,7 @@ func (qc *Cluster) NewMachineWithOptions(userdata *conf.UserData, options platfo fdnum += 1 extraFiles = append(extraFiles, tap.File) - plog.Debugf("NewMachine: %q", qmCmd) + plog.Debugf("NewMachine: %q, %q, %q", qmCmd, qm.IP(), qm.PrivateIP()) qm.qemu = qm.qc.NewCommand(qmCmd[0], qmCmd[1:]...) @@ -133,6 +133,8 @@ func (qc *Cluster) NewMachineWithOptions(userdata *conf.UserData, options platfo return nil, err } + plog.Debugf("qemu PID (manual cleanup needed if --remove=false): %v", qm.qemu.Pid()) + if err := platform.StartMachine(qm, qm.journal); err != nil { qm.Destroy() return nil, err diff --git a/platform/machine/unprivqemu/cluster.go b/platform/machine/unprivqemu/cluster.go index a87382c73..baff9c048 100644 --- a/platform/machine/unprivqemu/cluster.go +++ b/platform/machine/unprivqemu/cluster.go @@ -118,6 +118,8 @@ func (qc *Cluster) NewMachineWithOptions(userdata *conf.UserData, options platfo return nil, err } + plog.Debugf("qemu PID (manual cleanup needed if --remove=false): %v", qm.qemu.Pid()) + pid := strconv.Itoa(qm.qemu.Pid()) err = util.Retry(6, 5*time.Second, func() error { var err error @@ -131,6 +133,8 @@ func (qc *Cluster) NewMachineWithOptions(userdata *conf.UserData, options platfo return nil, err } + plog.Debugf("Localhost port for SSH connections: %q", qm.ip) + if err := platform.StartMachine(qm, qm.journal); err != nil { qm.Destroy() return nil, err