Closed JesseDarr closed 1 year ago
It's because the base image is missing iputils
.
Likely addressed in https://github.com/vmware/powerclicore/pull/67 with the switch tomcr.microsoft.com/powershell
.
cc @nklinkachevAtVMware
Ryan
Sorry it took me so long to respond. I can confirm Test-Connection works as expected with this build. Can't wait for it to get approved.
Thank you!
Good to hear. I know @nklinkachevAtVMware was reviewing my PR last week.
Describe the bug
Test-Connection works as expected as the root user.
If you install the required packages, create a new user, and add that user to sudoers Test-Connection will timeout. This happens using both DNS and IP addresses.
I can confirm sudoers is setup and working correctly b/c I can use native executables like ping and whoami from powershell as the new user.
Reproduction steps
Expected behavior:
PS /root> whoami root PS /root> Test-Connection google.com
Destination: google.com
Ping Source Address Latency BufferSize Status (ms) (B)
---- ------ ------- ------- ---------- ------
1 f3489e2090ef 142.251.40.78 30 32 Success 2 f3489e2090ef 142.251.40.78 37 32 Success 3 f3489e2090ef 142.251.40.78 31 32 Success 4 f3489e2090ef 142.251.40.78 35 32 Success
Observed Behavior:
PS /usr/bin> whoami concord PS /usr/bin> Test-Connection google.com
Destination: google.com
Ping Source Address Latency BufferSize Status (ms) (B)
---- ------ ------- ------- ---------- ------
1 f3489e2090ef TimedOut 2 f3489e2090ef TimedOut 3 f3489e2090ef TimedOut 4 f3489e2090ef TimedOut
Additional context
All other commands from the powershell module Microsoft.Powershell.Management work without issue as the non-root user.
Building a new container from CentOS or Ubuntu base images, installing powershell and powercli, result in the non-root user being able to use Test-Connection as expected.