Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,14 @@ objects:
done
# oh god the blood
sleep 180
# can remove this check once a proper test is added to origin e2e
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not write the e2e test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm doing that now. This ensures no breaking changes are merged b4 that test is in place (auth team is refactoring, configuring oauth, etc now). However, with how long this has taken to merge, might-as-well wait for the e2e, as i'm finally able to get to it now.

Copy link
Contributor Author

@sallyom sallyom Jan 3, 2019

Choose a reason for hiding this comment

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

This is, however, a good indicator that a cluster is healthy, ready to execute the e2e suite. Configuring the kubeadmin user requires a patch, takes a few minutes for the cluster to recover from that. Might want to keep this check in, but I'll close if not, since I'll have the e2e test done soonish.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why doesn't the installer handle those before handing off the cluster as "ready" ?

@wking

Copy link
Contributor

Choose a reason for hiding this comment

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

I am just very suspicious of any bash in here ..

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, this feels like something that should be part of the installer, not post installer. Or if it shouldn't, we should have a good reason not to (like we don't want the password in the clear, but the private key is in the clear, so it's kind of a wash).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@wking I don't see how this could be part of the installer?
a) Installer would run oc login and that would require oc be available?
or
b) Installer would have to vendor origin code to run the equivalent of oc login?
maybe I'm missing something, clue me in please if so.
I've opened a PR to add a smoke-4 test for kubeadmin login, instead: openshift/origin#21733

PASSWORD=$(cat /tmp/artifacts/installer/auth/kubeadmin-password)
SYSADMIN=$(oc config --config="${KUBECONFIG}" current-context)
oc config --config="${KUBECONFIG}" set-context "${SYSADMIN}"
until oc --config="${KUBECONFIG}" login -u kubeadmin -p "${PASSWORD}"; do
sleep 10
done
oc config --config="${KUBECONFIG}" use-context "${SYSADMIN}"

export KUBE_SSH_BASTION="$( oc get node -l node-role.kubernetes.io/master -o 'jsonpath={.items[0].status.addresses[?(@.type=="ExternalIP")].address}' ):22"
export KUBE_SSH_KEY_PATH=/tmp/cluster/ssh-privatekey
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,14 @@ objects:
done
# oh god the blood
sleep 180
# can remove this check once a proper test is added to origin e2e
PASSWORD=$(cat /tmp/artifacts/installer/auth/kubeadmin-password)
SYSADMIN=$(oc config --config="${KUBECONFIG}" current-context)
oc config --config="${KUBECONFIG}" set-context "${SYSADMIN}"
until oc --config="${KUBECONFIG}" login -u kubeadmin -p "${PASSWORD}"; do
sleep 10
done
oc config --config="${KUBECONFIG}" use-context "${SYSADMIN}"

export KUBE_SSH_BASTION="$( oc get node -l node-role.kubernetes.io/master -o 'jsonpath={.items[0].status.addresses[?(@.type=="ExternalIP")].address}' ):22"
export KUBE_SSH_KEY_PATH=/tmp/cluster/ssh-privatekey
Expand Down