Skip to content

[release/0.8] Cherry-pick Dualstack support checks #1003#1136

Closed
jsturtevant wants to merge 5 commits intomicrosoft:masterfrom
jsturtevant:cp-dualstack-support
Closed

[release/0.8] Cherry-pick Dualstack support checks #1003#1136
jsturtevant wants to merge 5 commits intomicrosoft:masterfrom
jsturtevant:cp-dualstack-support

Conversation

@jsturtevant
Copy link
Copy Markdown
Contributor

This includes a fix for checking if dual stack is supported, we current have a work around https://github.com/jsturtevant/kubernetes/blob/d5d9327351de99e6068f62efb388a6ede38d944e/pkg/proxy/winkernel/proxier.go#L223-L234

From:
#1003

kevpar and others added 5 commits May 28, 2021 16:56
This changes the behavior when the shim is invoked with the "delete"
command line argument.

Previously, the delete path did two things it should not:
- Attempted to locate the sandbox container for the pod and delete it as
  well. This meant if "shim delete" was invoked for a workload
  container, it could bring down the whole pod. The only reason we did
  not see this in the past is that prior to containerd 1.5 "shim delete"
  was not called for successful container stop operations.

- Deleted the bundle directory. We shouldn't do this in the shim, as
  containerd does it itself.

For reference on what the Linux shim does, see here: https://github.com/containerd/containerd/blob/master/runtime/v2/runc/v2/service.go#L291

Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
(cherry picked from commit 450cdb1)
Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
[release/0.8] shim: Clean up delete invocation behavior
Previously, certain error check functions like IsAlreadyStopped returned
true if the error was ERROR_PROC_NOT_FOUND. Based on the comment in the
file, this was intended to be used to indicate a case where the process
could not be found. However, it seems this may have been added
erroneously. ERROR_PROC_NOT_FOUND is actually typically used to mean
that a _procedure_ lookup failed, and has nothing to do with processes.

The original change[1] to check against ERROR_PROC_NOT_FOUND was made
five years ago, and did not contain much information on why this error
would be returned. We are removing this now based on several factors:

- We are not aware of any condition where HCS would intentionally return
  ERROR_PROC_NOT_FOUND to indicate a condition "process does not exist".
- There is an issue where HcsShutdownComputeSystem sometimes returns
  ERROR_PROC_NOT_FOUND due to something failing internally. The current
  error checks are causing this to be treated as "the container has
  already exited", causing moby to not properly stop the container via
  HcsTerminateComputeSystem.

This change leaves the definition for ErrProcNotFound in the code, as it
may be used by external callers, but fixes its comment.

[1]: See commit 0ae7e7e

Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
(cherry picked from commit d78544d)
Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
[release/0.8] Remove ERROR_PROC_NOT_FOUND from error checks
@jsturtevant jsturtevant requested a review from a team as a code owner August 26, 2021 20:47
@jsturtevant
Copy link
Copy Markdown
Contributor Author

that didn't come out right but looks like it was already included so will close this

included in https://github.com/microsoft/hcsshim/releases/tag/v0.8.17

@dcantah
Copy link
Copy Markdown
Contributor

dcantah commented Aug 26, 2021

@jsturtevant This looks like it's pulling in some other commits that are already present in release/0.8

@dcantah
Copy link
Copy Markdown
Contributor

dcantah commented Aug 26, 2021

Oop, just got closed haha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants