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

Fix the top command on Windows #2038

Merged
merged 1 commit into from Mar 21, 2023

Conversation

dardelean
Copy link
Contributor

@dardelean dardelean commented Feb 20, 2023

The top command did not work for Windows before, the containerTop() function was not implemented.

Signed-off-by: Dan Ardelean dardelean@cloudbasesolutions.com

@AkihiroSuda AkihiroSuda added the platform/Windows/Non-WSL2 Microsoft Windows (non-WSL2) label Feb 21, 2023
@AkihiroSuda
Copy link
Member

CI failing

These files were modified:
  
   M go.mod
  
  Content of the diff:
  diff --git a/go.mod b/go.mod
  index 89981b1..ee26559 100644
  --- a/go.mod
  +++ b/go.mod
  @@ -61,12 +61,12 @@ require (
   require (
   	github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1 // indirect
   	github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20221215162035-5330a85ea652 // indirect
  -	github.com/Microsoft/hcsshim v0.10.0-rc.5 // indirect
  +	github.com/Microsoft/hcsshim v0.10.0-rc.5
   	github.com/cilium/ebpf v0.9.1 // indirect
   	github.com/containerd/cgroups/v3 v3.0.0 // indirect
   	github.com/containerd/fifo v1.0.0 // indirect
   	github.com/containerd/ttrpc v1.1.1-0.20230127163717-32fab2374638 // indirect
  -	github.com/containerd/typeurl v1.0.3-0.20220422153119-7f6e6d160d67 // indirect
  +	github.com/containerd/typeurl v1.0.3-0.20220422153119-7f6e6d160d67
   	github.com/containers/ocicrypt v1.1.6 // indirect
   	github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
   	github.com/distribution/distribution/v3 v3.0.0-2023021[415](https://github.com/containerd/nerdctl/actions/runs/4232290817/jobs/7351844087#step:4:424)0026-36d8c594d7aa // indirect

@AkihiroSuda AkihiroSuda added this to the v1.3.0 milestone Feb 28, 2023
Copy link
Member

@dcantah dcantah left a comment

Choose a reason for hiding this comment

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

lgtm, lets use the unix build tag convenience though

Comment on lines +38 to +51
hypervServiceName := "vmms"

m, err := mgr.Connect()
if err != nil {
t.Fatalf("unable to access Windows service control manager: %s", err)
}
defer m.Disconnect()

s, err := m.OpenService(hypervServiceName)
// hyperv service is not present, hyperv is not enabled
if err != nil {
t.Skip("HyperV is not enabled, skipping test")
}
defer s.Close()
Copy link
Member

Choose a reason for hiding this comment

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

I'm adding a little helper we can use for future hyperv tests here #2062

@dardelean dardelean force-pushed the feature/hyperv-containers branch 4 times, most recently from ad5440b to c7a803d Compare March 20, 2023 12:41
Signed-off-by: Dan Ardelean <dardelean@cloudbasesolutions.com>
@dardelean
Copy link
Contributor Author

Ping.

Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

Thanks

@AkihiroSuda AkihiroSuda merged commit 82a4d93 into containerd:main Mar 21, 2023
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform/Windows/Non-WSL2 Microsoft Windows (non-WSL2)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants