Skip to content

Windows: Cannot forcefully delete sandbox if HNS endpoint cannot be found #6135

@claudiubelu

Description

@claudiubelu

Description

If the HNS endpoints get deleted for any reason, the sandboxes cannot be removed anymore, even if --force was given.

Steps to reproduce the issue

  1. Create container
  2. Remove HNS endpoint with: hnsdiag.exe delete endpoints endpoint_id
  3. crictl.exe rmp --force pod_id

Describe the results you received and expected

The operation fails with:

removing the pod sandbox "195b01b9e2eb9": rpc error: code = Unknown desc = failed to forcibly stop sandbox "195b01b9e2eb908bc478a4a9d04c1ff4213ae9298a38464d0c82b3109defc0f7": failed to destroy network for sandbox "195b01b9e2eb908bc478a4a9d04c1ff4213ae9298a38464d0c82b3109defc0f7": Failed to delete endpoint: Failed to get hcn endpoint with id: 1f120cae-8ab4-4636-b5aa-34b6b4a066e9 due to err: Endpoint ID "1f120cae-8ab4-4636-b5aa-34b6b4a066e9" not found

The containerd logs:

time="2021-10-19T14:55:53.421244900Z" level=info msg="RemovePodSandbox for \"195b01b9e2eb9\""
time="2021-10-19T14:55:53.421778600Z" level=info msg="Forcibly stopping sandbox \"195b01b9e2eb908bc478a4a9d04c1ff4213ae9298a38464d0c82b3109defc0f7\""
time="2021-10-19T14:55:53.817113800Z" level=error msg="RemovePodSandbox for \"195b01b9e2eb9\" failed" error="failed to forcibly stop sandbox \"195b01b9e2eb908bc478a4a9d04c1ff4213ae9298a38464d0c82b3109defc0f7\": failed to destroy network
for sandbox \"195b01b9e2eb908bc478a4a9d04c1ff4213ae9298a38464d0c82b3109defc0f7\": Failed to delete endpoint: Failed to get hcn endpoint with id: 1f120cae-8ab4-4636-b5aa-34b6b4a066e9 due to err: Endpoint ID \"1f120cae-8ab4-4636-b5aa-34b6b4a066e9\" not found"

What version of containerd are you using?

containerd github.com/containerd/containerd v1.6.0-beta.0-6-g10d9d1a60 10d9d1a

Any other relevant information

No response

Show configuration if it is related to CRI plugin.

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions