-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Copy netapi32.dll
from servercore image in nano-based Windows image
#9006
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
L3n41c
force-pushed
the
lenaic/fix_windows_nano_netapi32
branch
2 times, most recently
from
August 27, 2021 14:24
8df1756
to
ff81bee
Compare
vboulineau
approved these changes
Aug 27, 2021
julien-lebot
approved these changes
Aug 27, 2021
L3n41c
force-pushed
the
lenaic/fix_windows_nano_netapi32
branch
from
August 30, 2021 14:06
ff81bee
to
1c04784
Compare
vboulineau
reviewed
Aug 30, 2021
@@ -10,6 +16,11 @@ USER ContainerAdministrator | |||
|
|||
SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop';"] | |||
|
|||
RUN if (-not (Test-Path /Windows/System32/netapi32.dll)) { \ | |||
Copy-Item /netapi32.dll -Destination /Windows/System32/netapi32.dll \ |
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.
You can use Move-Item
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.
Good point.
Note that this doesn’t remove the need for the if
as both are failing to overwrite an existing file:
Step 7/7 : RUN Move-Item /netapi32.dll -Destination /Windows/System32/netapi32.dll -Force
---> Running in 62d4374fc7ec
Move-Item: Cannot create a file when that file already exists.
To fix the following failure: ``` panic: Failed to load netapi32.dll: The specified module could not be found. goroutine 1 [running]: syscall.(*LazyProc).mustFind(...) c:/go/src/syscall/dll_windows.go:320 syscall.(*LazyProc).Addr(...) c:/go/src/syscall/dll_windows.go:327 syscall.NetGetJoinInformation(0x0, 0xc00061fa48, 0xc00061fa44, 0x16, 0xc0000c96e0) c:/go/src/syscall/zsyscall_windows.go:1804 +0x107 os/user.isDomainJoined(0xc00061faa0, 0xf3624e, 0x0) c:/go/src/os/user/lookup_windows.go:18 +0x5a os/user.lookupFullName(0xc000063b30, 0xc, 0xc000259bc0, 0x16, 0xc0000c96e0, 0x23, 0x16, 0xc0000c96e0, 0x23, 0x1) c:/go/src/os/user/lookup_windows.go:51 +0x2d os/user.newUser(0xc000063ad0, 0xc, 0xc000063b10, 0xc, 0xc0000c9680, 0x1f, 0xc000259bc0, 0x16, 0xc000063b30, 0xc, ...) c:/go/src/os/user/lookup_windows.go:181 +0xd4 os/user.current(0x0, 0x0, 0x0) c:/go/src/os/user/lookup_windows.go:225 +0x2d8 os/user.Current.func1() c:/go/src/os/user/lookup.go:15 +0x29 sync.(*Once).doSlow(0x593ff00, 0x40b75b0) c:/go/src/sync/once.go:66 +0xf7 sync.(*Once).Do(...) c:/go/src/sync/once.go:57 os/user.Current(0xc0002599c0, 0x1b, 0x3f56005) c:/go/src/os/user/lookup.go:15 +0x105 github.com/golang/glog.init.1() C:/gomodcache/github.com/golang/[email protected]/gomodcache/github.com/golang/[email protected]/glog_file.go:63 +0x4b ``` This ugly hack is needed because the [bump of github.com/dgraph-io/ristretto from 0.0.3 to 0.1.0][1] [introduced a new dependency to `glog`][2] which is triggering the following issue with the Windows nano docker image: [3] Once [3] is solved, this hack can be reverted. [1] #8500 [2] dgraph-io/ristretto#263 [3] microsoft/Windows-Containers#72
L3n41c
force-pushed
the
lenaic/fix_windows_nano_netapi32
branch
from
August 30, 2021 16:31
1c04784
to
eeed24b
Compare
vboulineau
approved these changes
Aug 30, 2021
L3n41c
added a commit
that referenced
this pull request
Sep 2, 2021
…#9006) To fix the following failure: ``` panic: Failed to load netapi32.dll: The specified module could not be found. goroutine 1 [running]: syscall.(*LazyProc).mustFind(...) c:/go/src/syscall/dll_windows.go:320 syscall.(*LazyProc).Addr(...) c:/go/src/syscall/dll_windows.go:327 syscall.NetGetJoinInformation(0x0, 0xc00061fa48, 0xc00061fa44, 0x16, 0xc0000c96e0) c:/go/src/syscall/zsyscall_windows.go:1804 +0x107 os/user.isDomainJoined(0xc00061faa0, 0xf3624e, 0x0) c:/go/src/os/user/lookup_windows.go:18 +0x5a os/user.lookupFullName(0xc000063b30, 0xc, 0xc000259bc0, 0x16, 0xc0000c96e0, 0x23, 0x16, 0xc0000c96e0, 0x23, 0x1) c:/go/src/os/user/lookup_windows.go:51 +0x2d os/user.newUser(0xc000063ad0, 0xc, 0xc000063b10, 0xc, 0xc0000c9680, 0x1f, 0xc000259bc0, 0x16, 0xc000063b30, 0xc, ...) c:/go/src/os/user/lookup_windows.go:181 +0xd4 os/user.current(0x0, 0x0, 0x0) c:/go/src/os/user/lookup_windows.go:225 +0x2d8 os/user.Current.func1() c:/go/src/os/user/lookup.go:15 +0x29 sync.(*Once).doSlow(0x593ff00, 0x40b75b0) c:/go/src/sync/once.go:66 +0xf7 sync.(*Once).Do(...) c:/go/src/sync/once.go:57 os/user.Current(0xc0002599c0, 0x1b, 0x3f56005) c:/go/src/os/user/lookup.go:15 +0x105 github.com/golang/glog.init.1() C:/gomodcache/github.com/golang/[email protected]/gomodcache/github.com/golang/[email protected]/glog_file.go:63 +0x4b ``` This ugly hack is needed because the [bump of github.com/dgraph-io/ristretto from 0.0.3 to 0.1.0][1] [introduced a new dependency to `glog`][2] which is triggering the following issue with the Windows nano docker image: [3] Once [3] is solved, this hack can be reverted. [1] #8500 [2] dgraph-io/ristretto#263 [3] microsoft/Windows-Containers#72
5 tasks
zandrewitte
pushed a commit
to StackVista/stackstate-agent
that referenced
this pull request
Nov 17, 2022
…DataDog#9006) To fix the following failure: ``` panic: Failed to load netapi32.dll: The specified module could not be found. goroutine 1 [running]: syscall.(*LazyProc).mustFind(...) c:/go/src/syscall/dll_windows.go:320 syscall.(*LazyProc).Addr(...) c:/go/src/syscall/dll_windows.go:327 syscall.NetGetJoinInformation(0x0, 0xc00061fa48, 0xc00061fa44, 0x16, 0xc0000c96e0) c:/go/src/syscall/zsyscall_windows.go:1804 +0x107 os/user.isDomainJoined(0xc00061faa0, 0xf3624e, 0x0) c:/go/src/os/user/lookup_windows.go:18 +0x5a os/user.lookupFullName(0xc000063b30, 0xc, 0xc000259bc0, 0x16, 0xc0000c96e0, 0x23, 0x16, 0xc0000c96e0, 0x23, 0x1) c:/go/src/os/user/lookup_windows.go:51 +0x2d os/user.newUser(0xc000063ad0, 0xc, 0xc000063b10, 0xc, 0xc0000c9680, 0x1f, 0xc000259bc0, 0x16, 0xc000063b30, 0xc, ...) c:/go/src/os/user/lookup_windows.go:181 +0xd4 os/user.current(0x0, 0x0, 0x0) c:/go/src/os/user/lookup_windows.go:225 +0x2d8 os/user.Current.func1() c:/go/src/os/user/lookup.go:15 +0x29 sync.(*Once).doSlow(0x593ff00, 0x40b75b0) c:/go/src/sync/once.go:66 +0xf7 sync.(*Once).Do(...) c:/go/src/sync/once.go:57 os/user.Current(0xc0002599c0, 0x1b, 0x3f56005) c:/go/src/os/user/lookup.go:15 +0x105 github.com/golang/glog.init.1() C:/gomodcache/github.com/golang/[email protected]/gomodcache/github.com/golang/[email protected]/glog_file.go:63 +0x4b ``` This ugly hack is needed because the [bump of github.com/dgraph-io/ristretto from 0.0.3 to 0.1.0][1] [introduced a new dependency to `glog`][2] which is triggering the following issue with the Windows nano docker image: [3] Once [3] is solved, this hack can be reverted. [1] DataDog#8500 [2] dgraph-io/ristretto#263 [3] microsoft/Windows-Containers#72
zandrewitte
pushed a commit
to StackVista/stackstate-agent
that referenced
this pull request
Nov 17, 2022
…ws image (DataDog#9006)" (DataDog#9051) This reverts commit 89b2770.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Copy
netapi32.dll
from servercore Windows image into nano-based agent Windows image.Motivation
Fix the following failure:
Additional Notes
This ugly hack is needed because the bump of github.com/dgraph-io/ristretto from 0.0.3 to 0.1.0 introduced a new dependency to
glog
which is triggering this issue with the Windows nano docker image.Once the Windows nano issue is solved, this hack can be reverted.
Describe how to test your changes
Start the non-
servercore
Windows docker image.It shouldn’t panic anymore.
Checklist
changelog/no-changelog
label has been applied.need-change/operator
andneed-change/helm
labels has been applied if applicable.team/..
label has been applied, if known.Triage
milestone is set.Note: Adding GitHub labels is only possible for contributors with write access.