Skip to content

test: Set num-nodes flag#16176

Merged
k8s-ci-robot merged 1 commit into
kubernetes:masterfrom
borg-land:ginkgo-flags
Jan 20, 2024
Merged

test: Set num-nodes flag#16176
k8s-ci-robot merged 1 commit into
kubernetes:masterfrom
borg-land:ginkgo-flags

Conversation

@upodroid
Copy link
Copy Markdown
Member

There is a bug in the test framework where the -num-nodes flag must be explicitly set to avoid tests being skipped. It should be autocalculated but it is not working as intended.

image

Also, node-os-distro should be set to skip various tests that are OS specific in the kubernetes e2e test suite.

@dims

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 15, 2023
@upodroid
Copy link
Copy Markdown
Member Author

/cc @hakman

@k8s-ci-robot k8s-ci-robot requested a review from hakman December 15, 2023 15:54
@upodroid
Copy link
Copy Markdown
Member Author

/retest

this is ready to be merged

ig = v
}
}
numNodes := int(*ig.Spec.MaxSize) // we assume that MinSize = Maxsize, this is true for e2e testing
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This will be the size of the last nodes InstanceGroup. Should we instead sum the max size of all nodes InstanceGroups?

Copy link
Copy Markdown
Member Author

@upodroid upodroid Dec 21, 2023

Choose a reason for hiding this comment

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

No, the ginkgo wants the number of all nodes except the master/controplane IG. When we are using kops for e2e testing we assume there are exactly 2 IGs(one master and one worker). If we add the master ig to the count, you'll have an extra node that you can't schedule workloads onto without tweaking manifests to tolerate control plane taints

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah I was thinking in the case of there being multiple nodes IGs. This tester code can be used in cluster configurations that have multiple node IGs so I don't know if your assumption is always true.

Comment thread tests/e2e/kubetest2-kops/deployer/up.go Outdated

const (
skipRegexBase = "\\[Slow\\]|\\[Serial\\]|\\[Disruptive\\]|\\[Flaky\\]|\\[Feature:.+\\]|nfs|NFS|Gluster"
skipRegexBase = "\\[Slow\\]|\\[Serial\\]|\\[Disruptive\\]|\\[Flaky\\]|\\[Feature:.+\\]|nfs|NFS|Gluster|NodeProblemDetector"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I tried to adjust the prow job generator and it caused a big mess. We run ubuntu by default so it would need to be running most of the time. It is easier to skip, will open a PR in k/k now to park this behind a Feature tag

@upodroid
Copy link
Copy Markdown
Member Author

/retest

We merged a PR in k/k to stop running NPD tests, the skip is needed for release branches

Comment thread tests/e2e/pkg/tester/tester.go Outdated
distro := CalculateDistroFromIG(ig)
if distro != "" {
klog.Infof("Setting --node-os-distro=%s", distro)
t.TestArgs += " --node-os-distro=" + distro
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Don't remember, did we say we will move this to the generator for now?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is ready to merged

@upodroid upodroid changed the title set node-os-distro and num-nodes flags set num-nodes flags Jan 20, 2024
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 20, 2024
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 20, 2024
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 20, 2024
@hakman hakman changed the title set num-nodes flags test: Set num-nodes flag Jan 20, 2024
@hakman hakman added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Jan 20, 2024
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 20, 2024
@hakman
Copy link
Copy Markdown
Member

hakman commented Jan 20, 2024

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 20, 2024
@k8s-ci-robot k8s-ci-robot merged commit 2cd7993 into kubernetes:master Jan 20, 2024
@k8s-ci-robot k8s-ci-robot added this to the v1.29 milestone Jan 20, 2024
zetaab pushed a commit to zetaab/kops that referenced this pull request Jan 22, 2024
Co-authored-by: upodroid <upodroid@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants