Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/kind regression |
takoverflow
left a comment
There was a problem hiding this comment.
Thanks for looking in detail at the IT test failures and improving the flakiness.
I've added some comments, PTAL
| delay: | ||
| durationMilliseconds: 60000 | ||
| jitterDurationMilliseconds: 61000 | ||
| durationMilliseconds: 2500 |
There was a problem hiding this comment.
Why has this been reduced to such a small value?
Was the 60s delay too long for some operation?
| - key: '.metadata.annotations["kwok/fail-condition"]' | ||
| operator: 'In' | ||
| values: | ||
| - 'Recover' |
There was a problem hiding this comment.
As discussed offline, the trigger for running this stage can now be changed where the annotation key can be used to denote recovery and the value can be the timestamp when the annotation is added.
This is to allow for subsequent update events to be triggered via modification of a single annotation.
|
|
||
| // isNodePreserved reports whether the node is preserved, by checking if it carries the | ||
| // preserve taint that MCM applies when a Failed machine's node is preserved. | ||
| func isNodePreserved(node *corev1.Node) bool { |
There was a problem hiding this comment.
There's a NodeCondition with type NodePreserved that's added. Checking for its presence and state would be better IMO compared to looking for the taint.
nodeops.GetCondition(node, v1alpha1.NodePreserved)| } | ||
|
|
||
| pollingInterval := 2 * time.Second | ||
| if isSimulatedProvider { |
There was a problem hiding this comment.
This value is set in SetupBeforeSuite, which is invoked in simulatedprovider/test/integration/controller/controller_test.go after the call to NewIntegrationTestFramework so I'm not sure if its even set at this point, can you check locally if things are working as expected. I'm guessing even with the simulated provider it might still be using 2s polling period.
| gomega.Expect(mcsession.ExitCode()).Should(gomega.Equal(-1)) | ||
| ginkgo.By("Checking machineControllerManager process is running") | ||
| gomega.Expect(mcmsession.ExitCode()).Should(gomega.Equal(-1)) | ||
| ginkgo.By("Checking nodes in target cluster are healthy") |
There was a problem hiding this comment.
Are you sure getting rid of this check cannot cause problems when running IT with infra?
| } | ||
|
|
||
| // AreMachinesRunning returns boolean value indicating whether all the machines names passed to it are in the running state or not | ||
| func (c *Cluster) AreMachinesRunning(ctx context.Context, machineNames []string, namespace string) bool { |
There was a problem hiding this comment.
There's a PR now that relies on AreMachinesRunning without any preservation in context.
#1158
It might be worthwhile to have two methods now.
Signed-off-by: Gagan163264 <gagan.surathkal@gmail.com>
Signed-off-by: Gagan163264 <gagan.surathkal@gmail.com>
Signed-off-by: Gagan163264 <gagan.surathkal@gmail.com>
Signed-off-by: Gagan163264 <gagan.surathkal@gmail.com>
Signed-off-by: Gagan163264 <gagan.surathkal@gmail.com>
Signed-off-by: Gagan163264 <gagan.surathkal@gmail.com>
Signed-off-by: Gagan163264 <gagan.surathkal@gmail.com>
Signed-off-by: Gagan163264 <gagan.surathkal@gmail.com>
Signed-off-by: Gagan163264 <gagan.surathkal@gmail.com>
- Add artifact upload for logs on failure in CI - Introduce KUBE_API_QPS and KUBE_API_BURST parameters for simulated provider - Update polling interval for simulated provider tests - Modify machine status checks to improve recovery logic, add new annotation - Modify kwok config to work quicker Signed-off-by: Gagan163264 <gagan.surathkal@gmail.com>
Signed-off-by: Gagan163264 <gagan.surathkal@gmail.com>
Signed-off-by: Gagan163264 <gagan.surathkal@gmail.com>
Signed-off-by: Gagan163264 <gagan.surathkal@gmail.com>
Signed-off-by: Gagan163264 <gagan.surathkal@gmail.com>
Signed-off-by: Gagan163264 <gagan.surathkal@gmail.com>
Signed-off-by: Gagan163264 <gagan.surathkal@gmail.com>
Signed-off-by: Gagan163264 <gagan.surathkal@gmail.com>
Signed-off-by: Gagan163264 <gagan.surathkal@gmail.com>
Signed-off-by: Gagan163264 <gagan.surathkal@gmail.com>
Signed-off-by: Gagan163264 <gagan.surathkal@gmail.com>
/kind flake
What this PR does / why we need it:
This PR addresses some bugs in MCM surfaced by integration tests on kwok:
AutoPreserveFailedMachineMaxreduction tests result in deletion of both machinesAutoPreserveFailedMachineMaxwas reduced (2 -> 1), the controller unpreserved both machines instead of one, and both got deleted.Status.AutoPreserveFailedMachineCountand wrote it to the API server but it hadn't yet been persisted in the lister cache . The second still read the stale count (2), thought it needed to remove one more, and unpreserved the second machine too.Status.AutoPreserveFailedMachineCount. A second reconcile then sees the reduced count and does nothing. The oldest machine is un-preserved first. Added unit tests inmachineset_test.goto cover these cases.Other changes to address a set of flakes in the existing integration tests.
Manual Preservationtests (from 3 inauto-preservationtests) terminated a machine that got picked up by a test spec.BeforeEachnode readiness check stalls on a preserved nodenodes.go,kwok-config.yaml"kwok/fail-condition":"Recover","kwok/recovery-attempts":"%d"annotations on every poll interval to trigger an update edge on the node for the kwok controller. Also tighten the kwoknode-recoverstage (immediateNextStage: true) so recovering nodes come back faster. RenamedaddNodeRecoverAnnotationtoattemptNodeRecovery, and changed it to use a strategic-mergePatchto avoid update conflicts while the node is recovering.Other changes/improvements:
- Added more detailed logging in
framework.gowhich now tells exactly which machine a test is being executed on.- Extracted functions with reuse value as helpers from changes done for
Bug #1- Make target to easily export kubeconfig of a simulated cluster.
- Changed constants in
kwok-config.yamlto more tighter values to make the average test runtime faster.- Requeue preserved machines immediately after their PreserveExpiryTime to avoid them potentially waiting a full reconcile (10mins).
- Delete MCDs before running the
orphaned resourcestest, as a test failure can leave the mcd still on the cluster causing this test to hang waiting for non-terminating VMs.- Upload mc and mcm process logs to the actions run in the event of a failure, for easy diagnosis.
Special notes for Reviewers
Current runtime statistics
Release note: