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

Publish sandbox events #8602

Merged
merged 5 commits into from
May 31, 2023
Merged

Publish sandbox events #8602

merged 5 commits into from
May 31, 2023

Conversation

mxpv
Copy link
Member

@mxpv mxpv commented May 30, 2023

  • Adds sandbox specific events (start, stop, exit). Previously we used task events for this.
  • Moves pod sandbox containers recovery to podsandbox/ package, so sbserver should be less aware about pod sandbox containers.
  • Tidy dependencies between controller and cri service.

/cc: @egernst

@k8s-ci-robot
Copy link

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

mxpv added 3 commits May 30, 2023 13:54
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
@mxpv mxpv marked this pull request as ready for review May 30, 2023 21:29
@mxpv mxpv requested a review from dcantah May 30, 2023 21:30
// Send CONTAINER_DELETED event with ContainerId equal to SandboxId.
c.cri.GenerateAndSendContainerEvent(ctx, sandboxID, sandboxID, runtime.ContainerEventType_CONTAINER_DELETED_EVENT)

c.sandboxStore.Delete(sandboxID)
Copy link
Member

Choose a reason for hiding this comment

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

Where is this delete done now?

Copy link
Member Author

@mxpv mxpv May 30, 2023

Choose a reason for hiding this comment

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

CRI layer is more appropriate place to remove a sandbox from the sandbox store (so it works for all implementations).

We already handle this here:

c.sandboxStore.Delete(id)

mxpv added 2 commits May 30, 2023 16:40
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
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

@estesp estesp merged commit 80eb763 into containerd:main May 31, 2023
45 checks passed
@mxpv mxpv deleted the sbevents branch May 31, 2023 13:59
@mxpv mxpv added the cherry-pick/1.7.x Change to be cherry picked to release/1.7 branch label May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/runtime Runtime cherry-pick/1.7.x Change to be cherry picked to release/1.7 branch impact/changelog
Projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants