Fix context when waiting sandbox

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
Maksym Pavlenko 2022-12-07 12:52:04 -08:00
parent 03a4dc0711
commit f9295aa49f

View File

@ -295,7 +295,7 @@ func (c *criService) RunPodSandbox(ctx context.Context, r *runtime.RunPodSandbox
// TaskOOM from containerd may come before sandbox is added to store, // TaskOOM from containerd may come before sandbox is added to store,
// but we don't care about sandbox TaskOOM right now, so it is fine. // but we don't care about sandbox TaskOOM right now, so it is fine.
go func() { go func() {
resp, err := controller.Wait(context.Background(), id) resp, err := controller.Wait(ctrdutil.NamespacedContext(), id)
if err != nil { if err != nil {
log.G(ctx).WithError(err).Error("failed to wait for sandbox controller, skipping exit event") log.G(ctx).WithError(err).Error("failed to wait for sandbox controller, skipping exit event")
return return