-
Notifications
You must be signed in to change notification settings - Fork 254
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
Conversation
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" |
There was a problem hiding this comment.
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?
/retest |
/retest |
|
||
function teardown() { | ||
echo "Deleting ClusterDeployment ${CLUSTER_NAME}" | ||
oc delete clusterdeployment ${CLUSTER_NAME} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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)
8833466
to
39bbc5a
Compare
@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. |
/lgtm |
/retest |
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
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
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
This script is meant to be invoked by an openshift_installer_src job in CI