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

Revive conformance test. #9816

Merged
merged 1 commit into from Jun 24, 2015
Merged

Revive conformance test. #9816

merged 1 commit into from Jun 24, 2015

Conversation

erictune
Copy link
Member

Use KUBE_CONFIG_FILE instead of AUTH_CONFIG (and CERT_DIR).

Pass GINKGO_TEST_ARGS for a subset of e2e tests which
@erictune has deemed initially sufficient for conformance.

Allow GINKGO_TEST_ARGS to pass through hack/ginkgo-e2e.sh.

Set NUM_MINIONS (need better way to handle this).

Remove use of "KUBERNETES_CONFORMANCE_TEST" variable
and use of KUBERNETES_PROVIDER="conformance_test" convention,
both of which have no apparent purpose.

Allow unset testContext.provider in test/e2e/e2e_test.go
Allow testContext.Provider to be unset in providerIs().

@erictune
Copy link
Member Author

@zmerlynn @ixdy for caring about test infra.
@lavalamp for caring about conformance test defintion

@k8s-bot
Copy link

k8s-bot commented Jun 15, 2015

GCE e2e build/test failed for commit 111ff5bdf99595b43a58f48bc456f2d0e97e9510.

date

# Conformance test does not have to pass all the e2es. Just a subset for now:
export GINKGO_TEST_ARGS="--focus=DNS|Downward|EmptyDir|Events|Kubectl|Networking|Pods|PreStop|Secrets|Services --skip=Skipped|Service\sendpoints\slatency|Services.*functioning\sexternal|Services.*Type.*LoadBalancer.*NodePort|Services.*change\sthe\stype|Service.*should.release.*|Service.*external\sload\sbalancer"
Copy link
Member

Choose a reason for hiding this comment

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

GINKGO_TEST_ARGS is already used in hack/jenkins/e2e.sh to define what is passed in the --test_args flag to hack/e2e.go, which is in turn passed as arguments to hack/ginkgo-e2e.sh.

It's a complete roundabout mess, but using the same name here is likely to cause problems.

An alternative to creating this new env var is to just append --ginkgo.focus=... to the hack/ginkgo-e2e.sh line below.

Copy link
Member

Choose a reason for hiding this comment

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

Should be --ginkgo.focus?

I think if you supply --ginkgo.focus, everything else is skipped, so you don't need both.

How we will be able to add a test to this list without making everyone angry? One idea is to keep a queue of lists; so you'd say JUNE_REQ=foo, JULY_REQ=foo,bar, AUGUST_REQ=foo,bar,baz... etc. This way people will see what's going to be required of them and fix their distros preemptively, and we can add requirements in the future without instantly disqualifying people today. (Or the requirements could be tagged by version instead of by month... the point is just that we need to give maintainers enough warning.)

Copy link
Member

Choose a reason for hiding this comment

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

Regarding the argument name:

If you pass the focus argument to the ginkgo binary itself (as is currently done in this PR), then it's named --focus. If you pass it to the test (by passing it after -- on the ginkgo cmdline - as was my suggestion, passing it as an argument to hack/ginkgo-e2e.sh), then it's named --ginkgo.focus.

Copy link
Member Author

Choose a reason for hiding this comment

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

@lavalamp about needing both:
the --focus and --skip arguments are anded together.
This allows me to say "run all service tests except these ones" and so forth.

In terms of versioning:

  • I plan to add language that says that the conformance test suite may change. Let's first solve the problem of separating the set of distros that ever worked from the set that never worked. Then later solve the problem of what to do when we raise the bar.
  • I will add language soon which says that the conformance test suite may change over time.
  • I don't think we need versions: we can just use corresponding version of the repository (commit sha, or release tag) to be clear about what version of the conformance test someone ran. I'll change the script to print the sha and any version tags of the current repo.

Copy link
Member

Choose a reason for hiding this comment

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

Gotcha. SGTM

On Mon, Jun 15, 2015 at 3:05 PM, Eric Tune notifications@github.com wrote:

In hack/conformance-test.sh
#9816 (comment)
:

+# declare -x KUBE_CONFIG_FILE="=$HOME/.kube/config"
+# - Specify the location of the master with, e.g.:
+# declare -x KUBE_MASTER_IP="1.2.3.4"
+# - Make sure only essential pods are running and there are no failed/pending pods.
+# Then run:
+# hack/conformance-test.sh 2>&1 | tee conformance.$(date +%FT%T%z).log
+
+: ${KUBE_CONFIG_FILE:?"Must set KUBE_CONFIG_FILE before running conformance test."}
+: ${KUBE_MASTER_IP:?"Must set MASTER_IP before running conformance test."}
+
+echo "Conformance test version: 0.1"
+echo -n "Conformance test run date:"
+date
+
+# Conformance test does not have to pass all the e2es. Just a subset for now:
+export GINKGO_TEST_ARGS="--focus=DNS|Downward|EmptyDir|Events|Kubectl|Networking|Pods|PreStop|Secrets|Services --skip=Skipped|Service\sendpoints\slatency|Services._functioning\sexternal|Services._Type._LoadBalancer._NodePort|Services._change\sthe\stype|Service.should.release.|Service._external\sload\sbalancer"

@lavalamp https://github.com/lavalamp about needing both:
the --focus and --skip arguments are anded together.
This allows me to say "run all service tests except these ones" and so
forth.

In terms of versioning:

  • I plan to add language that says that the conformance test suite may
    change. Let's first solve the problem of separating the set of distros that
    ever worked from the set that never worked. Then later solve the problem of
    what to do when we raise the bar.
  • I will add language soon which says that the conformance test suite
    may change over time.
  • I don't think we need versions: we can just use corresponding
    version of the repository (commit sha, or release tag) to be clear about
    what version of the conformance test someone ran. I'll change the script to
    print the sha and any version tags of the current repo.


Reply to this email directly or view it on GitHub
https://github.com/GoogleCloudPlatform/kubernetes/pull/9816/files#r32472407
.

@k8s-bot
Copy link

k8s-bot commented Jun 15, 2015

GCE e2e build/test passed for commit b70b7084c93d4ce80b7463f48c23d5ac04edb2b1.

@erictune
Copy link
Member Author

Okay, @lavalamp was right, I can't use focus and skip together.
I changed it to just use focus.

# Shell: replies on optional ssh access to nodes.
# SSH: optional feature.
# Volumes: contained only skipped tests.
export GINKGO_TEST_ARGS="--focus=DNS|Docker\sContainers|Downward|EmptyDir|Events|hostDir|Kubectl|Networking|Pods|PreStop|ReplicationController|Secrets|Services.*master|Services.*endpoint|Services.*multiport"
Copy link
Member

Choose a reason for hiding this comment

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

you still didn't address my comment regarding GINKGO_TEST_ARGS.

@k8s-bot
Copy link

k8s-bot commented Jun 16, 2015

GCE e2e build/test passed for commit b8c9b37a5efd2082b81b7eb1f546bcf2c3f3a516.

@erictune
Copy link
Member Author

Okay, I think I addressed your request @ixdy

@k8s-bot
Copy link

k8s-bot commented Jun 16, 2015

GCE e2e build/test failed for commit 2a4ad28a86ef0af06be8f3c1ae15d685cc047bcc.

@ghost
Copy link

ghost commented Jun 16, 2015

You can actually focus and skip. It works for me:

http://onsi.github.io/ginkgo/#focused-specs

"When using the command line flags you can specify one or both of --focus and --skip. If both are specified the constraints will be ANDed together."

@erictune
Copy link
Member Author

@k8s-bot please test this again.

@k8s-bot
Copy link

k8s-bot commented Jun 18, 2015

GCE e2e build/test passed for commit 5ed62cb0bfb2856d74b6b938fa94db4c7087b3cb.

@k8s-bot
Copy link

k8s-bot commented Jun 18, 2015

GCE e2e build/test passed for commit 664c3c092347c54bc6f6de1743eaf9ae666757cb.

@ixdy
Copy link
Member

ixdy commented Jun 18, 2015

@erictune are you still working on this? I see some obvious debugging statements still lurking here.

@erictune
Copy link
Member Author

Ready for review now.

@k8s-bot
Copy link

k8s-bot commented Jun 18, 2015

GCE e2e build/test failed for commit 11f442211a1df882e2311f8152864944adeddcf7.


: ${KUBECONFIG:?"Must set KUBECONFIG before running conformance test."}
: ${KUBE_MASTER_IP:?"Must set KUBE_MASTER_IP before running conformance test."}
echo "Conformance test using $KUBECONFIG against master at $KUBE_MASTER_IP"
Copy link
Member

Choose a reason for hiding this comment

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

nit: ${KUBECONFIG} and ${KUBE_MASTER_IP}

auth_config=(
"--kubeconfig=${KUBECONFIG:-$DEFAULT_KUBECONFIG}"
)
if [[ "${KUBERNETES_PROVIDER}" == "gke" ]]; then
Copy link
Member

Choose a reason for hiding this comment

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

the GKE stuff was removed in #9227.

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed.

@k8s-bot
Copy link

k8s-bot commented Jun 23, 2015

GCE e2e build/test passed for commit e2b8449fa7a4e868eb3cee26efed39eedac5f354.

Use KUBE_CONFIG_FILE instead of AUTH_CONFIG (and CERT_DIR).

Pass GINKGO_TEST_ARGS for a subset of e2e tests which
@erictune has deemed initially sufficient for conformance.

Allow GINKGO_TEST_ARGS to pass through hack/ginkgo-e2e.sh.

Set NUM_MINIONS (need better way to handle this).

Remove use of "KUBERNETES_CONFORMANCE_TEST" variable
and use of KUBERNETES_PROVIDER="conformance_test" convention,
both of which have no apparent purpose.

Allow unset testContext.provider in test/e2e/e2e_test.go
Allow testContext.Provider to be unset in providerIs().
@k8s-bot
Copy link

k8s-bot commented Jun 23, 2015

GCE e2e build/test passed for commit c5efb12.

@erictune
Copy link
Member Author

Helps fix #9717

@erictune
Copy link
Member Author

@ixdy PTAL

@ixdy
Copy link
Member

ixdy commented Jun 23, 2015

LGTM

@ixdy ixdy added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 23, 2015
@erictune
Copy link
Member Author

Risk is low because it would have broken e2e if it had any issues, and it is mostly adding a separate testing path, and not changing existing behavior.

@lavalamp can I get a Leads LGTM.

@erictune
Copy link
Member Author

@quinton-hoole can I get a Leads LGTM

@@ -81,6 +73,9 @@ if [[ "${KUBERNETES_PROVIDER}" == "gke" ]]; then
fi

ginkgo_args=()
if [[ -n ${CONFORMANCE_TEST_SKIP_REGEX:-} ]]; then
Copy link
Member

Choose a reason for hiding this comment

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

Quote variables in bash?

@lavalamp
Copy link
Member

LGTM; my comments are all very minor, fix only if you want to.

@ghost
Copy link

ghost commented Jun 24, 2015

LGTM OK-to-merge

@ghost ghost added the ok-to-merge label Jun 24, 2015
@erictune
Copy link
Member Author

Please merge. I'll address @lavalamp comments in a follow up PR.

mbforbes added a commit that referenced this pull request Jun 24, 2015
@mbforbes mbforbes merged commit 26d3a44 into kubernetes:master Jun 24, 2015
@karlkfi
Copy link
Contributor

karlkfi commented Aug 19, 2015

@erictune Why was NUM_MINIONS hardcoded to 4 in this change? I was under the impression that the e2e tests only required 2 minions. Did that change at some point? I see many of the clusters default to 4 minions now in config-default.sh, but are still set to 2 in config-test.sh.

@ixdy
Copy link
Member

ixdy commented Aug 19, 2015

In some places it's 2, in some places, it's 3, in others, it's 4. We should probably be more consistent about this.

Context for bumping up from 2 is in #10899.

@karlkfi
Copy link
Contributor

karlkfi commented Aug 20, 2015

Thanks for the context, @ixdy

After reading all that I'm a bit disappointed that the cluster sizes were increased. It makes the defaults more expensive to both deploy and test on IaaS. And it looks like it was increased primarily a work around for a test pollution issue.

I have another conformant test question tho. Why is KUBE_MASTER_IP explicitly required by conformance-test.sh?

According to the comments in ginkgo-e2e.sh:

The --host setting is used only when providing --auth_config
If --kubeconfig is used, the host to use is retrieved from the .kubeconfig
file and the one provided with --host is ignored.

That makes it sound like KUBE_MASTER_IP, which is used to populate --host, should be optional, since KUBECONFIG is enforced (and required, because it contains the SSL certs).

@erictune
Copy link
Member Author

@karlkfi I just merged #13130 to conformance-test-v1 branch. That removes the need to set KUBE_MASTER_IP, instead detecting it from your kubeconfig.

@erictune
Copy link
Member Author

@karlkfi As a workaround for the cost of 4-node clusters, would it work to exclude just those tests that require 4 nodes from your continuous testing, (using ginkgo_skip)? Perhaps run those tests only prior to a major release?

@karlkfi
Copy link
Contributor

karlkfi commented Aug 25, 2015

Are there tests that actually require 4 nodes?

I got the impression from the config-test.sh files (https://github.com/kubernetes/kubernetes/blob/master/cluster/gce/config-test.sh#L23) that they were all running on 2, even tho the default is 4 (https://github.com/kubernetes/kubernetes/blob/master/cluster/gce/config-default.sh#L23).

It looks like Jenkins is also using 2: https://github.com/brendandburns/kubernetes/blob/master/hack/jenkins/e2e.sh#L57

From reading #10899 I got the impression that the soak tests were breaking subsequent tests with only 2, but that seems like a good reason not to run soak tests as part of the larger e2e test suite.

We've been discussing at Mesosphere that it would make sense to have another layer of testing, one that deploys a new cluster for each test, in order to test things like node failover, load testing, or anything that is potentially destructive. The test suite needs to be able to destroy and recreate the cluster for tests like these, but not for most other e2e tests.

@ixdy
Copy link
Member

ixdy commented Aug 25, 2015

your fork of hack/jenkins/e2e.sh is a bit out of date - see https://github.com/kubernetes/kubernetes/blob/master/hack/jenkins/e2e.sh#L74.

@karlkfi
Copy link
Contributor

karlkfi commented Aug 25, 2015

nice catch. not sure how i got on brendan's fork...
That said, still 3, not 4.

Perhaps we should tag tests individually for how many nodes they need? That way they can skip themselves or error out early if the node count is too low, rather than breaking subsequent tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants