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 the token to be added to serviceaccount before running command #12582

Merged
merged 1 commit into from
Jan 20, 2017

Conversation

soltysh
Copy link
Contributor

@soltysh soltysh commented Jan 20, 2017

Apparently between line 358 and 359 it takes a bit longer, sometime to get the token available in the serviceaccount. I'm adding there a small wait time to bypass the problem.

Fixes #12558

@deads2k @ncdc @smarterclayton ptal

@soltysh
Copy link
Contributor Author

soltysh commented Jan 20, 2017

[test]

@@ -356,6 +356,7 @@ os::cmd::expect_success 'oc whoami'

os::log::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'
os::cmd::try_until_text 'oc get -n test serviceaccount/default --template="{{.secrets}}"' 'token'
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you use the oc sa gettoken command instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh, I didn't know we have something like that, will rework right away.

Copy link
Contributor

Choose a reason for hiding this comment

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

Whoever added that was a real team player ;)

@soltysh
Copy link
Contributor Author

soltysh commented Jan 20, 2017

Hmm... interesting previous version still failed on that oc logs kubectl-with-token

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 534adce

@openshift-bot
Copy link
Contributor

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

@soltysh
Copy link
Contributor Author

soltysh commented Jan 20, 2017

Based on IRC approval, we'll dig further when this is in.

[merge]

@openshift-bot
Copy link
Contributor

openshift-bot commented Jan 20, 2017

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/13082/) (Image: devenv-rhel7_5734)

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 534adce

@openshift-bot openshift-bot merged commit 9a006a8 into openshift:master Jan 20, 2017
@soltysh soltysh deleted the issue12558 branch January 20, 2017 15:10
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.

4 participants