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

feature: implement ListPodSandbox method of cri manager #551

Merged
merged 1 commit into from
Jan 17, 2018

Conversation

YaoZengzeng
Copy link
Contributor

Signed-off-by: YaoZengzeng [email protected]

1.Describe what this PR did

fixes part of #420

2.Does this pull request fix one issue?

3.Describe how you did it

4.Describe how to verify it

Maybe the cri-tools is what you need.

We may use the following method to verify that we can list sandboxes:

// Now we must ensure the sandbox image has already exists.
[root@pouch-test cri-tools]# pouch pull k8s.gcr.io/pause-amd64:3.0
[root@pouch-test cri-tools]# cat sandbox-config.json
{
    "metadata": {
        "name": "nginx-sandbox",
        "namespace": "default",
        "attempt": 1,
        "uid": "hdishd83djaidwnduwk28bcsb"
    },
    "linux": {
    }
}
[root@pouch-test cri-tools]# crictl runs sandbox-config.json
008cc69c9c9c8e9c4d78aa8d6c528e21ab26affdc64748f631fb5dcb59963216
[root@pouch-test cri-tools]# crictl sandboxes
SANDBOX ID          CREATED             STATE               NAME                NAMESPACE           ATTEMPT
008cc69c9c9c8       48 years ago        SANDBOX_READY       nginx-sandbox       default             1

5.Special notes for reviews

@codecov-io
Copy link

codecov-io commented Jan 11, 2018

Codecov Report

Merging #551 into master will decrease coverage by 0.04%.
The diff coverage is 12.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #551      +/-   ##
==========================================
- Coverage   14.16%   14.12%   -0.05%     
==========================================
  Files          64       64              
  Lines        3226     3278      +52     
==========================================
+ Hits          457      463       +6     
- Misses       2722     2768      +46     
  Partials       47       47
Impacted Files Coverage Δ
daemon/mgr/cri.go 0% <0%> (ø) ⬆️
daemon/mgr/cri_utils.go 36.36% <15.38%> (-4.82%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c8128b6...2906de4. Read the comment docs.

@YaoZengzeng
Copy link
Contributor Author

@allencloud PTAL.

@@ -66,6 +66,21 @@ func TestSandboxNameRoundTrip(t *testing.T) {
assert.Equal(t, config.Metadata, actualMetadata)
}

func TestConvertPouchStatusToCriSandboxState(t *testing.T) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just use TestToCriSandboxState? This is sufficient, I think.

@YaoZengzeng
Copy link
Contributor Author

@allencloud updated.

@allencloud
Copy link
Collaborator

LGTM

@pouchrobot pouchrobot added the LGTM one maintainer or community participant agrees to merge the pull reuqest. label Jan 17, 2018
@allencloud allencloud merged commit e7a547b into AliyunContainerService:master Jan 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LGTM one maintainer or community participant agrees to merge the pull reuqest. size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants