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

Wait for pod to be running in e2e test #11444

Closed
wants to merge 1 commit into from
Closed

Wait for pod to be running in e2e test #11444

wants to merge 1 commit into from

Conversation

0xmichalis
Copy link
Contributor

Fixes #11240

@ncdc ptal

@0xmichalis
Copy link
Contributor Author

[test]

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 24db67b

@ncdc
Copy link
Contributor

ncdc commented Oct 19, 2016

You guys have looked at this more than I have - I'll let @mfojtik etc give it the green light

@@ -326,14 +326,22 @@ os::cmd::expect_success 'oc whoami'

echo "[INFO] Running a CLI command in a container using the service account"
os::cmd::expect_success 'oc policy add-role-to-user view -z default'
oc run cli-with-token --attach --image="openshift/origin:${TAG}" --restart=Never -- cli status --loglevel=4 > "${LOG_DIR}/cli-with-token.log" 2>&1
Copy link
Contributor

Choose a reason for hiding this comment

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

if oc run --attach doesn't work any more, we have to fix that, not work around the issue in a test

Copy link
Contributor Author

Choose a reason for hiding this comment

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

--attach makes the command watch for events until it notices that the pod is running and then it attaches to the container. This is not a workaround because --attach is not working, but because of the pod never transitioning to Running (#11016).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See the error reported in #11240

Standard output from the command:
Waiting for pod test/cli-with-token to be running, status is Pending, pod ready: false
Waiting for pod test/cli-with-token to be running, status is Pending, pod ready: false

Copy link
Contributor

@ncdc ncdc Oct 19, 2016

Choose a reason for hiding this comment

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

@Kargakis I don't think the assessment is correct, at least not in cases such as this one: https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_integration/7303/console.

Running test/end-to-end/core.sh:328: executing 'oc policy add-role-to-user view -z default' expecting success...
SUCCESS after 0.261s: test/end-to-end/core.sh:328: executing 'oc policy add-role-to-user view -z default' expecting success
There was no output from the command.
There was no error output from the command.
Running test/end-to-end/core.sh:330: executing 'cat '/tmp/openshift/test-end-to-end-docker//logs/cli-with-token.log'' expecting success and text 'Using in-cluster configuration'...
FAILURE after 0.014s: test/end-to-end/core.sh:330: executing 'cat '/tmp/openshift/test-end-to-end-docker//logs/cli-with-token.log'' expecting success and text 'Using in-cluster configuration': the output content test failed
Standard output from the command:
Waiting for pod test/cli-with-token to be running, status is Pending, pod ready: false
Waiting for pod test/cli-with-token to be running, status is Pending, pod ready: false
If you don't see a command prompt, try pressing enter.
In project test on server https://172.30.0.1:443

pod/cli-with-token runs openshift/origin:f0d40dd

2 warnings identified, use 'openshift cli status -v' to see details.
Waiting for pod test/cli-with-token to terminate, status is Running

There was no error output from the command.

Here you see it did run, it just failed to capture this output (what I see locally):

I1019 14:12:48.070810       1 merged_client_builder.go:122] Using in-cluster configuration

This is logged after the "Waiting for pod" line and before the "In project test" line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, I can see those logs anyway too. That's unfortunate. I am not sure if this is related or not to --attach now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe related failure: #9285 (comment)

@0xmichalis
Copy link
Contributor Author

@ncdc @mfojtik is out today

@0xmichalis
Copy link
Contributor Author

Won't fix the underlying problem - closing

@0xmichalis 0xmichalis closed this Oct 19, 2016
@0xmichalis 0xmichalis deleted the e2e-fix branch October 19, 2016 14:52
@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/10248/) (Base Commit: ab7d5fe)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants