tstest/integration/vms: fix OpenSUSE Leap 15.1 (#2038)

The OpenSUSE 15.1 image we are using (and conseqentially the only one
that is really available easily given it is EOL) has cloud-init
hardcoded to use the OpenStack metadata thingy. Other OpenSUSE Leap
images function fine with the NoCloud backend, but this one seems to
just not work with it. No bother, we can just pretend to be OpenStack.

Thanks to Okami for giving me an example OpenStack configuration seed
image.

Updates #1988

Signed-off-by: Christine Dodrill <xe@tailscale.com>
This commit is contained in:
Christine Dodrill
2021-06-03 09:29:07 -04:00
committed by GitHub
parent 4da5e79c39
commit a282819026
3 changed files with 95 additions and 6 deletions

View File

@@ -244,12 +244,18 @@ func mkSeed(t *testing.T, d Distro, sshKey, hostURL, tdir string, port int) {
}
}
run(t, tdir, "genisoimage",
args := []string{
"-output", filepath.Join(dir, "seed.iso"),
"-volid", "cidata", "-joliet", "-rock",
filepath.Join(dir, "meta-data"),
filepath.Join(dir, "user-data"),
)
}
if hackOpenSUSE151UserData(t, d, dir) {
args = append(args, filepath.Join(dir, "openstack"))
}
run(t, tdir, "genisoimage", args...)
}
// mkVM makes a KVM-accelerated virtual machine and prepares it for introduction
@@ -448,10 +454,6 @@ func TestVMIntegrationEndToEnd(t *testing.T) {
ctx, done := context.WithCancel(context.Background())
defer done()
if distro.name == "opensuse-leap-15-1" {
t.Skip("OpenSUSE Leap 15.1's cloud-init image just doesn't work for some reason, see https://github.com/tailscale/tailscale/issues/1988")
}
t.Parallel()
err := ramsem.Acquire(ctx, int64(distro.mem))