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 inspect show more than one number #324

Merged
merged 1 commit into from
Sep 10, 2021

Conversation

ningmingxiao
Copy link
Contributor

First
nerdctl -n k8s.io ps -a|grep 21
214237255fea k8s.gcr.io/pause:3.1 "/pause" 2 days ago Up
21bf9ea81561 docker.io/calico/cni:v3.8.2 "/install-cni.sh" 2 days ago Created
42174dbd8880 sha256:96047edc008f46c6f3a597012d58e356f06ac8b648122e2717946cfeebecefcf "/usr/local/bin/flex…" 2 days ago Created
Then
nerdctl -n k8s.io inspect 21 it will show double container, not like docker .

@fahedouch
Copy link
Member

fahedouch commented Aug 26, 2021

for images ni > 1 is not enough

we distinguish two cases :

  • in the case of multiple tags that have the same hash, we must have a list of RepoTags in the same native.Image object and not more than one native.Image
  • in the case of multiple tags with different
    hash which starts with the same characters, we should show the error msg

@fahedouch
Copy link
Member

fahedouch commented Aug 26, 2021

@ningmingxiao the condition should be ni != 0 && nc != 0 || nc > 1

@fahedouch
Copy link
Member

Please add DCO sign (Signed-off-by line) https://github.com/apps/dco

@ningmingxiao
Copy link
Contributor Author

I've done

@AkihiroSuda AkihiroSuda added the enhancement New feature or request label Aug 27, 2021
@AkihiroSuda AkihiroSuda requested a review from ktock August 27, 2021 17:29
@AkihiroSuda AkihiroSuda added bug Something isn't working and removed enhancement New feature or request labels Aug 27, 2021
@fahedouch
Copy link
Member

fahedouch commented Aug 27, 2021

@ningmingxiao the condition should be ni != 0 && nc != 0 || nc > 1

you should have a || not a &&

the error is raised if we find :
[at least one image and at least one container with the same hash ]or [more than one containers with the same hash]

Signed-off-by: ning.mingxiao <ning.mingxiao@zte.com.cn>
@ningmingxiao
Copy link
Contributor Author

@ningmingxiao the condition should be ni != 0 && nc != 0 || nc > 1

you should have a || not a &&

the error is raised if we find :
[at least one image and at least one container with the same hash ]or [more than one containers with the same hash]

sorry ,i make a mistick,done.

@fahedouch
Copy link
Member

LGTM

@AkihiroSuda
Copy link
Member

How to test this?

@ningmingxiao
Copy link
Contributor Author

How to test this?

may be it is difficult to test, because containerd create random id,do you have some idea?

@AkihiroSuda AkihiroSuda merged commit 04bc79a into containerd:master Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants