Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add instructions to run e2e tests on GKE #10029

Merged
merged 1 commit into from Feb 10, 2020

Conversation

raybejjani
Copy link
Contributor

@raybejjani raybejjani commented Feb 3, 2020

This change is Reviewable

@raybejjani raybejjani added pending-review area/documentation Impacts the documentation, including textual changes, sphinx, or other doc generation code. area/CI Continuous Integration testing issue or flake labels Feb 3, 2020
@raybejjani raybejjani requested a review from a team as a code owner February 3, 2020 15:39
@maintainer-s-little-helper
Copy link

Release note label not set, please set the appropriate release note.

2 similar comments
@maintainer-s-little-helper
Copy link

Release note label not set, please set the appropriate release note.

@maintainer-s-little-helper
Copy link

Release note label not set, please set the appropriate release note.

@raybejjani
Copy link
Contributor Author

test-docs-please

@raybejjani raybejjani added release-note/ci This PR makes changes to the CI. and removed dont-merge/needs-release-note labels Feb 3, 2020
@coveralls
Copy link

coveralls commented Feb 3, 2020

Coverage Status

Coverage decreased (-0.007%) to 44.61% when pulling 969b531 on raybejjani:gke-e2e-docs into 629db72 on cilium:master.

Copy link
Member

@joestringer joestringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me.

I tried this locally, only change is that I only tried to run K8sHealth* rather than the full k8s suite. I got this:

Running Suite: Suite-k8s-1.13                                                                                                                                                         
=============================                                                                                                                                                         
Random Seed: 1580775587                                                                                                                                                               
Will run 1 of 377 specs                                                                                                                                                               
                                                                                                                                                                                      
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
Spinning up vagrant VMs... ●SSSSSSSSSSSSSSSS                                                                                                                                          
                                                                                                                                                                                      
------------------------------                                                                                                                                                        
• Failure in Spec Setup (BeforeEach) [0.252 seconds]                                                                                                                                  
K8sHealthTest [BeforeEach]                                                                                                                                                            
/home/joe/git/cilium/test/ginkgo-ext/scopes.go:395                                                                                                                                    
  checks cilium-health status between nodes                                                                                                                                           
  /home/joe/git/cilium/test/ginkgo-ext/scopes.go:430                                                                                                                                  
                                                                                                                                                                                      
  Cannot connect to k8s cluster, output:                                                                                                                                              
  bash: kubectl: command not found                                                                                                                                                    
                                                                                                                                                                                      
                                                                                                                                                                                      
  /home/joe/git/cilium/test/test_suite_test.go:276

For reference,

$ which kubectl
/snap/bin/kubectl
$ ls -lh $(which kubectl)
lrwxrwxrwx 1 root root 13 Jan 22 13:06 /snap/bin/kubectl -> /usr/bin/snap

(Kubectl works fine for me in my terminal, but I wonder if snap / microk8s is doing some funny stuff or if there's some other assumption I'm violating....?)

@aanm aanm added this to the 1.7 milestone Feb 4, 2020
@raybejjani
Copy link
Contributor Author

raybejjani commented Feb 4, 2020

@joestringer Hmm, could you try with -cilium.passCLIEnvironment=true I removed that because tests worked the same way without it on my end. It may be as simple as PATH not being setup right (the env is actively cleared for the execs as I recall, and this option avoids that).

@aanm aanm added needs-backport/1.7 dont-merge/needs-rebase This PR needs to be rebased because it has merge conflicts. and removed needs-backport/1.7 labels Feb 4, 2020
@raybejjani raybejjani force-pushed the gke-e2e-docs branch 2 times, most recently from 2769436 to 3e02f68 Compare February 4, 2020 17:02
@raybejjani
Copy link
Contributor Author

test-docs-please

@joestringer
Copy link
Member

joestringer commented Feb 4, 2020

@raybejjani Getting better...

test $ CNI_INTEGRATION=gke K8S_VERSION=1.13 CILIUM_IMAGE="quay.io/cilium/cilium:latest" CILIUM_OPERATOR_IMAGE="quay.io/cilium/operator:latest" ginkgo --focus="K8sHealth*" -noColor -- -cilium.provision=false -cilium.kub
econfig=~/.kube/config -cilium.image="quay.io/cilium/cilium:latest" -cilium.operator-image="quay.io/cilium/operator:latest" -cilium.passCLIEnvironment=true
Running Suite: Suite-k8s-1.13
=============================
Random Seed: 1580844554
Will run 1 of 377 specs

Spinning up vagrant VMs... ●SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS

------------------------------
• Failure in Spec Setup (BeforeEach) [0.504 seconds]
K8sHealthTest [BeforeEach]
/home/joe/work/src/github.com/cilium/cilium/test/ginkgo-ext/scopes.go:395
  checks cilium-health status between nodes
  /home/joe/work/src/github.com/cilium/cilium/test/ginkgo-ext/scopes.go:430

  Cannot connect to k8s cluster, output:
  W0204 11:29:28.665237   10845 loader.go:223] Config not found: ~/.kube/config
  The connection to the server localhost:8080 was refused - did you specify the right host or port?
  

  /home/joe/work/src/github.com/cilium/cilium/test/test_suite_test.go:276
------------------------------
<Checks>

</Checks>

SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS

Summarizing 1 Failure:

[Fail] [BeforeEach] K8sHealthTest checks cilium-health status between nodes 
/home/joe/work/src/github.com/cilium/cilium/test/test_suite_test.go:276

Ran 1 of 377 Specs in 0.514 seconds
FAIL! -- 0 Passed | 1 Failed | 0 Pending | 376 Skipped
--- FAIL: TestTest (0.52s)
FAIL

Ginkgo ran 1 suite in 14.730666295s
Test Suite Failed
$ ls ~/.kube/config
/home/joe/.kube/config

@raybejjani
Copy link
Contributor Author

Hmm, could you manually expand -cilium.kubeconfig=~/.kube/config?
I'm not sure why I included the ~/ form in the docs. My CLI history has it fully expanded :/ I'll update this PR to sort that out.

@aanm
Copy link
Member

aanm commented Feb 7, 2020

@raybejjani I've removed this PR from the needs-bacport to 1.7 as this is not required to block 1.7 release.

@aanm aanm removed this from the 1.7 milestone Feb 7, 2020
@aanm aanm added this to the 1.8 milestone Feb 7, 2020
This change also corrects how the examples determing the path to the
default KUBECONFIG to work more consistently.

Signed-off-by: Ray Bejjani <ray@isovalent.com>
@raybejjani
Copy link
Contributor Author

test-docs-please

@raybejjani raybejjani merged commit 86c840c into cilium:master Feb 10, 2020
1.7.0 automation moved this from In progress to Merged Feb 10, 2020
@raybejjani raybejjani deleted the gke-e2e-docs branch February 10, 2020 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/CI Continuous Integration testing issue or flake area/documentation Impacts the documentation, including textual changes, sphinx, or other doc generation code. dont-merge/needs-rebase This PR needs to be rebased because it has merge conflicts. release-note/ci This PR makes changes to the CI.
Projects
No open projects
1.7.0
  
Merged
Development

Successfully merging this pull request may close these issues.

None yet

4 participants