Skip to content

Conversation

@sallyom
Copy link
Contributor

@sallyom sallyom commented Dec 11, 2018

This PR adds a check for logging in as user kubeadmin for 4.0 cluster-launch-installer-* templates.

@wking thanks for your review

@openshift-ci-robot openshift-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Dec 11, 2018
@wking
Copy link
Member

wking commented Dec 11, 2018

I think we want to have a wait like this in the installer in Go and/or have an e2e test that confirms successful login (skipped if there's no KUBEADMIN_PASSWORD environment variable?). Do you have a reason for prefering it in the release script itself?

@sallyom sallyom force-pushed the add-kubeadmin-login-to-installer-templates branch from aaa63ad to 70170f8 Compare December 12, 2018 01:20
@sallyom
Copy link
Contributor Author

sallyom commented Dec 12, 2018

@wking, yes, I am planning on adding an e2e test for this, also enabling some (currently skipped?) checks that the console is accessible (or writing a new check). This was super-easy to add, though, and would catch an error b4 running the suite, for quicker results. I have no problem abandoning this in favor of adding a proper e2e check.

@wking
Copy link
Member

wking commented Dec 13, 2018

This was super-easy to add, though...

I'm fine with this as long as you'll remember to remove it when the real waiter and tester land ;).

... and would catch an error b4 running the suite, for quicker results.

Quicker? By my reading this would loop forever, to eventually be killed by the whole test timing out. Maybe you wanted a shorter timeout for the login loop?

@sallyom sallyom force-pushed the add-kubeadmin-login-to-installer-templates branch 3 times, most recently from 887df6f to 11e6e98 Compare December 14, 2018 19:48
@openshift-ci-robot openshift-ci-robot removed the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Dec 14, 2018
@sallyom sallyom force-pushed the add-kubeadmin-login-to-installer-templates branch from 11e6e98 to 43c7eda Compare December 14, 2018 19:49
@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 14, 2018
@sallyom
Copy link
Contributor Author

sallyom commented Dec 14, 2018

@wking, the php image check will also loop until test timeout, I'm not modifying that here, though.
I've added a 5 minute limit for the login check. This will be helpful for auth team to have while they do some refactoring, to ensure they don't break the installer. I'm looking at the proper e2e/integration test for origin, will remove this check once that is merged.

@wking
Copy link
Member

wking commented Dec 16, 2018

@wking, the php image check will also loop until test timeout, I'm not modifying that here, though

The php check is from #2269, and the intention is "wait until the cluster is up before running the e2e tests, because we don't currently have a reliable test for that", not "test if the registry is working".

@sallyom sallyom force-pushed the add-kubeadmin-login-to-installer-templates branch from 43c7eda to 2d28892 Compare December 16, 2018 22:02
@sallyom
Copy link
Contributor Author

sallyom commented Dec 16, 2018

@wking I know that to be true (the php image check tests that cluster is back to stable state after a config change), I said it's a registry check, not registry test. Same with cluster-osin-operator configuring the kubeadmin user, it's essentially a patch, so cluster is in a transitional state for a short time. A successful oc login -u kubeadmin helps ensure that the cluster is functional after a config change.

while [[ "${NOW}" -lt "${TARGET}" ]]; do
# wait until oc login -n kubeadmin succeeds
if oc login -u kubeadmin -p "${password}"; then
if ! oc login -u system:admin; then
Copy link
Member

Choose a reason for hiding this comment

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

Is this a check to see if the kubeadmin login granted you sufficient authorization?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is to set user back to system:admin for the test suite, to keep it as it was before this check.

@wking
Copy link
Member

wking commented Dec 17, 2018

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 17, 2018
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sallyom, wking

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 17, 2018
@openshift-merge-robot openshift-merge-robot merged commit e92024b into openshift:master Dec 17, 2018
@openshift-ci-robot
Copy link
Contributor

@sallyom: Updated the following 2 configmaps:

  • prow-job-cluster-launch-installer-e2e configmap using the following files:
    • key cluster-launch-installer-e2e.yaml using file ci-operator/templates/openshift/installer/cluster-launch-installer-e2e.yaml
  • prow-job-cluster-launch-installer-src configmap using the following files:
    • key cluster-launch-installer-src.yaml using file ci-operator/templates/openshift/installer/cluster-launch-installer-src.yaml
Details

In response to this:

This PR adds a check for logging in as user kubeadmin for 4.0 cluster-launch-installer-* templates.

@wking thanks for your review

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants