Skip to content

Add e2e test that installs hive and creates a cluster #191

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

Merged
merged 1 commit into from
Jan 30, 2019

Conversation

csrwng
Copy link
Contributor

@csrwng csrwng commented Jan 25, 2019

This script is meant to be invoked by an openshift_installer_src job in CI

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 25, 2019
hack/e2e-test.sh Outdated
NOW=$(date +%s)
ELAPSED=$(($NOW - $STARTTIME))
if (($ELAPSED > $TIMEOUT)); then
echo "Timed out waiting for ClusterDeployment ${CLUSTER_NAME} to install"
Copy link
Contributor

Choose a reason for hiding this comment

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

Am I correct that the CI cluster logs for all pods will be artifacts, so there's no need for us to grab any additional info to see what went wrong here?

Should we report how many job restarts somewhere?

@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 28, 2019
@csrwng
Copy link
Contributor Author

csrwng commented Jan 28, 2019

/retest

@dgoodwin
Copy link
Contributor

/retest


function teardown() {
echo "Deleting ClusterDeployment ${CLUSTER_NAME}"
oc delete clusterdeployment ${CLUSTER_NAME}
Copy link
Contributor

Choose a reason for hiding this comment

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

You probably need a waitforjob here as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is tricky because deprovision will immediately kill the install job, which means CI probably won't have our pod logs saved when it finishes up. Should we add or re-use an annotation to keep the install job around, disassociated with the cluster delpoyment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unless you specify --wait=false, oc delete will wait til the resource is actually deleted.

This is tricky because deprovision will immediately kill the install job, which means CI probably won't have our pod logs saved when it finishes up. Should we add or re-use an annotation to keep the install job around, disassociated with the cluster delpoyment?

Or we can always save the log of the install job to the artifacts directory before invoking oc delete

So far I'm blocked from testing this because of openshift/ci-operator-prowgen#61

hack/e2e-test.sh Outdated

# Wait for the cluster deployment to be installed
SRC_ROOT=$(git rev-parse --show-toplevel)
go run "${SRC_ROOT}/contrib/cmd/waitforjob/main.go" "${CLUSTER-NAME}-install"
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe not now, but it would be nice if we had a go utililty to run a full integration test suite, so fo all of this, spin up the deployment, wait, make sure it's installed, and then run a suite of our own integration tests, check that we got things out of admin kubeconfig, etc. We don't really have that integration angle covered and it would be fairly easy for us to re-use it locally if it assumed you were logged into a cluster already (i.e. our dev clusters)

@csrwng csrwng force-pushed the e2e_test branch 7 times, most recently from 8833466 to 39bbc5a Compare January 30, 2019 16:29
@csrwng csrwng changed the title WIP: Add e2e test that installs hive and creates a cluster Add e2e test that installs hive and creates a cluster Jan 30, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 30, 2019
@csrwng
Copy link
Contributor Author

csrwng commented Jan 30, 2019

@dgoodwin removing the WIP for this PR. It should work when we add the hive-ci public zone to the AWS ci account. For now it won't do anything until invoked by prow.

@dgoodwin
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 30, 2019
@csrwng
Copy link
Contributor Author

csrwng commented Jan 30, 2019

/retest

@openshift-merge-robot openshift-merge-robot merged commit 2d00743 into openshift:master Jan 30, 2019
wking added a commit to wking/hive that referenced this pull request Feb 20, 2019
This script has been 100644 since it landed in 8bcee7e (Add e2e test
that installs hive and creates a cluster, 2019-01-25, openshift#191).  I'm not
sure why that wasn't a problem before, but I just saw [1]:

  hack/e2e-test.sh
  make: execvp: hack/e2e-test.sh: Permission denied
  make: *** [test-e2e] Error 127

[1]: https://storage.googleapis.com/origin-ci-test/pr-logs/pull/openshift_hive/222/pull-ci-openshift-hive-master-e2e/106/build-log.txt
wking added a commit to wking/hive that referenced this pull request Feb 20, 2019
This script has been 100644 since it landed in 8bcee7e (Add e2e test
that installs hive and creates a cluster, 2019-01-25, openshift#191).  I'm not
sure why that wasn't a problem before, but I just saw [1]:

  hack/e2e-test.sh
  make: execvp: hack/e2e-test.sh: Permission denied
  make: *** [test-e2e] Error 127

[1]: https://storage.googleapis.com/origin-ci-test/pr-logs/pull/openshift_hive/222/pull-ci-openshift-hive-master-e2e/106/build-log.txt
wking added a commit to wking/hive that referenced this pull request Feb 21, 2019
This script has been 100644 since it landed in 8bcee7e (Add e2e test
that installs hive and creates a cluster, 2019-01-25, openshift#191).  I'm not
sure why that wasn't a problem before, but I just saw [1]:

  hack/e2e-test.sh
  make: execvp: hack/e2e-test.sh: Permission denied
  make: *** [test-e2e] Error 127

[1]: https://storage.googleapis.com/origin-ci-test/pr-logs/pull/openshift_hive/222/pull-ci-openshift-hive-master-e2e/106/build-log.txt
@csrwng csrwng deleted the e2e_test branch March 8, 2019 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants