-
Notifications
You must be signed in to change notification settings - Fork 4.7k
DO NOT MERGE: Add script to smoke test federation #14336
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
Conversation
test/extended/federation.sh
Outdated
OS_FEDERATION_NAMESPACE="${OS_FEDERATION_NAMESPACE:-federation-system}" | ||
SERVICE_ACCOUNT="system:serviceaccount:${OS_FEDERATION_NAMESPACE}:default" | ||
|
||
os::log::info "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We try not to do this -- it will print out
[INFO]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
test/extended/federation.sh
Outdated
|
||
os::log::info "" | ||
os::log::info "Deploying federation control plane" | ||
kubefed init "${OS_FEDERATION_NAME}" --dns-provider=google-clouddns \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would do a os::util::ensure::built_binary_exists kubefed
before this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
test/extended/federation.sh
Outdated
# TODO enable coredns when documentation is available | ||
os::log::info "" | ||
os::log::info "Disabling the federation services controller to avoid having to configure dnsaas" | ||
kubectl --namespace="${OS_FEDERATION_NAMESPACE}" patch deploy "${OS_FEDERATION_NAME}-controller-manager" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason not to use oc
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
test/extended/federation.sh
Outdated
|
||
os::log::info "" | ||
os::log::info "Waiting for federation api to become available" | ||
os::cmd::try_until_text "oc get --raw /healthz --config='${ADMIN_KUBECONFIG}' --context=${OS_FEDERATION_NAME}" 'ok' $(( 80 * second )) 0.25 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to
os::test::junit::declare_suite_start "extended/federation"
and
os::test::junit::declare_suite_end
If you're going to use os::cmd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also suggest wrapping the other set-up commands in os::cmd::expect_success
so that we can inspect set-up failures as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
test/extended/federation.sh
Outdated
# Ensure the controller manager will be able to access cluster configuration stored as | ||
# secrets in the federation namespace. | ||
os::log::info "" | ||
os::log::info "Granting the admin role to the service account of the federation namespace" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be os::log::debug
at most -- probably not really needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
test/extended/federation.sh
Outdated
|
||
os::log::info "" | ||
os::log::info "Running federation tests" | ||
os::test::extended::focus "$@" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How are we selecting the right --ginkgo.focus
for federation with this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
d0fd802
to
58fff0c
Compare
test/extended/federation.sh
Outdated
os::test::junit::declare_suite_start "extended/federation" | ||
|
||
os::log::info "Deploying federation control plane" | ||
os::cmd::expect_success "kubefed init '${OS_FEDERATION_NAME}' --dns-provider=google-clouddns \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when i follow this procedure against a oc cluster up
environment, it is using the quay etcd image and its in a crash loop backoff with the following message:
$ oc logs origin-federation-apiserver-528877188-k3v5z --namespace=federation-system -c etcd
2017-06-08 05:38:01.129093 I | etcdmain: etcd Version: 3.1.7
2017-06-08 05:38:01.129264 I | etcdmain: Git SHA: 43b7507
2017-06-08 05:38:01.129269 I | etcdmain: Go Version: go1.7.5
2017-06-08 05:38:01.129272 I | etcdmain: Go OS/Arch: linux/amd64
2017-06-08 05:38:01.129277 I | etcdmain: setting maximum number of CPUs to 4, total number of available CPUs is 4
2017-06-08 05:38:01.129616 I | embed: listening for peers on http://localhost:2380
2017-06-08 05:38:01.129724 I | embed: listening for client requests on localhost:2379
2017-06-08 05:38:01.129791 C | etcdmain: cannot access data directory: mkdir /var/etcd/data: permission denied
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per our discussion in standup, oc cluster up
can be used with --etcd-persistent-storage=true
which ensures /var/etc/data
will be writeable.
test/extended/federation.sh
Outdated
|
||
# Ensure the controller manager will be able to access cluster configuration stored as | ||
# secrets in the federation namespace. | ||
os::log::debug "Granting the admin role to the service account of the federation namespace" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be nice if we can create a namespace before calling kubefed so we can pre-grant this.
58fff0c
to
1ac14a0
Compare
1ac14a0
to
55bb77a
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: marun Assign the PR to them by writing No associated issue. Update pull-request body to add a reference to an issue, or get approval with The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: marun Assign the PR to them by writing No associated issue. Update pull-request body to add a reference to an issue, or get approval with The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: marun Assign the PR to them by writing No associated issue. Update pull-request body to add a reference to an issue, or get approval with The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/hold Use |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
This PR adds a script to setup and smoke test federation. Example invocation:
test/extended/federation.sh 'Federation secrets.*successfully'
This change is