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
Bug 1744984: Add e2e test for kube controller manager lease configmap deletion #311
Bug 1744984: Add e2e test for kube controller manager lease configmap deletion #311
Conversation
@damemi: This pull request references Bugzilla bug 1744984, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. In response to this:
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. |
/retest |
test/e2e/operator_test.go
Outdated
_, err = kubeClient.AppsV1().ReplicaSets(operatorclient.OperatorNamespace).Create(replicaSet) | ||
if err != nil { | ||
t.Fatal(err) | ||
} |
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're missing a bit where you wait and verify if that replica set actually run and KCM recovered.
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.
Updated to add a wait loop that looks for pods created with the replicaset labels, that would indicate the KCM has recovered right?
9cd6ba9
to
1016466
Compare
test/e2e/operator_test.go
Outdated
} | ||
} | ||
|
||
// Now try to create a replicaset and see that it is successfully created by the 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.
wait for the original pods to be gone before creating this.
test/e2e/operator_test.go
Outdated
} | ||
|
||
// Get all the currently running KCM pods, and then delete them | ||
pods, err := kubeClient.CoreV1().Pods("openshift-kube-controller-manager").List(metav1.ListOptions{}) |
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.
this is pointless
test/e2e/operator_test.go
Outdated
}, | ||
}, | ||
} | ||
_, err = kubeClient.AppsV1().ReplicaSets(operatorclient.OperatorNamespace).Create(replicaSet) |
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.
because the pods aren't gone, this doesn't matter
ef569c6
to
64c65ca
Compare
test/e2e/operator_test.go
Outdated
} | ||
|
||
// Check to see that the configmap then gets recreated | ||
wait.Poll(time.Second*5, time.Second*300, func() (bool, error) { |
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 forgot to check this error.
test/e2e/operator_test.go
Outdated
// Check to see that the configmap then gets recreated | ||
wait.Poll(time.Second*5, time.Second*300, func() (bool, error) { | ||
_, err := kubeClient.CoreV1().ConfigMaps("kube-system").Get("kube-controller-manager", metav1.GetOptions{}) | ||
if err != nil { |
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.
if errors.IsNotFound(err){
return false, nil
}
if err != nil{
return false, err
}
return true, nil
64c65ca
to
87dfc9b
Compare
/lgtm |
/retest Please review the full test history for this PR and help us cut down flakes. |
4 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
@damemi: This pull request references Bugzilla bug 1744984, which is invalid:
Comment In response to this:
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. |
/retest |
kind: Role | ||
metadata: | ||
namespace: kube-system | ||
name: system:openshift:leader-election-lock-cluster-policy-controller |
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.
this name doesn't match what you're binding to. This is a general leader election role
- get | ||
- list | ||
- watch | ||
- create |
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.
only create needs to be unconstrained by names. The rest can use the stock role, right?
b4023d6
to
98ea815
Compare
98ea815
to
263dd58
Compare
@deads2k updated with your feedback, thanks |
/bugzilla refresh |
@damemi: This pull request references Bugzilla bug 1744984, which is valid. In response to this:
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. |
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.
/lgtm
/hold cancel
/cherry-pick release-4.3 |
@soltysh: once the present PR merges, I will cherry-pick it on top of release-4.3 in a new PR and assign it to you. In response to this:
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. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: damemi, deads2k, soltysh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
@damemi: All pull requests linked via external trackers have merged. Bugzilla bug 1744984 has been moved to the MODIFIED state. In response to this:
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. |
@soltysh: new pull request created: #321 In response to this:
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. |
This is a work in progress, trying to create a simple e2e that deletes the KCM configmap then attempts to create a replicaset to see if KCM recovered from the deletion, as described here: https://bugzilla.redhat.com/show_bug.cgi?id=1744984