Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

e2e: add delete apiserver test #539

Merged
merged 3 commits into from
May 24, 2017
Merged

Conversation

peebs
Copy link

@peebs peebs commented May 23, 2017

Also adds a work-around for hashicorp/terraform#1885

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 23, 2017
@peebs peebs force-pushed the api-del branch 5 times, most recently from 103db9c to 940b11c Compare May 24, 2017 19:48
@peebs
Copy link
Author

peebs commented May 24, 2017

rktbot run e2e

1 similar comment
@peebs
Copy link
Author

peebs commented May 24, 2017

rktbot run e2e

@peebs
Copy link
Author

peebs commented May 24, 2017

rktbot run e2e

@peebs
Copy link
Author

peebs commented May 24, 2017

rktbot run e2e

@peebs
Copy link
Author

peebs commented May 24, 2017

Tests are passing. The most recent pluton run had a flake, but the tests that actually run the code in this PR passed twice in a row now.

Copy link
Contributor

@derekparker derekparker left a comment

Choose a reason for hiding this comment

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

Looks good, just a few questions, nits and such.

if err := retry(15, 10*time.Second, podsReady); err != nil {
return fmt.Errorf("Waited 150 seconds for etcd to scale: %v", err)
if err := retry(31, 10*time.Second, podsReady); err != nil {
return fmt.Errorf("Waited 300 seconds for etcd to scale: %v", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be 310, no?

Copy link
Author

Choose a reason for hiding this comment

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

You would think, but the retry function actually will do N retries and N-1 pauses. So try -> pause -> try -> pause -> try It doesn't pause after the last try.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, got it. Thanks.

role = "${aws_iam_role.bk_role.id}"

provisioner "local-exec" {
command = "sleep 90"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need this sleep?

Copy link
Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

👍 -- would you mind throwing in a link to that issue?

Copy link
Author

Choose a reason for hiding this comment

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

I included it in the commit, adding it to PR text as well

// apiserver to go down the next step will return sucess before the
// apiserver is ever destroyed.
waitDestroy := func() error {
_, err := client.CoreV1().Pods(namespace).List(metav1.ListOptions{LabelSelector: "k8s-app=kube-apiserver"})
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Could just do a simpler request to the version endpoint or something, if you're just checking that the API server is up and reachable.

Copy link
Author

Choose a reason for hiding this comment

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

I'm fine with this. Offhand do you know the client-go function to call for this (not obvious to me with a bit of searching other then using the rest-client for which the error handling looks weirder)

Copy link
Author

Choose a reason for hiding this comment

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

done


// wait until api server is back up
waitAPI := func() error {
_, err := client.CoreV1().Pods(namespace).List(metav1.ListOptions{LabelSelector: "k8s-app=kube-apiserver"})
Copy link
Contributor

Choose a reason for hiding this comment

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

Same nit.

Copy link
Author

Choose a reason for hiding this comment

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

done

@peebs
Copy link
Author

peebs commented May 24, 2017

rktbot run e2e

@peebs
Copy link
Author

peebs commented May 24, 2017

@derekparker PTAL should be ready to go.

Copy link
Contributor

@derekparker derekparker left a comment

Choose a reason for hiding this comment

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

lgtm

@peebs peebs merged commit deb04e0 into kubernetes-retired:master May 24, 2017
@peebs peebs deleted the api-del branch May 24, 2017 23:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants