-
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
hack/test-cmd.sh:107: executing 'oc login' fails with "error: Missing configuration" #17574
Comments
This is a simple race, we need to wait unit server will be ready. |
It 100% reproducible on master locally (just run -os::cmd::expect_success "oc login --server='${KUBERNETES_MASTER}' --certificate-authority='${MASTER_CONFIG_DIR}/ca.crt' -u test-user -p anything"
+os::cmd::try_until_success "oc login --server='${KUBERNETES_MASTER}' --certificate-authority='${MASTER_CONFIG_DIR}/ca.crt' -u test-user -p anything" The question is: would such a patch will be accepted? This race also signalizes that OpenShift server became slowly. I wasn't able to quickly identify a cause unfortunately. |
I submitted https://github.com/RangelReale/osincli/issues/6 to improve the error reporting here. |
So far I found the following:
So, the caller haven't fully configured a config (authorizeUrl and tokenUrl are empty).
I'm not familiar with this code, but by my opinion, in order to fix this issue, we should update Also we could update a shell function that waits when server will be ready by also polling I'm adding @enj to copy, because he added this code and probably could give an advice. |
Yes, there is a problem, when we invoke |
Probably because k8s RBAc forces reconciliation on each start |
@php-coder feel free to add a check to The test scripts wait for the master to report its healthy, but that does not mean the RBAC cache is ready (only that the post start hook completed). @deads2k do we need another post start hook for such things? Or I suppose we could add further checks in |
We already have to wait for the |
#17606 has been submitted. |
@php-coder it already does that. But just because reconciliation finished does not mean that the RBAC shared informer cache that backs the authorizer is ready to process requests. Running a curl in a loop until it says 200 for |
@php-coder adding a |
hitting this on every run of #17314 |
…-logic Automatic merge from submit-queue. Poll for server start using impersonation When we poll for server start on `/healthz` and/or `/healthz/ready` with the administrative `$KUBECONFIG` we do so as part of the `system:masters` group and therefore the response fromt these endpoints will succeed before the RBAC system is initialized as we bypass it. Using impersonation here allows the poll on these endpoints to not only wait for the server to start but also to wait for the RBAC initialization. Signed-off-by: Steve Kuznetsov <[email protected]> /cc @liggitt @deads2k @enj Fixes #17574
Automatic merge from submit-queue (batch tested with PRs 17217, 17597, 17606). Fail fast when request to /.well-known/oauth-authorization-server fails Improves error reporting. See here for more details: #17574 (comment) Prior this change `hack/test-cmd.sh` could fail with the error: > error: Missing configuration - verify you have provided the correct host and port and that the server is currently running. Now, the message has more details: > error: couldn't get https://10.34.129.148:28443/.well-known/oauth-authorization-server: unexpected status 403 were returned - verify you have provided the correct host and port and that the server is currently running. PTAL @enj @simo5
hack/test-cmd.sh
has many failures, but looks like the most important is this:The log is here: https://openshift-gce-devel.appspot.com/build/origin-ci-test/pr-logs/pull/17512/test_pull_request_origin_cmd/6902/
The text was updated successfully, but these errors were encountered: