cri,nri: block NRI plugin sync. during event processing.
Block the synchronization of registering NRI plugins during CRI events to avoid the plugin ending up in an inconsistent starting state after initial sync (missing pods, containers or missed events for some pods or containers). Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
This commit is contained in:
@@ -44,6 +44,9 @@ func (c *criService) RemovePodSandbox(ctx context.Context, r *runtime.RemovePodS
|
||||
r.GetPodSandboxId())
|
||||
return &runtime.RemovePodSandboxResponse{}, nil
|
||||
}
|
||||
|
||||
defer c.nri.BlockPluginSync().Unblock()
|
||||
|
||||
// Use the full sandbox id.
|
||||
id := sandbox.ID
|
||||
span.SetAttributes(tracing.Attribute("sandbox.id", id))
|
||||
|
||||
Reference in New Issue
Block a user