Skip to content

Wait for the token to be added to serviceaccount before running command - #12582

Merged
openshift-bot merged 1 commit into
openshift:masterfrom
soltysh:issue12558
Jan 20, 2017
Merged

openshift-bot merged 1 commit into
openshift:masterfrom
soltysh:issue12558

Conversation

@soltysh

@soltysh soltysh commented Jan 20, 2017

Copy link
Copy Markdown
Contributor

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

soltysh commented Jan 20, 2017

Copy link
Copy Markdown
Contributor Author

[test]

Comment thread test/end-to-end/core.sh Outdated

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

soltysh commented Jan 20, 2017

Copy link
Copy Markdown
Contributor Author

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

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin test up to 534adce

@openshift-bot

Copy link
Copy Markdown
Contributor

@soltysh

soltysh commented Jan 20, 2017

Copy link
Copy Markdown
Contributor Author

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

[merge]

@openshift-bot

openshift-bot commented Jan 20, 2017 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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