-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Conversation
[test] |
Evaluated for origin test up to 24db67b |
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 |
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.
if oc run --attach
doesn't work any more, we have to fix that, not work around the issue in a test
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.
--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).
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.
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
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.
@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.
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.
Right, I can see those logs anyway too. That's unfortunate. I am not sure if this is related or not to --attach now.
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 related failure: #9285 (comment)
Won't fix the underlying problem - closing |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/10248/) (Base Commit: ab7d5fe) |
Fixes #11240
@ncdc ptal