Skip to content
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

Port deviceManager to windows container manager to enable GPU access #80917

Merged
merged 1 commit into from Jul 18, 2020

Conversation

aarnaud
Copy link
Contributor

@aarnaud aarnaud commented Aug 2, 2019

What type of PR is this?
/kind feature

What this PR does / why we need it:

Port the devicemanager to Windows node to allow device plugins.

An important device plugin (not part of this PR) is the directx device plugin for GPU access: https://github.com/aarnaud/k8s-directx-device-plugin

This is required for machine learning, high-performance computing and computer graphics under Windows using the GPU.

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot
Copy link
Contributor

Welcome @aarnaud!

It looks like this is your first PR to kubernetes/kubernetes 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/kubernetes has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 2, 2019
@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


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. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Aug 2, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @aarnaud. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. area/kubelet sig/node Categorizes an issue or PR as relevant to SIG Node. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Aug 2, 2019
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Aug 2, 2019
@thomacos
Copy link

thomacos commented Sep 5, 2019

@derekwaynecarr @sjenning @RenaudWasTaken
We would be also very interested into that feature as soon as possible.

@aarnaud
Copy link
Contributor Author

aarnaud commented Sep 5, 2019

I hope this PR would be merge.

@thomacos Until merge you can find some build here : https://github.com/aarnaud/k8s-directx-device-plugin/releases

@thomacos
Copy link

thomacos commented Sep 5, 2019

I hope this PR would be merge.

@thomacos Until merge you can find some build here : https://github.com/aarnaud/k8s-directx-device-plugin/releases

That's great!
We just started into looking compiling kubelet.exe (and k8s-directx-device-plugin.exe) ourself, but this makes it way easier for us.
Thanks a lot!

Nevertheless, let's hope this PR finds its way into the official releases, too.

@aarnaud
Copy link
Contributor Author

aarnaud commented Sep 5, 2019

Also depends of your windows version you have to edit c:\k\start-kubelet.ps1

...
ipmo $helper
 
#Add this line below
Remove-Item c:\var\lib\kubelet\device-plugins\kubelet.sock -ErrorAction Ignore
 
if ($RegisterOnly.IsPresent)
{
    RegisterNode
    exit
}
...

There is a lite issue for Linux Socket on Windows c:\var\lib\kubelet\device-plugins\kubelet.sock

Tested on windows server 2019 with docker 19.03

@thomacos
Copy link

thomacos commented Sep 5, 2019

Works like charm!
Thanks again!

@aarnaud
Copy link
Contributor Author

aarnaud commented Oct 29, 2019

hi, this PR is ok for you? when can i expect to be merged

@matthyx
Copy link
Contributor

matthyx commented Nov 15, 2019

/cc
/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 15, 2019
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 16, 2020
@michmike
Copy link
Contributor

@yujuhong or @dchen1107 can you please approve?
/assign @dchen1107

@thomacos
Copy link

@yujuhong or @dchen1107 can you please approve?
/assign @dchen1107

Would sending a candy box to @yujuhong and @dchen1107 help getting their attention?

@thomacos
Copy link

thomacos commented Jul 17, 2020

@klueska
Can you approve this PR?
It falls into your expertise area of device plugins and GPU access.
It is already approved by sig-windows.
The failing tests are unrelated to this PR and are not blocking, see #80917 (comment).

@klueska
Copy link
Contributor

klueska commented Jul 17, 2020

The PR itself is pretty straightforward and isolated to a windows-specific file.

My only hesitations in approving are therefore:

  1. I'm not very familiar with windows, so I would want confirmation from sig-windows that this is approved on their end
  2. There are no tests associated with this change, so it's hard to verify that it actually does what is expected

From @ddebroy 's comment above is seems that people are generally OK with the lack of tests so long as #88554 is worked on soon. I am OK with this too.

Can someone from sig-windows drop a final comment about their approval?

@michmike
Copy link
Contributor

The PR itself is pretty straightforward and isolated to a windows-specific file.

My only hesitations in approving are therefore:

  1. I'm not very familiar with windows, so I would want confirmation from sig-windows that this is approved on their end
  2. There are no tests associated with this change, so it's hard to verify that it actually does what is expected

From @ddebroy 's comment above is seems that people are generally OK with the lack of tests so long as #88554 is worked on soon. I am OK with this too.

Can someone from sig-windows drop a final comment about their approval?

hi @klueska , sig-windows approves this. Deep Debroy is the TL for sig-windows and i am the co-chair for sig-windows

@klueska
Copy link
Contributor

klueska commented Jul 17, 2020

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aarnaud, klueska, michmike, thomacos

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 /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 Jul 17, 2020
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@thomacos
Copy link

@klueska Thank you for the quick action!

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Jul 18, 2020

@aarnaud: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-kubernetes-local-e2e a30f040cd1d04f4617c3154a9d451434e563982b link /test pull-kubernetes-local-e2e
pull-kubernetes-cross a30f040cd1d04f4617c3154a9d451434e563982b link /test pull-kubernetes-cross
pull-kubernetes-e2e-gce-alpha-features a30f040cd1d04f4617c3154a9d451434e563982b link /test pull-kubernetes-e2e-gce-alpha-features
pull-kubernetes-e2e-aks-engine-azure a30f040cd1d04f4617c3154a9d451434e563982b link /test pull-kubernetes-e2e-aks-engine-azure
pull-kubernetes-e2e-gce-iscsi-serial a30f040cd1d04f4617c3154a9d451434e563982b link /test pull-kubernetes-e2e-gce-iscsi-serial
pull-kubernetes-e2e-gce-storage-slow a30f040cd1d04f4617c3154a9d451434e563982b link /test pull-kubernetes-e2e-gce-storage-slow
pull-kubernetes-e2e-gce-iscsi a30f040cd1d04f4617c3154a9d451434e563982b link /test pull-kubernetes-e2e-gce-iscsi
pull-kubernetes-conformance-image-test a30f040cd1d04f4617c3154a9d451434e563982b link /test pull-kubernetes-conformance-image-test
pull-kubernetes-e2e-gce-network-proxy-grpc a30f040cd1d04f4617c3154a9d451434e563982b link /test pull-kubernetes-e2e-gce-network-proxy-grpc
pull-kubernetes-e2e-azure-disk a30f040cd1d04f4617c3154a9d451434e563982b link /test pull-kubernetes-e2e-azure-disk
pull-publishing-bot-validate a30f040cd1d04f4617c3154a9d451434e563982b link /test pull-publishing-bot-validate
pull-kubernetes-e2e-azure-disk-vmss a30f040cd1d04f4617c3154a9d451434e563982b link /test pull-kubernetes-e2e-azure-disk-vmss
pull-kubernetes-e2e-gce-csi-serial a30f040cd1d04f4617c3154a9d451434e563982b link /test pull-kubernetes-e2e-gce-csi-serial
pull-kubernetes-e2e-gce-storage-snapshot a30f040cd1d04f4617c3154a9d451434e563982b link /test pull-kubernetes-e2e-gce-storage-snapshot
pull-kubernetes-e2e-gce-network-proxy-http-connect a30f040cd1d04f4617c3154a9d451434e563982b link /test pull-kubernetes-e2e-gce-network-proxy-http-connect
pull-kubernetes-e2e-gci-gce-autoscaling a30f040cd1d04f4617c3154a9d451434e563982b link /test pull-kubernetes-e2e-gci-gce-autoscaling
pull-kubernetes-e2e-gci-gce-ipvs a30f040cd1d04f4617c3154a9d451434e563982b link /test pull-kubernetes-e2e-gci-gce-ipvs
pull-kubernetes-e2e-azure-file a30f040cd1d04f4617c3154a9d451434e563982b link /test pull-kubernetes-e2e-azure-file
pull-kubernetes-e2e-azure-file-windows 056d73b link /test pull-kubernetes-e2e-azure-file-windows
pull-kubernetes-e2e-azure-disk-windows 056d73b link /test pull-kubernetes-e2e-azure-disk-windows

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@k8s-ci-robot k8s-ci-robot merged commit 242f3d9 into kubernetes:master Jul 18, 2020
@thomacos
Copy link

thomacos commented Jul 19, 2020

It seems that this PR will make it into the 1.19.0-rc.2 release.
Great!
GPU access under Windows is a very useful feature for many use cases.
Thanks to all, especially of course to @aarnaud, both for this PR and the directx device plugin!
And yes, the next step is #88554.

@liggitt
Copy link
Member

liggitt commented Jul 20, 2020

Opened #93263 with a revert of this since it fails windows kubelet startup

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Jul 21, 2020
@liggitt
Copy link
Member

liggitt commented Jul 21, 2020

revert is merged, please verify azure CI jobs pass as part of reintroducing this

@thomacos
Copy link

So it seems to me that going back to the separate default paths for Windows is the natural right choice:

  1. It easily fixes the issue.
  2. It reflects the fundamental difference of what constitutes an absolute path under Windows versus Linux.
  3. It is exactly what was approved by @ddebroy from sig-windows, when he said in his Feb 14: "Is it possible to separate out only the DevicePluginPath const into the constants_windows.go and keep the rest of the constants in constants.go?".

So what are the next steps?
@aarnaud creating a fresh new pull request? Or can an existing PR reintroduced?

@thomacos
Copy link

/reopen

@k8s-ci-robot
Copy link
Contributor

@thomacos: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

/reopen

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.

@thomacos
Copy link

thomacos commented Jul 21, 2020

@aarnaud, what do you think about the following?
Can you go back to the separate default paths for Windows as I suggested in #80917 (comment).
And then /reopen this pull request?

Obviously this PR won't get into 1.19 anymore. But Code Thaw is today. So I would suggest to aim for getting the fixed version approved and merged as soon as possible before it gets forgotten again.

@k8s-ci-robot
Copy link
Contributor

@aarnaud: Failed to re-open PR: state cannot be changed. The pull request cannot be reopened.

In response to this:

/reopen

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.

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/kubelet cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note-none Denotes a PR that doesn't merit a release note. sig/node Categorizes an issue or PR as relevant to SIG Node. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet