Skip to content

tests: Fixes tests for Windows (containerd, RunAsUserName)#83058

Merged
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
claudiubelu:tests/windows-tests-support
Nov 15, 2019
Merged

tests: Fixes tests for Windows (containerd, RunAsUserName)#83058
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
claudiubelu:tests/windows-tests-support

Conversation

@claudiubelu
Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind failing-test

/sig windows
/sig testing

/area conformance

What this PR does / why we need it:

Since we've added support for RunAsUserName, we can now run some new tests. However, the [LinuxOnly] tag will have to remain until the WindowsRunAsUserName feature becomes enabled by default.

Additionally, Containerd supports file mounting on Windows, and some tests will be able to pass on Windows with Containerd instead of Docker.

Which issue(s) this PR fixes:

Related: #70189
Related: #68791

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. sig/windows Categorizes an issue or PR as relevant to SIG Windows. sig/testing Categorizes an issue or PR as relevant to SIG Testing. area/conformance Issues or PRs related to kubernetes conformance tests needs-priority Indicates a PR lacks a `priority/foo` label and requires one. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. area/test labels Sep 24, 2019
@claudiubelu claudiubelu force-pushed the tests/windows-tests-support branch 2 times, most recently from cf2e8d2 to da2eca6 Compare September 25, 2019 13:01
@claudiubelu
Copy link
Copy Markdown
Contributor Author

/test pull-kubernetes-node-e2e

@msau42
Copy link
Copy Markdown
Member

msau42 commented Oct 3, 2019

/assign @jingxu97

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

now we can only set userId as 1000 for linux. For current tests, it is fine. Will it become a concern in the future?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nothing changed, userid 1000 was also used before this change. Other userids can still be used.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Here it is kind of hardcoded to set user id to 1000. My point is all tests will have to share the exact same value which is defined here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't see the problem.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@jingxu97 - Before this value was split across many places, and this change defines it once. Are you saying you'd prefer the old way where 1000 was individually hardcoded in many test cases?

@claudiubelu claudiubelu force-pushed the tests/windows-tests-support branch from da2eca6 to c7bb0b2 Compare October 31, 2019 12:41
@k8s-ci-robot k8s-ci-robot added the sig/storage Categorizes an issue or PR as relevant to SIG Storage. label Oct 31, 2019
@claudiubelu
Copy link
Copy Markdown
Contributor Author

/test pull-kubernetes-e2e-gce-csi-serial

@msau42
Copy link
Copy Markdown
Member

msau42 commented Oct 31, 2019

/approve
will let @jingxu97 give final review

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bclau, msau42

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 Oct 31, 2019
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe make it as constant, so you don't need to define it multiple places?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Can't, they have to be vars. This is what happens when they're constants:

test/e2e/common/util.go:218:94: cannot take the address of nonAdminTestUserName
test/e2e/common/util.go:220:40: cannot take the address of nonRootTestUserID

Since we've added support for RunAsUserName, we can now run some new
tests. However, the [LinuxOnly] tag will have to remain until the
WindowsRunAsUserName feature becomes enabled by default.

Additionally, Containerd supports file mounting on Windows, and some
tests will be able to pass on Windows with Containerd instead of Docker.
@claudiubelu claudiubelu force-pushed the tests/windows-tests-support branch 2 times, most recently from a682790 to f0e6d8e Compare November 11, 2019 15:03
@claudiubelu
Copy link
Copy Markdown
Contributor Author

/test pull-kubernetes-conformance-kind-ipv6

@PatrickLang
Copy link
Copy Markdown
Contributor

PatrickLang commented Nov 14, 2019

/hold
I'm double checking with conformance on this re: consolidating on UID1000. Will remove hold after they decide if they want further review or not

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 14, 2019
@johnbelamaric
Copy link
Copy Markdown
Member

LGTM from a conformance point of view

@jingxu97
Copy link
Copy Markdown
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 14, 2019
@PatrickLang
Copy link
Copy Markdown
Contributor

/hold cancel
thanks @johnbelamaric and @jingxu97

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 14, 2019
@k8s-ci-robot k8s-ci-robot merged commit 0386d76 into kubernetes:master Nov 15, 2019
@k8s-ci-robot k8s-ci-robot added this to the v1.17 milestone Nov 15, 2019
claudiubelu added a commit to claudiubelu/kubernetes that referenced this pull request Nov 19, 2019
We've added the WindowsRunAsUserName feature some time ago, and it was
promoted to Beta for v1.17. We can now remove the [LinuxOnly] tag for
a few tests.

Depends On: kubernetes#83058
Depends On: kubernetes#84882
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. area/conformance Issues or PRs related to kubernetes conformance tests area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/storage Categorizes an issue or PR as relevant to SIG Storage. sig/testing Categorizes an issue or PR as relevant to SIG Testing. sig/windows Categorizes an issue or PR as relevant to SIG Windows. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants