Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Run e2e in Travis CI /w nested virt #570

Merged
merged 5 commits into from
Apr 1, 2020

Conversation

stealthybox
Copy link
Contributor

@stealthybox stealthybox commented Mar 30, 2020

kvm-ok works on ubuntu 18.04 (bionic) in Travis CI.
We can use this to add valuable E2E signal in addition to CircleCI.

The only feature I don't see Travis supporting is provider hosted artifacts.
Travis supports artifacts but requires you to bring your own S3 bucket.
CircleCI is currently hosting artifacts for our existing pipelines.

Related #392

@stealthybox
Copy link
Contributor Author

stealthybox commented Mar 30, 2020

This is getting close.
Image imports are working!

Ignite VM creation is currently failing to parse a tag? :

=== RUN   TestIgniteRunWithContainerdAndCNI
514--- FAIL: TestIgniteRunWithContainerdAndCNI (1.08s)
515    run_test.go:52: assertion failed: error is not nil: exit status 2: vm run: 
516        ["/home/travis/build/weaveworks/ignite/bin/ignite" "--runtime=containerd" "--network-plugin=cni" "run" "--name=e2e_test_ignite_run_containerd_and_cni" "weaveworks/ignite-ubuntu"]
517        time="2020-03-30T06:32:56Z" level=info msg="Created VM with ID \"6200708bde565200\" and name \"e2e_test_ignite_run_containerd_and_cni\""
518        panic: interface conversion: interface is nil, not reference.NamedTagged
519        
520        goroutine 1 [running]:
521        github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1.OCIImageRef.Ref(0x0, 0x0, 0x0, 0x0, 0xc000223bc0, 0xc000223bc0)
522        	/go/src/github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1/image.go:50 +0x104
523        github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1.OCIImageRef.Normalized(0x0, 0x0, 0x0, 0x0, 0xc0004bf5f8, 0x1)
524        	/go/src/github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1/image.go:60 +0x49
525        github.com/weaveworks/ignite/pkg/runtime/containerd.(*ctdClient).InspectImage(0xc0001b6220, 0x0, 0x0, 0x0, 0x0, 0xc0004d20c0, 0xc00039a540, 0x12)
526        	/go/src/github.com/weaveworks/ignite/pkg/runtime/containerd/client.go:154 +0x15c
527        github.com/weaveworks/ignite/pkg/operations.verifyPulled(0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
528        	/go/src/github.com/weaveworks/ignite/pkg/operations/start.go:149 +0x6d
529        github.com/weaveworks/ignite/pkg/operations.StartVM(0xc00030a000, 0xc0004bfb00, 0x0, 0x0)
530        	/go/src/github.com/weaveworks/ignite/pkg/operations/start.go:45 +0x413
531        github.com/weaveworks/ignite/cmd/ignite/run.Start(0xc0002e5260, 0x0, 0x0)
532        	/go/src/github.com/weaveworks/ignite/cmd/ignite/run/start.go:51 +0x24e
533        github.com/weaveworks/ignite/cmd/ignite/run.Run(0xc0002e5280, 0xc00007eb00, 0x1)
534        	/go/src/github.com/weaveworks/ignite/cmd/ignite/run/run.go:39 +0x74
535        github.com/weaveworks/ignite/cmd/ignite/cmd/vmcmd.NewCmdRun.func1.1(0xc0004d6cd0, 0xc00007eb00, 0x1, 0x4, 0x0, 0x0)
536        	/go/src/github.com/weaveworks/ignite/cmd/ignite/cmd/vmcmd/run.go:46 +0x7e
537        github.com/weaveworks/ignite/cmd/ignite/cmd/vmcmd.NewCmdRun.func1(0xc0002a1b80, 0xc00007eb00, 0x1, 0x4)
538        	/go/src/github.com/weaveworks/ignite/cmd/ignite/cmd/vmcmd/run.go:47 +0x48
539        github.com/spf13/cobra.(*Command).execute(0xc0002a1b80, 0xc00007eac0, 0x4, 0x4, 0xc0002a1b80, 0xc00007eac0)
540        	/go/src/github.com/weaveworks/ignite/vendor/github.com/spf13/cobra/command.go:830 +0x2ae
541        github.com/spf13/cobra.(*Command).ExecuteC(0xc0000f6a00, 0xc00000e010, 0x12af580, 0xc00000e018)
542        	/go/src/github.com/weaveworks/ignite/vendor/github.com/spf13/cobra/command.go:914 +0x2fc
543        github.com/spf13/cobra.(*Command).Execute(...)
544        	/go/src/github.com/weaveworks/ignite/vendor/github.com/spf13/cobra/command.go:864
545        main.Run(0xc0004bff88, 0xc000048118)
546        	/go/src/github.com/weaveworks/ignite/cmd/ignite/ignite.go:24 +0xb5
547        main.main()
548        	/go/src/github.com/weaveworks/ignite/cmd/ignite/ignite.go:13 +0x22

https://travis-ci.com/github/weaveworks/ignite/builds/156462498

I can't reproduce this locally.
make e2e-nobuild completely passes for my on my laptop.
(including the docker+cni tests!)

Need to check if containerd is running and accessible in CI at the normal socket.
The install step doesn't actually see it on the path, so it installs the ubuntu packaged containerd from apt. This totally caught me by surprise.

@stealthybox stealthybox force-pushed the kvm-ci branch 3 times, most recently from 2806cb3 to a471adb Compare March 30, 2020 18:53
@stealthybox
Copy link
Contributor Author

The tag parse failure was because IMAGE_TAG and the binary's ldflags didn't match up.
hack/ldflags.sh used to be completely dependent on git tags.
I added the ability to override it instead of pulling the tags from git since e2e tests might need to run without a valid tag.

@stealthybox stealthybox merged commit d926834 into weaveworks:master Apr 1, 2020
@stealthybox stealthybox deleted the kvm-ci branch April 1, 2020 20:19
@luxas luxas added this to the v0.7.0 milestone Jun 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants