Repository navigation
e2e-aws-operator: Fix machinehealthcheck test - #60
vikaschoudhary16 wants to merge 1 commit into
Conversation
|
ping @cynepco3hahue |
|
/retest |
1 similar comment
|
/retest |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: enxebre The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
I added two tests because we have default behavior when the configmap does not exist with the default timeout that equals to 5 minutes. I ask to preserve tests as it was before, the single thing that can be useful is to clarify via comment why we have two tests.
|
@vikaschoudhary16 Can you provide the link where does it fail? |
|
From logs, I can see that machine was deleted by the machine health check controller, but the machine-api failed to remove finalizer And probably after it fails on |
|
I created the PR - #62, it will remove finalizer when it needs to be removed, but I think it looks like the bug under the |
@cynepco3hahue this basically says the finalizer could not be removed since the machine object on the apiserver is never than the one the machine controller actually works with. That error is expected and the machine is reconciled again. It will get removed in the next reconciliation cycle. What's important are those two lines: The first line reporting the unsuccessful Update operation. The other one saying the machine got reconciled again after some time and is to be deleted. Can you share more logs? I would expect the machine controller to eventually log something like: |
|
/hold |
207c7ca to
bd34071
Compare
|
@cynepco3hahue For me it fails consistently. Checking the machine controller logs, i can see that finalizer gets removed and machine gets deleted eventually though the test fails. When i increased test case timeout to 7 minutes, it worked. Since this failure has been seen at CI as well, i propose to increase the time out and also wrapping the test for default case in proper context message. |
|
@vikaschoudhary16 as you say: openshift/machine-api-operator#285 (comment) @cynepco3hahue it takes more than 6 minutes. In my case it took 8 minutes (without 3 seconds) to wait until a machine gets deleted. |
| stopKubeletAndValidateMachineDeletion(workerNode, workerMachine, 6*time.Minute) | ||
| Context("without node-unhealthy-conditions configmap", func() { | ||
| It("should delete unhealthy machine", func() { | ||
| stopKubeletAndValidateMachineDeletion(workerNode, workerMachine, 7*time.Minute) |
There was a problem hiding this comment.
I don't see how putting the It clause under Context help with to fix this test. It just might be the timeout that got increased that helped. We might bump the timeout to even 10 minutes. Though, that will only hide the real issue. This might also be a bug in the HC itself.
There was a problem hiding this comment.
putting IT under context is just adding correct description about test case.
5 minutes is timeout in the configmap so machine deletion get triggered after 5 minutes. With keeping test case timeout as 7 min, effectively it is waiting for 2 mins. If we still see I failures, we can debug where exactly its taking delayed. For now, i would prefer to try out 7 min timeout.
|
/test e2e-aws-operator |
|
/lgtm |
|
this test is disabled now until we get back CI stability, this change should be introduced as we enable it back so it gives a green |
|
This got obsoleted and superceded by other PRs so closing it. |
In the current test, BeforeEach() gets executed for this
It. This Before reach deletes configmap as well and when, actually[stopKubeletAndValidateMachineDeletion](https://github.com/openshift/cluster-api-actuator-pkg/blob/master/pkg/e2e/machinehealthcheck/machinehealthcheck.go#L117)gets invoked again, there is no configmap and it fails to validate node deletion. And thus test failure!!I verified this behavior running these tests locally and it occurs every time.
This PR is simplifying the nesting of BeforeEach and AfterEach. If the intention of the existing changes and this nesting is to execute stopKubeletAndValidateMachineDeletion twice for two machines, we can achieve that by simply copy pasting
ITblock in this PR.