Repository navigation
Wait for the token to be added to serviceaccount before running command - #12582
Conversation
|
[test] |
|
|
||
| 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' |
There was a problem hiding this comment.
Can you use the oc sa gettoken command instead?
There was a problem hiding this comment.
oh, I didn't know we have something like that, will rework right away.
There was a problem hiding this comment.
Whoever added that was a real team player ;)
|
Hmm... interesting previous version still failed on that |
|
Evaluated for origin test up to 534adce |
|
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/13082/) (Base Commit: 1e269a3) |
|
Based on IRC approval, we'll dig further when this is in. [merge] |
|
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/13082/) (Image: devenv-rhel7_5734) |
|
Evaluated for origin merge up to 534adce |
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