-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Add --device support for Windows #37638
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of minor nits for strings. Code LGTM
@johnstep PTAL |
Codecov Report
@@ Coverage Diff @@
## master #37638 +/- ##
==========================================
- Coverage 36.12% 36.08% -0.04%
==========================================
Files 610 610
Lines 45244 45234 -10
==========================================
- Hits 16343 16323 -20
- Misses 26660 26669 +9
- Partials 2241 2242 +1 |
@johnstep - All CI has passed except experimental which failed due to Swarm (unrelated in any way to this change that I can tell). Mind taking another look? |
I cannot find the failed build on Jenkins, after it was restarted, but it might have been one of the known flaky tests., possibly DockerSwarmSuite.TestSwarmClusterRotateUnlockKey in the list here: #37306. |
@jhowardmsft @johnstep - I made a mistake in the vendor release on HCSShim for |
@jterry75 Restarted, but unfortunately needs another rebase |
I am going to have to make a new release of hcsshim. I didn't realize you had an outstanding merge. Will rebase this AM |
@jhowardmsft - |
RS5 CI is hawked at the moment. Investigating why. Restarting the other jobs - failures are unrelated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@johnstep PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but see a couple comments. Thanks!
Implements the --device forwarding for Windows daemons. This maps the physical device into the container at runtime. Ex: docker run --device="class/<clsid>" <image> <cmd> Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
@johnstep - PTAL. After adding the errors checks you requested we do need the |
Looks good. |
// AssignedDevice represents a device that has been directly assigned to a container | ||
// | ||
// NOTE: Support added in RS5 | ||
type AssignedDevice = schema1.AssignedDevice |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just noticed the -1
in this release, and wondered why; that's when I noticed this was added in v0.7.9-1 https://github.com/Microsoft/hcsshim/blob/v0.7.9-1/interface.go#L20-L23, but;
- not present in v0.7.10 https://github.com/Microsoft/hcsshim/blob/v0.7.10/interface.go
- not present in v0.7.11 https://github.com/Microsoft/hcsshim/blob/v0.7.11/interface.go
- not present in v0.7.12 https://github.com/Microsoft/hcsshim/blob/v0.7.12/interface.go
- added again in v0.7.12-1 https://github.com/Microsoft/hcsshim/blob/v0.7.12-1/interface.go#L20-L23
- not present in v0.7.13 https://github.com/Microsoft/hcsshim/blob/v0.7.13/interface.go
- added again in v0.7.14 https://github.com/Microsoft/hcsshim/blob/v0.7.14/interface.go#L20-L23
- present in all 0.8.x versions
Curious; was it not possible to either update to (e.g.) a new v0.7.x
version (v0.7.14
), or update to v0.8.x
? (I assumed the hcsshim repository used SemVer, so updating to newer patch releases wouldn't break things)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately hcsshim was not using SymVer correctly at the time of these releases. The minimal change to docker was to make this spot fix to the v0.7.9 release + this one commit. This change is already part of master in the v0.8.x releases as you see and the v0.8.x releases are properly using SymVer from now on. When we update docker to one of those releases (much bigger change) we will no longer need this spot fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, strictly it's still 0.x, so breaking changes are allowed 😅
My concern was that if there's bugfixes in hcsshim, and more recent (0.7.x) versions have breaking changes, we wouldn't be able to update to those versions, unless those fixes are backported to (e.g.) v0.7.12-2
.
Are there any breaking changes between v0.7.12
and v0.7.14
that currently prevent us from updating to the latest 0.7.x version? microsoft/hcsshim@v0.7.9...v0.7.14
If there are; are those changes addressable in the moby codebase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jhowardmsft - Is likely better equip to answer that question. My assumption is that if we need a v0.7 release we will have to carry this fix as you say. But hopefully when @jhowardmsft is ready we will just move to the v0.8.x releases. I am not aware of any breaking changes for the v1 API's that Docker uses
Implements the --device forwarding for Windows daemons. This maps the physical
device into the container at runtime.
Ex:
docker run --device="class/"
Signed-off-by: Justin Terry (VM) juterry@microsoft.com
@jhowardmsft - FYI